public abstract class ByteReadingListener extends ReadingListener
InputStream
.Constructor and Description |
---|
ByteReadingListener(Representation source)
Default constructor.
|
ByteReadingListener(Representation source,
int bufferSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
onEnd, onError, onSelected
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
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.Copyright © 2005–2018. All rights reserved.