public abstract class HttpResponseBodyPart extends Object
Constructor and Description |
---|
HttpResponseBodyPart() |
Modifier and Type | Method and Description |
---|---|
abstract ByteBuffer |
getBodyByteBuffer() |
abstract byte[] |
getBodyPartBytes() |
abstract boolean |
isLast() |
abstract boolean |
isUnderlyingConnectionToBeClosed() |
abstract int |
length() |
abstract void |
markUnderlyingConnectionAsToBeClosed()
Close the underlying connection once the processing has completed.
|
abstract InputStream |
readBodyPartBytes() |
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
- the target osIOException
- exception while writing in the ospublic abstract ByteBuffer getBodyByteBuffer()
ByteBuffer
that wraps the actual bytes read from the response's chunk.
The ByteBuffer
's capacity is equal to the number of bytes available.public abstract boolean isLast()
public abstract void markUnderlyingConnectionAsToBeClosed()
public abstract boolean isUnderlyingConnectionToBeClosed()
Copyright © 2015. All Rights Reserved.