| Modifier and Type | Field and Description |
|---|---|
| private volatile ByteBuffer | |
| private final CharBuffer | |
| private final CharCodingConfig | |
| private volatile Charset | |
| private volatile CharsetDecoder | |
| protected static final int | |
| private static final ByteBuffer |
| Access | Constructor and Description |
|---|---|
| protected | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract int | Returns: the number of bytes this consumer is prepared to process.Triggered to obtain the capacity increment. |
| private void | |
| protected abstract void | |
| public final void | consume(final ByteBuffer
data source. src)Implements org. |
| protected abstract void | data(CharBuffer
the data packet. src, boolean flag indicating whether this data packet is the last in the data stream. endOfStream)Triggered to pass incoming data packet to the data consumer. |
| private void | |
| private CharsetDecoder | |
| protected final void | |
| public final void | streamEnd(final List<? extends Header>
data stream trailers. trailers)Implements org. |
| public final void | updateCapacity(final CapacityChannel
the channel for capacity updates. capacityChannel)Implements org. |
| byteBuffer | back to summary |
|---|---|
| private volatile ByteBuffer byteBuffer | |
| charBuffer | back to summary |
|---|---|
| private final CharBuffer charBuffer | |
| charCodingConfig | back to summary |
|---|---|
| private final CharCodingConfig charCodingConfig | |
| charset | back to summary |
|---|---|
| private volatile Charset charset | |
| charsetDecoder | back to summary |
|---|---|
| private volatile CharsetDecoder charsetDecoder | |
| DEF_BUF_SIZE | back to summary |
|---|---|
| protected static final int DEF_BUF_SIZE | |
| EMPTY_BIN | back to summary |
|---|---|
| private static final ByteBuffer EMPTY_BIN | |
| AbstractCharDataConsumer | back to summary |
|---|---|
| protected AbstractCharDataConsumer(final int bufSize, final CharCodingConfig charCodingConfig) | |
| AbstractCharDataConsumer | back to summary |
|---|---|
| public AbstractCharDataConsumer() | |
| capacityIncrement | back to summary |
|---|---|
| protected abstract int capacityIncrement() Triggered to obtain the capacity increment.
| |
| checkResult | back to summary |
|---|---|
| private void checkResult(final CoderResult result) throws IOException | |
| completed | back to summary |
|---|---|
| protected abstract void completed() throws IOException Triggered to signal completion of data processing. | |
| consume | back to summary |
|---|---|
| public final void consume(final ByteBuffer src) throws IOException Implements org. Doc from org. Triggered to pass incoming data to the data consumer. The consumer must consume the entire content of the data buffer. The consumer must stop incrementing its capacity on the capacity channel if it is unable to accept more data. Once the data consumer has handled accumulated data or allocated more intermediate storage it can update its capacity information on the capacity channel.
| |
| data | back to summary |
|---|---|
| protected abstract void data(CharBuffer src, boolean endOfStream) throws IOException Triggered to pass incoming data packet to the data consumer.
| |
| doDecode | back to summary |
|---|---|
| private void doDecode(final boolean endOfStream) throws IOException | |
| getCharsetDecoder | back to summary |
|---|---|
| private CharsetDecoder getCharsetDecoder() | |
| setCharset | back to summary |
|---|---|
| protected final void setCharset(final Charset charset) | |
| streamEnd | back to summary |
|---|---|
| public final void streamEnd(final List<? extends Header> trailers) throws HttpException, IOException Implements org. Doc from org. Triggered to signal termination of the data stream. | |
| updateCapacity | back to summary |
|---|---|
| public final void updateCapacity(final CapacityChannel capacityChannel) throws IOException Implements org. Doc from org. Triggered to signal ability of the underlying data stream to receive data capacity update. The data consumer can choose to write data immediately inside the call or asynchronously at some later point.
| |