Class Overview
A callback class used when an HTTP response body is received.
Summary
Public Methods |
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.
|
void
|
markUnderlyingConnectionAsClosed()
Close the underlying connection once the processing has completed.
|
int
|
writeTo(OutputStream outputStream)
Write the available bytes to the java.io.OutputStream
|
[Expand]
Inherited Methods |
From class
com.ning.http.client.HttpResponseBodyPart
abstract
boolean
|
closeUnderlyingConnection()
Return true of the underlying connection will be closed once the response has been fully processed.
|
abstract
ByteBuffer
|
getBodyByteBuffer()
Return a ByteBuffer that wraps the actual bytes read from the response's chunk.
|
abstract
byte[]
|
getBodyPartBytes()
Return the response body's part bytes received.
|
abstract
boolean
|
isLast()
Return true if this is the last part.
|
abstract
void
|
markUnderlyingConnectionAsClosed()
Close the underlying connection once the processing has completed.
|
abstract
int
|
writeTo(OutputStream outputStream)
Write the available bytes to the java.io.OutputStream
|
|
From class
com.ning.http.client.HttpContent
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0)
|
final
void
|
wait(long arg0, int arg1)
|
|
Public Constructors
public
ResponseBodyPart
(URI uri, byte[] chunk, AsyncHttpProvider provider, boolean last)
Public Methods
public
boolean
closeUnderlyingConnection
()
Return true of the underlying connection will be closed once the response has been fully processed.
Returns
- true of the underlying connection will be closed once the response has been fully processed.
public
ByteBuffer
getBodyByteBuffer
()
Return a ByteBuffer that wraps the actual bytes read from the response's chunk. The ByteBuffer
capacity is equal to the number of bytes available.
public
byte[]
getBodyPartBytes
()
Return the response body's part bytes received.
Returns
- the response body's part bytes received.
public
boolean
isLast
()
Return true if this is the last part.
Returns
- true if this is the last part.
public
void
markUnderlyingConnectionAsClosed
()
Close the underlying connection once the processing has completed. Invoking that method means the
underlying TCP connection will be closed as soon as the processing of the response is completed. That
means the underlying connection will never get pooled.
public
int
writeTo
(OutputStream outputStream)
Write the available bytes to the java.io.OutputStream
Returns
- The number of bytes written