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