public class ResponseBodyPart extends HttpResponseBodyPart
| Constructor and Description |
|---|
ResponseBodyPart(org.jboss.netty.handler.codec.http.HttpResponse response,
boolean last) |
ResponseBodyPart(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.
|
InputStream |
readBodyPartBytes()
Method for accessing contents of this part via stream.
|
int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
isLast, isUnderlyingConnectionToBeClosed, markUnderlyingConnectionAsToBeClosedpublic ResponseBodyPart(org.jboss.netty.handler.codec.http.HttpResponse response,
boolean last)
public ResponseBodyPart(org.jboss.netty.handler.codec.http.HttpResponse response,
org.jboss.netty.handler.codec.http.HttpChunk chunk,
boolean last)
public byte[] getBodyPartBytes()
getBodyPartBytes in class HttpResponseBodyPartpublic int writeTo(OutputStream outputStream) throws IOException
HttpResponseBodyPartOutputStreamwriteTo in class HttpResponseBodyPartIOExceptionpublic org.jboss.netty.buffer.ChannelBuffer getChannelBuffer()
public ByteBuffer getBodyByteBuffer()
HttpResponseBodyPartByteBuffer 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 HttpResponseBodyPartByteBufferpublic int length()
HttpResponseBodyPartlength in class HttpResponseBodyPartpublic InputStream readBodyPartBytes()
HttpResponseBodyPartreadBodyPartBytes in class HttpResponseBodyPartCopyright © 2014. All Rights Reserved.