com.ning.http.client
Class HttpResponseBodyPart
java.lang.Object
com.ning.http.client.HttpContent
com.ning.http.client.HttpResponseBodyPart
- Direct Known Subclasses:
- ApacheResponseBodyPart, ResponseBodyPart, ResponseBodyPart
public abstract class HttpResponseBodyPart
- extends HttpContent
A callback class used when an HTTP response body is received.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpResponseBodyPart
public HttpResponseBodyPart(URI uri,
AsyncHttpProvider provider)
getBodyPartBytes
public abstract byte[] getBodyPartBytes()
- Return the response body's part bytes received.
- Returns:
- the response body's part bytes received.
writeTo
public abstract int writeTo(OutputStream outputStream)
throws IOException
- Write the available bytes to the
OutputStream
- Parameters:
outputStream
-
- Returns:
- The number of bytes written
- Throws:
IOException
getBodyByteBuffer
public abstract ByteBuffer getBodyByteBuffer()
- Return a
ByteBuffer
that wraps the actual bytes read from the response's chunk. The ByteBuffer
capacity is equal to the number of bytes available.
- Returns:
ByteBuffer
Copyright © 2011. All Rights Reserved.