public class ApacheResponseBodyPart extends HttpResponseBodyPart
provider, uri| Constructor and Description |
|---|
ApacheResponseBodyPart(URI uri,
byte[] chunk,
AsyncHttpProvider provider,
boolean last) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
closeUnderlyingConnection()
Return true of the underlying connection will be closed once the response has been fully processed.
|
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.
|
boolean |
isLast()
Return true if this is the last part.
|
int |
length() |
void |
markUnderlyingConnectionAsClosed()
Close the underlying connection once the processing has completed.
|
int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
getUrl, providerpublic ApacheResponseBodyPart(URI uri, byte[] chunk, AsyncHttpProvider provider, boolean last)
public 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 boolean isLast()
isLast in class HttpResponseBodyPartpublic void markUnderlyingConnectionAsClosed()
markUnderlyingConnectionAsClosed in class HttpResponseBodyPartpublic boolean closeUnderlyingConnection()
closeUnderlyingConnection in class HttpResponseBodyPartpublic int length()
length in class HttpResponseBodyPartCopyright © 2014. All Rights Reserved.