public class BasicAsyncEntityConsumer extends AbstractBinAsyncEntityConsumer<byte[]>
AsyncEntityConsumer
implementation
that processes the data stream content into a byte array.Constructor and Description |
---|
BasicAsyncEntityConsumer() |
Modifier and Type | Method and Description |
---|---|
protected int |
capacityIncrement()
Triggered to obtain the capacity increment.
|
protected void |
data(ByteBuffer src,
boolean endOfStream)
Triggered to pass incoming data packet to the data consumer.
|
protected byte[] |
generateContent()
Triggered to generate entity representation.
|
void |
releaseResources() |
protected void |
streamStart(ContentType contentType)
Triggered to signal beginning of entity content stream.
|
completed, failed, getContent, streamStart
consume, streamEnd, updateCapacity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
consume, streamEnd, updateCapacity
protected void streamStart(ContentType contentType) throws HttpException, IOException
AbstractBinAsyncEntityConsumer
streamStart
in class AbstractBinAsyncEntityConsumer<byte[]>
contentType
- the entity content typeHttpException
- in case of an HTTP protocol violation.IOException
- in case of an I/O error.protected int capacityIncrement()
AbstractBinDataConsumer
capacityIncrement
in class AbstractBinDataConsumer
protected void data(ByteBuffer src, boolean endOfStream) throws IOException
AbstractBinDataConsumer
data
in class AbstractBinDataConsumer
src
- the data packet.endOfStream
- flag indicating whether this data packet is the last in the data stream.IOException
- in case of an I/O error.protected byte[] generateContent() throws IOException
AbstractBinAsyncEntityConsumer
generateContent
in class AbstractBinAsyncEntityConsumer<byte[]>
IOException
- in case of an I/O error.public void releaseResources()
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.