public class StringAsyncEntityConsumer extends AbstractCharAsyncEntityConsumer<String>
AsyncEntityConsumer
implementation
that processes the data stream content into a string.DEF_BUF_SIZE
Constructor and Description |
---|
StringAsyncEntityConsumer() |
StringAsyncEntityConsumer(CharCodingConfig charCodingConfig) |
StringAsyncEntityConsumer(int capacityIncrement) |
StringAsyncEntityConsumer(int bufSize,
int capacityIncrement,
CharCodingConfig charCodingConfig) |
Modifier and Type | Method and Description |
---|---|
protected int |
capacityIncrement()
Triggered to obtain the capacity increment.
|
protected void |
data(CharBuffer src,
boolean endOfStream)
Triggered to pass incoming data packet to the data consumer.
|
String |
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, setCharset, streamEnd, updateCapacity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
consume, streamEnd, updateCapacity
public StringAsyncEntityConsumer(int bufSize, int capacityIncrement, CharCodingConfig charCodingConfig)
public StringAsyncEntityConsumer(int capacityIncrement)
public StringAsyncEntityConsumer(CharCodingConfig charCodingConfig)
public StringAsyncEntityConsumer()
protected final void streamStart(ContentType contentType) throws HttpException, IOException
AbstractCharAsyncEntityConsumer
streamStart
in class AbstractCharAsyncEntityConsumer<String>
contentType
- the entity content typeHttpException
IOException
protected int capacityIncrement()
AbstractCharDataConsumer
capacityIncrement
in class AbstractCharDataConsumer
protected final void data(CharBuffer src, boolean endOfStream)
AbstractCharDataConsumer
data
in class AbstractCharDataConsumer
src
- the data packet.endOfStream
- flag indicating whether this data packet is the last in the data stream.public String generateContent()
AbstractCharAsyncEntityConsumer
generateContent
in class AbstractCharAsyncEntityConsumer<String>
public void releaseResources()
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.