public class ResponseBodyPart extends HttpResponseBodyPart
provider, uri
Constructor and Description |
---|
ResponseBodyPart(URI uri,
byte[] chunk,
AsyncHttpProvider provider) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
getBodyByteBuffer()
Return a
ByteBuffer that wraps the actual bytes read from the response's chunk. |
byte[] |
getBodyPartBytes()
Return the response body's part bytes received.
|
int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
getUrl, provider
public ResponseBodyPart(URI uri, byte[] chunk, AsyncHttpProvider provider)
public byte[] getBodyPartBytes()
getBodyPartBytes
in class HttpResponseBodyPart
public int writeTo(OutputStream outputStream) throws IOException
HttpResponseBodyPart
OutputStream
writeTo
in class HttpResponseBodyPart
IOException
public ByteBuffer getBodyByteBuffer()
HttpResponseBodyPart
ByteBuffer
that wraps the actual bytes read from the response's chunk. The ByteBuffer
capacity is equal to the number of bytes available.getBodyByteBuffer
in class HttpResponseBodyPart
ByteBuffer
Copyright © 2015. All rights reserved.