-
- All Implemented Interfaces:
-
com.batch.android.msgpack.core.buffer.MessageBufferInput,java.io.Closeable,java.lang.AutoCloseable
public class ByteBufferInput implements MessageBufferInput
MessageBufferInput adapter for java.nio.ByteBuffer
-
-
Constructor Summary
Constructors Constructor Description ByteBufferInput(ByteBuffer input)
-
Method Summary
Modifier and Type Method Description ByteBufferreset(ByteBuffer input)Reset buffer. MessageBuffernext()Returns a next buffer to read. voidclose()Closes the input. -
-
Constructor Detail
-
ByteBufferInput
ByteBufferInput(ByteBuffer input)
-
-
Method Detail
-
reset
ByteBuffer reset(ByteBuffer input)
Reset buffer.
- Parameters:
input- new buffer
-
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.
-
-
-
-