public class NettyResponseBodyPart extends HttpResponseBodyPart
Constructor and Description |
---|
NettyResponseBodyPart(org.jboss.netty.handler.codec.http.HttpResponse response,
boolean last) |
NettyResponseBodyPart(org.jboss.netty.handler.codec.http.HttpResponse response,
org.jboss.netty.handler.codec.http.HttpChunk chunk,
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.
|
org.jboss.netty.buffer.ChannelBuffer |
getChannelBuffer() |
int |
length()
Return length of this part in bytes.
|
int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
isLast, isUnderlyingConnectionToBeClosed, markUnderlyingConnectionAsToBeClosed
public NettyResponseBodyPart(org.jboss.netty.handler.codec.http.HttpResponse response, boolean last)
public NettyResponseBodyPart(org.jboss.netty.handler.codec.http.HttpResponse response, org.jboss.netty.handler.codec.http.HttpChunk chunk, boolean last)
public byte[] getBodyPartBytes()
getBodyPartBytes
in class HttpResponseBodyPart
public int writeTo(OutputStream outputStream) throws IOException
HttpResponseBodyPart
OutputStream
writeTo
in class HttpResponseBodyPart
IOException
public org.jboss.netty.buffer.ChannelBuffer getChannelBuffer()
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
public int length()
HttpResponseBodyPart
length
in class HttpResponseBodyPart
Copyright © 2014. All Rights Reserved.