com.ning.http.client.providers.apache
Class ApacheResponseBodyPart
java.lang.Object
com.ning.http.client.HttpContent
com.ning.http.client.HttpResponseBodyPart
com.ning.http.client.providers.apache.ApacheResponseBodyPart
public class ApacheResponseBodyPart
- extends HttpResponseBodyPart
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 |
ApacheResponseBodyPart
public ApacheResponseBodyPart(URI uri,
byte[] chunk,
AsyncHttpProvider provider)
getBodyPartBytes
public byte[] getBodyPartBytes()
- Return the response body's part bytes received.
- Specified by:
getBodyPartBytes
in class HttpResponseBodyPart
- Returns:
- the response body's part bytes received.
writeTo
public int writeTo(OutputStream outputStream)
throws IOException
- Description copied from class:
HttpResponseBodyPart
- Write the available bytes to the
OutputStream
- Specified by:
writeTo
in class HttpResponseBodyPart
- Returns:
- The number of bytes written
- Throws:
IOException
getBodyByteBuffer
public ByteBuffer getBodyByteBuffer()
- Description copied from class:
HttpResponseBodyPart
- 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.
- Specified by:
getBodyByteBuffer
in class HttpResponseBodyPart
- Returns:
ByteBuffer
Copyright © 2011. All Rights Reserved.