public class ResponseBodyPart extends HttpResponseBodyPart
| Constructor and Description |
|---|
ResponseBodyPart(byte[] chunk,
boolean last) |
| 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 |
length()
Return length of this part in bytes.
|
int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
isLast, isUnderlyingConnectionToBeClosed, markUnderlyingConnectionAsToBeClosedpublic byte[] getBodyPartBytes()
getBodyPartBytes in class HttpResponseBodyPartpublic int writeTo(OutputStream outputStream) throws IOException
HttpResponseBodyPartOutputStreamwriteTo in class HttpResponseBodyPartIOExceptionpublic ByteBuffer getBodyByteBuffer()
HttpResponseBodyPartByteBuffer 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 HttpResponseBodyPartByteBufferpublic int length()
HttpResponseBodyPartlength in class HttpResponseBodyPartCopyright © 2015. All Rights Reserved.