|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.impl.nio.codecs.AbstractContentDecoder
public abstract class AbstractContentDecoder
Abstract ContentDecoder that serves as a base for all content
decoder implementations.
| Field Summary | |
|---|---|
protected SessionInputBuffer |
buffer
|
protected ReadableByteChannel |
channel
|
protected boolean |
completed
|
protected HttpTransportMetricsImpl |
metrics
|
| Constructor Summary | |
|---|---|
AbstractContentDecoder(ReadableByteChannel channel,
SessionInputBuffer buffer,
HttpTransportMetricsImpl metrics)
Creates an instance of this class. |
|
| Method Summary | |
|---|---|
protected int |
fillBufferFromChannel()
Reads from the channel to the session buffer. |
boolean |
isCompleted()
Returns true if the entity has been received in its
entirety. |
protected int |
readFromChannel(ByteBuffer dst)
Reads from the channel to the destination. |
protected int |
readFromChannel(ByteBuffer dst,
int limit)
Reads from the channel to the destination. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.http.nio.ContentDecoder |
|---|
read |
| Field Detail |
|---|
protected final ReadableByteChannel channel
protected final SessionInputBuffer buffer
protected final HttpTransportMetricsImpl metrics
protected boolean completed
| Constructor Detail |
|---|
public AbstractContentDecoder(ReadableByteChannel channel,
SessionInputBuffer buffer,
HttpTransportMetricsImpl metrics)
channel - the source channel.buffer - the session input buffer that can be used to store
session data for intermediate processing.metrics - Transport metrics of the underlying HTTP transport.| Method Detail |
|---|
public boolean isCompleted()
ContentDecodertrue if the entity has been received in its
entirety.
isCompleted in interface ContentDecodertrue if all the content has been consumed,
false otherwise.
protected int readFromChannel(ByteBuffer dst)
throws IOException
dst - destination.
IOException
protected int fillBufferFromChannel()
throws IOException
IOException
protected int readFromChannel(ByteBuffer dst,
int limit)
throws IOException
dst - destination.limit - max number of bytes to transfer.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||