public class ResponseBodyPart extends HttpResponseBodyPart
provider, uri
Constructor and Description |
---|
ResponseBodyPart(URI uri,
org.jboss.netty.handler.codec.http.HttpResponse response,
AsyncHttpProvider provider,
boolean last) |
ResponseBodyPart(URI uri,
org.jboss.netty.handler.codec.http.HttpResponse response,
AsyncHttpProvider provider,
org.jboss.netty.handler.codec.http.HttpChunk chunk,
boolean last) |
Modifier and Type | Method and Description |
---|---|
boolean |
closeUnderlyingConnection()
Return true of the underlying connection will be closed once the response has been fully processed.
|
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() |
boolean |
isLast()
Return true if this is the last part.
|
int |
length() |
void |
markUnderlyingConnectionAsClosed()
Close the underlying connection once the processing has completed.
|
int |
writeTo(OutputStream outputStream)
Write the available bytes to the
OutputStream |
getUrl, provider
public ResponseBodyPart(URI uri, org.jboss.netty.handler.codec.http.HttpResponse response, AsyncHttpProvider provider, boolean last)
public ResponseBodyPart(URI uri, org.jboss.netty.handler.codec.http.HttpResponse response, AsyncHttpProvider provider, 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 boolean isLast()
isLast
in class HttpResponseBodyPart
public void markUnderlyingConnectionAsClosed()
markUnderlyingConnectionAsClosed
in class HttpResponseBodyPart
public boolean closeUnderlyingConnection()
closeUnderlyingConnection
in class HttpResponseBodyPart
public int length()
length
in class HttpResponseBodyPart
Copyright © 2014. All Rights Reserved.