public class InputStreamBufferInput extends java.lang.Object implements MessageBufferInput
MessageBufferInput adapter for InputStream| Constructor and Description |
|---|
InputStreamBufferInput(java.io.InputStream in) |
InputStreamBufferInput(java.io.InputStream in,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the input.
|
static MessageBufferInput |
newBufferInput(java.io.InputStream in) |
MessageBuffer |
next()
Returns a next buffer to read.
|
java.io.InputStream |
reset(java.io.InputStream in)
Reset Stream.
|
public InputStreamBufferInput(java.io.InputStream in)
public InputStreamBufferInput(java.io.InputStream in,
int bufferSize)
public static MessageBufferInput newBufferInput(java.io.InputStream in)
public java.io.InputStream reset(java.io.InputStream in)
throws java.io.IOException
in - new streamjava.io.IOExceptionpublic MessageBuffer next() throws java.io.IOException
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 MessageBufferInputjava.io.IOException - when IO error occurred when reading the datapublic void close()
throws java.io.IOException
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 MessageBufferInputjava.io.IOException - when IO error occurred when closing the data source