public abstract class CharacterReadingListener extends ByteReadingListener
Reader
. It relies on
the representation's character set for proper character decoding.Constructor and Description |
---|
CharacterReadingListener(Representation source)
Default constructor.
|
CharacterReadingListener(Representation source,
int bufferSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
onContent(java.io.InputStream inputStream)
Callback invoked when new content is available.
|
protected abstract void |
onContent(java.io.Reader reader)
Callback invoked when new content is available.
|
onContent
onEnd, onError, onSelected
public CharacterReadingListener(Representation source) throws java.io.IOException
IoUtils.BUFFER_SIZE
length.source
- The source representation.java.io.IOException
public CharacterReadingListener(Representation source, int bufferSize) throws java.io.IOException
source
- The source representation.bufferSize
- The byte buffer to use.java.io.IOException
protected final void onContent(java.io.InputStream inputStream)
ByteReadingListener
onContent
in class ByteReadingListener
inputStream
- The input stream allowing to retrieve the new content.protected abstract void onContent(java.io.Reader reader)
reader
- The reader allowing to retrieve the new content.Copyright © 2005-2024 Restlet.