public abstract class HttpResponseBodyPart extends HttpContent
provider, uri
Constructor and Description |
---|
HttpResponseBodyPart(URI uri,
AsyncHttpProvider provider) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
closeUnderlyingConnection()
Return true of the underlying connection will be closed once the response has been fully processed.
|
abstract ByteBuffer |
getBodyByteBuffer()
Return a
ByteBuffer that wraps the actual bytes read from the response's chunk. |
abstract byte[] |
getBodyPartBytes()
Return the response body's part bytes received.
|
abstract boolean |
isLast()
Return true if this is the last part.
|
abstract int |
length() |
abstract void |
markUnderlyingConnectionAsClosed()
Close the underlying connection once the processing has completed.
|
abstract int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
getUrl, provider
public HttpResponseBodyPart(URI uri, AsyncHttpProvider provider)
public abstract byte[] getBodyPartBytes()
public abstract int writeTo(OutputStream outputStream) throws IOException
OutputStream
outputStream
- IOException
public abstract ByteBuffer getBodyByteBuffer()
ByteBuffer
that wraps the actual bytes read from the response's chunk. The ByteBuffer
capacity is equal to the number of bytes available.ByteBuffer
public abstract boolean isLast()
public abstract void markUnderlyingConnectionAsClosed()
public abstract boolean closeUnderlyingConnection()
public abstract int length()
Copyright © 2014. All Rights Reserved.