Package 

Class ArrayBufferInput

  • All Implemented Interfaces:
    com.batch.android.msgpack.core.buffer.MessageBufferInput , java.io.Closeable , java.lang.AutoCloseable

    
    public class ArrayBufferInput
     implements MessageBufferInput
                        

    MessageBufferInput adapter for byte arrays

    • Constructor Detail

      • ArrayBufferInput

        ArrayBufferInput(Array<byte> arr)
      • ArrayBufferInput

        ArrayBufferInput(Array<byte> arr, int offset, int length)
    • Method Detail

      • reset

         void reset(Array<byte> arr, int offset, int len)
      • 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.

      • close

         void close()

        Closes the input.

        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.