org.restlet.util
Class StringReadingListener
java.lang.Object
org.restlet.util.ReadingListener
org.restlet.util.ByteReadingListener
org.restlet.util.CharacterReadingListener
org.restlet.util.StringReadingListener
- All Implemented Interfaces:
- SelectionListener
public abstract class StringReadingListener
- extends CharacterReadingListener
Selection listener notifying new content as a string.
- Author:
- Jerome Louvel
Method Summary |
protected void |
onContent(Reader reader)
Callback invoked when new content is available. |
protected abstract void |
onContent(String content)
Callback invoked when new content is available. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringReadingListener
public StringReadingListener(Representation source)
throws IOException
- Default constructor. Uses a byte buffer of
IoUtils.BUFFER_SIZE
length.
- Parameters:
source
- The source representation.
- Throws:
IOException
StringReadingListener
public StringReadingListener(Representation source,
int bufferSize)
throws IOException
- Constructor. Uses a byte buffer of a given size.
- Parameters:
source
- The source representation.bufferSize
- The byte buffer to use.
- Throws:
IOException
onContent
protected final void onContent(Reader reader)
- Description copied from class:
CharacterReadingListener
- Callback invoked when new content is available.
- Specified by:
onContent
in class CharacterReadingListener
- Parameters:
reader
- The reader allowing to retrieve the new content.
onContent
protected abstract void onContent(String content)
- Callback invoked when new content is available.
- Parameters:
content
- The new content.
Copyright © 2005-2013 Restlet.