|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.client.HttpContent
com.ning.http.client.HttpResponseBodyPart
com.ning.http.client.providers.grizzly.GrizzlyResponseBodyPart
public class GrizzlyResponseBodyPart
HttpResponseBodyPart implementation using the Grizzly 2.0 HTTP client
codec.
| Field Summary |
|---|
| Fields inherited from class com.ning.http.client.HttpContent |
|---|
provider, uri |
| Constructor Summary | |
|---|---|
GrizzlyResponseBodyPart(org.glassfish.grizzly.http.HttpContent content,
URI uri,
org.glassfish.grizzly.Connection connection,
AsyncHttpProvider provider)
|
|
| Method Summary | |
|---|---|
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. |
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 |
| Methods inherited from class com.ning.http.client.HttpContent |
|---|
getUrl, provider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GrizzlyResponseBodyPart(org.glassfish.grizzly.http.HttpContent content,
URI uri,
org.glassfish.grizzly.Connection connection,
AsyncHttpProvider provider)
| Method Detail |
|---|
public byte[] getBodyPartBytes()
getBodyPartBytes in class HttpResponseBodyPart
public int writeTo(OutputStream outputStream)
throws IOException
OutputStream
writeTo in class HttpResponseBodyPartIOExceptionpublic ByteBuffer getBodyByteBuffer()
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 HttpResponseBodyPartByteBufferpublic boolean isLast()
isLast in class HttpResponseBodyPartpublic void markUnderlyingConnectionAsClosed()
markUnderlyingConnectionAsClosed in class HttpResponseBodyPartpublic boolean closeUnderlyingConnection()
closeUnderlyingConnection in class HttpResponseBodyPartpublic int length()
length in class HttpResponseBodyPart
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||