public class LazyNettyResponseBodyPart extends NettyResponseBodyPart
Constructor and Description |
---|
LazyNettyResponseBodyPart(io.netty.buffer.ByteBuf buf,
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.
|
io.netty.buffer.ByteBuf |
getBuf() |
int |
length()
Return length of this part in bytes.
|
InputStream |
readBodyPartBytes()
Method for accessing contents of this part via stream.
|
int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
isLast, isUnderlyingConnectionToBeClosed, markUnderlyingConnectionAsToBeClosed
public LazyNettyResponseBodyPart(io.netty.buffer.ByteBuf buf, boolean last)
public io.netty.buffer.ByteBuf getBuf()
public int length()
HttpResponseBodyPart
length
in class HttpResponseBodyPart
public byte[] getBodyPartBytes()
getBodyPartBytes
in class HttpResponseBodyPart
public InputStream readBodyPartBytes()
HttpResponseBodyPart
readBodyPartBytes
in class HttpResponseBodyPart
public int writeTo(OutputStream outputStream) throws IOException
HttpResponseBodyPart
OutputStream
writeTo
in class HttpResponseBodyPart
IOException
public ByteBuffer getBodyByteBuffer()
HttpResponseBodyPart
ByteBuffer
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 HttpResponseBodyPart
ByteBuffer
Copyright © 2015. All Rights Reserved.