public interface MessageBufferInput
extends java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the input.
|
MessageBuffer |
next()
Returns a next buffer to read.
|
MessageBuffer next() throws java.io.IOException
This 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.
java.io.IOException - when IO error occurred when reading the datavoid close()
throws java.io.IOException
When this method is called, the buffer previously returned from 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.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOException - when IO error occurred when closing the data source