public class ByteBufferInput extends java.lang.Object implements MessageBufferInput
MessageBufferInput adapter for ByteBuffer| Constructor and Description |
|---|
ByteBufferInput(java.nio.ByteBuffer input) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the input.
|
MessageBuffer |
next()
Returns a next buffer to read.
|
java.nio.ByteBuffer |
reset(java.nio.ByteBuffer input)
Reset buffer.
|
public java.nio.ByteBuffer reset(java.nio.ByteBuffer input)
input - new bufferpublic MessageBuffer next()
MessageBufferInputThis method should return a MessageBuffer instance that has data filled in. When this method is called twice, the previously returned buffer is no longer used. Thus implementation of this method can safely discard it. This is useful when it uses a memory pool.
next in interface MessageBufferInputpublic void close()
MessageBufferInput
When this method is called, the buffer previously returned from MessageBufferInput.next() method is no longer used.
Thus implementation of this method can safely discard it.
If the input is already closed then invoking this method has no effect.
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface MessageBufferInput