public abstract class HttpResponseBodyPart extends Object
Constructor and Description |
---|
HttpResponseBodyPart() |
Modifier and Type | Method and Description |
---|---|
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 boolean |
isUnderlyingConnectionToBeClosed()
Return true of the underlying connection will be closed once the response has been fully processed.
|
abstract int |
length()
Return length of this part in bytes.
|
abstract void |
markUnderlyingConnectionAsToBeClosed()
Close the underlying connection once the processing has completed.
|
abstract InputStream |
readBodyPartBytes()
Method for accessing contents of this part via stream.
|
abstract int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
public abstract int length()
public abstract byte[] getBodyPartBytes()
public abstract InputStream readBodyPartBytes()
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 markUnderlyingConnectionAsToBeClosed()
public abstract boolean isUnderlyingConnectionToBeClosed()
Copyright © 2015. All Rights Reserved.