@Deprecated public abstract class ReadingListener extends Object implements SelectionListener
ByteBuffer.| Constructor and Description |
|---|
ReadingListener(ReadableByteChannel byteChannel,
ByteBuffer byteBuffer)
Deprecated.
Constructor.
|
ReadingListener(ReadableByteChannel byteChannel,
int bufferSize)
Deprecated.
Constructor.
|
ReadingListener(Representation source)
Deprecated.
Default constructor.
|
ReadingListener(Representation source,
int bufferSize)
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
onContent(ByteBuffer byteBuffer)
Deprecated.
Callback invoked when new content is available.
|
protected void |
onEnd()
Deprecated.
Callback invoked when the end of the representation has been reached.
|
protected void |
onError(IOException ioe)
Deprecated.
Callback invoked when an IO exception occurs.
|
void |
onSelected(SelectionRegistration selectionRegistration)
Deprecated.
Callback invoked when new content is available.
|
public ReadingListener(ReadableByteChannel byteChannel, ByteBuffer byteBuffer) throws IOException
byteChannel - The source byte channel.byteBuffer - The byte buffer to use.IOExceptionpublic ReadingListener(ReadableByteChannel byteChannel, int bufferSize) throws IOException
byteChannel - The source byte channel.bufferSize - The size of the byte buffer to use.IOExceptionpublic ReadingListener(Representation source) throws IOException
IoUtils.BUFFER_SIZE
length.source - The source representation.IOExceptionpublic ReadingListener(Representation source, int bufferSize) throws IOException
source - The source byte channel.bufferSize - The size of the byte buffer to use.IOExceptionprotected abstract void onContent(ByteBuffer byteBuffer)
byteBuffer - The byte buffer filled with the new content (correctly
flip).protected void onEnd()
protected void onError(IOException ioe)
Level.WARNING level.ioe - The exception caught.public final void onSelected(SelectionRegistration selectionRegistration) throws IOException
onContent(ByteBuffer) method or the onEnd() method or the
onError(IOException) method.onSelected in interface SelectionListenerselectionRegistration - The selected registration.IOExceptionCopyright © 2005–2025. All rights reserved.