|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.util.ReadingListener
org.restlet.util.ByteReadingListener
public abstract class ByteReadingListener
Selection listener notifying new content as an InputStream
.
Constructor Summary | |
---|---|
ByteReadingListener(Representation source)
Default constructor. |
|
ByteReadingListener(Representation source,
int bufferSize)
Constructor. |
Method Summary | |
---|---|
protected void |
onContent(ByteBuffer byteBuffer)
Callback invoked when new content is available. |
protected abstract void |
onContent(InputStream inputStream)
Callback invoked when new content is available. |
Methods inherited from class org.restlet.util.ReadingListener |
---|
onEnd, onError, onSelected |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteReadingListener(Representation source) throws IOException
IoUtils.BUFFER_SIZE
length.
source
- The source representation.
IOException
public ByteReadingListener(Representation source, int bufferSize) throws IOException
source
- The source byte channel.bufferSize
- The byte buffer to use.
IOException
Method Detail |
---|
protected final void onContent(ByteBuffer byteBuffer)
onContent
in class ReadingListener
byteBuffer
- The byte buffer filled with the new content (correctly flip).protected abstract void onContent(InputStream inputStream)
inputStream
- The input stream allowing to retrieve the new content.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |