public class ChannelBufferInput extends java.lang.Object implements MessageBufferInput
MessageBufferInput adapter for ReadableByteChannel| Constructor and Description |
|---|
ChannelBufferInput(java.nio.channels.ReadableByteChannel channel) |
ChannelBufferInput(java.nio.channels.ReadableByteChannel channel,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
MessageBuffer |
next()
Get a next buffer to read.
|
java.nio.channels.ReadableByteChannel |
reset(java.nio.channels.ReadableByteChannel channel)
Reset channel.
|
public ChannelBufferInput(java.nio.channels.ReadableByteChannel channel)
public ChannelBufferInput(java.nio.channels.ReadableByteChannel channel,
int bufferSize)
public java.nio.channels.ReadableByteChannel reset(java.nio.channels.ReadableByteChannel channel)
throws java.io.IOException
channel - new channeljava.io.IOExceptionpublic MessageBuffer next() throws java.io.IOException
MessageBufferInputWhen this method is called, the formally allocated buffer can be safely discarded.
next in interface MessageBufferInputjava.io.IOException - when error occurred when reading the datapublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException