|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ning.http.client.HttpContent
com.ning.http.client.HttpResponseBodyPart
public abstract class HttpResponseBodyPart
A callback class used when an HTTP response body is received.
Field Summary |
---|
Fields inherited from class com.ning.http.client.HttpContent |
---|
provider, uri |
Constructor Summary | |
---|---|
HttpResponseBodyPart(URI uri,
AsyncHttpProvider provider)
|
Method Summary | |
---|---|
abstract boolean |
closeUnderlyingConnection()
Return true of the underlying connection will be closed once the response has been fully processed. |
abstract ByteBuffer |
getBodyByteBuffer()
Return a ByteBuffer that wraps the actual bytes read from the response's chunk. |
abstract byte[] |
getBodyPartBytes()
Return the response body's part bytes received. |
abstract boolean |
isLast()
Return true if this is the last part. |
abstract int |
length()
|
abstract void |
markUnderlyingConnectionAsClosed()
Close the underlying connection once the processing has completed. |
abstract int |
writeTo(OutputStream outputStream)
Write the available bytes to the OutputStream |
Methods inherited from class com.ning.http.client.HttpContent |
---|
getUrl, provider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpResponseBodyPart(URI uri, AsyncHttpProvider provider)
Method Detail |
---|
public abstract byte[] getBodyPartBytes()
public abstract int writeTo(OutputStream outputStream) throws IOException
OutputStream
outputStream
-
IOException
public abstract ByteBuffer getBodyByteBuffer()
ByteBuffer
that wraps the actual bytes read from the response's chunk. The ByteBuffer
capacity is equal to the number of bytes available.
ByteBuffer
public abstract boolean isLast()
public abstract void markUnderlyingConnectionAsClosed()
public abstract boolean closeUnderlyingConnection()
public abstract int length()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |