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.
Method Summary |
java.nio.ByteBuffer |
getBodyByteBuffer()
Return the underlying ByteBuffer |
byte[] |
getBodyPartBytes()
Return the response body's part bytes received. |
int |
writeTo(java.io.OutputStream outputStream)
Write the available bytes to the OutputStream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApacheResponseBodyPart
public ApacheResponseBodyPart(java.net.URI uri,
byte[] chunk,
AsyncHttpProvider<org.apache.commons.httpclient.HttpClient> 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(java.io.OutputStream outputStream)
throws java.io.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:
java.io.IOException
getBodyByteBuffer
public java.nio.ByteBuffer getBodyByteBuffer()
- Description copied from class:
HttpResponseBodyPart
- Return the underlying
ByteBuffer
- Specified by:
getBodyByteBuffer
in class HttpResponseBodyPart
- Returns:
ByteBuffer
Copyright © 2010. All Rights Reserved.