-
- All Implemented Interfaces:
-
com.batch.android.msgpack.core.buffer.MessageBufferInput,java.io.Closeable,java.lang.AutoCloseable
public class InputStreamBufferInput implements MessageBufferInput
MessageBufferInput adapter for InputStream
-
-
Constructor Summary
Constructors Constructor Description InputStreamBufferInput(InputStream in)InputStreamBufferInput(InputStream in, int bufferSize)
-
Method Summary
Modifier and Type Method Description static MessageBufferInputnewBufferInput(InputStream in)InputStreamreset(InputStream in)Reset Stream. MessageBuffernext()Returns a next buffer to read. voidclose()Closes the input. -
-
Constructor Detail
-
InputStreamBufferInput
InputStreamBufferInput(InputStream in)
-
InputStreamBufferInput
InputStreamBufferInput(InputStream in, int bufferSize)
-
-
Method Detail
-
newBufferInput
static MessageBufferInput newBufferInput(InputStream in)
-
reset
InputStream reset(InputStream in)
Reset Stream. This method doesn't close the old resource.
- Parameters:
in- new stream
-
next
MessageBuffer next()
Returns a next buffer to read.
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.
-
-
-
-