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, streamStartconsume, setCharset, streamEnd, updateCapacityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsume, streamEnd, updateCapacitypublic 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
AbstractCharAsyncEntityConsumerstreamStart in class AbstractCharAsyncEntityConsumer<String>contentType - the entity content typeHttpExceptionIOExceptionprotected int capacityIncrement()
AbstractCharDataConsumercapacityIncrement in class AbstractCharDataConsumerprotected final void data(CharBuffer src, boolean endOfStream)
AbstractCharDataConsumerdata in class AbstractCharDataConsumersrc - the data packet.endOfStream - flag indicating whether this data packet is the last in the data stream.public String generateContent()
AbstractCharAsyncEntityConsumergenerateContent in class AbstractCharAsyncEntityConsumer<String>public void releaseResources()
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.