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(InputStream inputStream)
Callback invoked when new content is available.
|
protected abstract void |
onContent(Reader reader)
Callback invoked when new content is available.
|
onContent
onEnd, onError, onSelected
public CharacterReadingListener(Representation source) throws IOException
IoUtils.BUFFER_SIZE
length.source
- The source representation.IOException
public CharacterReadingListener(Representation source, int bufferSize) throws IOException
source
- The source representation.bufferSize
- The byte buffer to use.IOException
protected final void onContent(InputStream inputStream)
ByteReadingListener
onContent
in class ByteReadingListener
inputStream
- The input stream allowing to retrieve the new content.protected abstract void onContent(Reader reader)
reader
- The reader allowing to retrieve the new content.Copyright © 2005–2017. All rights reserved.