Class FlashJournalRM.Buffer

  • Enclosing class:
    FlashJournalRM

    protected static class FlashJournalRM.Buffer
    extends Object
    A Buffer is a handy shell with some helper methods around a byte[] and a ByteBuffer.
    • Constructor Detail

      • Buffer

        public Buffer​(int cbBuffer)
        Instantiate a buffer.
        Parameters:
        cbBuffer - the size of the buffer
    • Method Detail

      • getByteArray

        public byte[] getByteArray()
        Obtain the underlying byte[].
        Returns:
        the byte[] for this buffer
      • getByteBuffer

        public ByteBuffer getByteBuffer()
        Obtain the ByteBuffer for this buffer.
        Returns:
        an NIO ByteBuffer for the underlying byte[]
      • setOverlay

        public void setOverlay​(byte[] abOv)
        Specify an overlay byte[].
        Parameters:
        abOv - the overlay byte[]
      • render

        public void render​(Binary bin,
                           int of)
        Copy the passed Binary value into the buffer at the specified offset and using the passed overlay.
        Parameters:
        bin - the Binary value to copy into this buffer
        of - the offset of this buffer to copy the passed Binary to
      • getNext

        public FlashJournalRM.Buffer getNext()
        Get the next buffer in a linked list of buffers. This is used by the pool implementation.
        Returns:
        the next buffer in a linked list of buffers
      • setNext

        public void setNext​(FlashJournalRM.Buffer buf)
        Set the next buffer in a linked list of buffers. This is used by the pool implementation.
        Parameters:
        buf - the next buffer in a linked list of buffers