Class ByteArrayBuffer

    • Field Detail

      • _buffer

        public byte[] _buffer
      • _offset

        public int _offset
    • Constructor Detail

      • ByteArrayBuffer

        public ByteArrayBuffer​(int length)
      • ByteArrayBuffer

        public ByteArrayBuffer​(byte[] buffer)
    • Method Detail

      • seek

        public void seek​(int offset)
        Description copied from interface: ReadBuffer
        positions the read pointer at the specified position
        Specified by:
        seek in interface ReadBuffer
        Parameters:
        offset - the desired position in the buffer
      • writeBytes

        public void writeBytes​(byte[] bytes)
        Description copied from interface: WriteBuffer
        writes an array of bytes to the buffer
        Specified by:
        writeBytes in interface WriteBuffer
        Parameters:
        bytes - the byte array
      • append

        public void append​(byte[] bytes)
      • containsTheSame

        public final boolean containsTheSame​(ByteArrayBuffer other)
      • copyTo

        public void copyTo​(ByteArrayBuffer to,
                           int fromOffset,
                           int toOffset,
                           int length)
      • read

        public void read​(ObjectContainerBase stream,
                         int address,
                         int addressOffset)
        non-encrypted read, used for indexes
      • readByte

        public byte readByte()
        Description copied from interface: ReadBuffer
        reads a byte from the buffer.
        Specified by:
        readByte in interface ReadBuffer
        Returns:
        the byte
      • readBytes

        public byte[] readBytes​(int a_length)
      • readBytes

        public void readBytes​(byte[] bytes)
        Description copied from interface: ReadBuffer
        reads an array of bytes from the buffer. The length of the array that is passed as a parameter specifies the number of bytes that are to be read. The passed bytes buffer parameter is directly filled.
        Specified by:
        readBytes in interface ReadBuffer
        Parameters:
        bytes - the byte array to read the bytes into.
      • readInt

        public final int readInt()
        Description copied from interface: ReadBuffer
        reads an int from the buffer.
        Specified by:
        readInt in interface ReadBuffer
        Returns:
        the int
      • readLong

        public long readLong()
        Description copied from interface: ReadBuffer
        reads a long from the buffer.
        Specified by:
        readLong in interface ReadBuffer
        Returns:
        the long
      • readPayloadReader

        public ByteArrayBuffer readPayloadReader​(int offset,
                                                 int length)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeBegin

        public void writeBegin​(byte a_identifier)
      • writeBitMap

        public final void writeBitMap​(BitMap4 nullBitMap)
      • writeByte

        public final void writeByte​(byte a_byte)
        Description copied from interface: WriteBuffer
        writes a single byte to the buffer.
        Specified by:
        writeByte in interface WriteBuffer
        Parameters:
        a_byte - the byte
      • writeEnd

        public void writeEnd()
      • writeInt

        public final void writeInt​(int a_int)
        Description copied from interface: WriteBuffer
        writes an int to the buffer.
        Specified by:
        writeInt in interface WriteBuffer
        Parameters:
        a_int - the int
      • writeIDOf

        public void writeIDOf​(Transaction trans,
                              java.lang.Object obj)
      • canWritePersistentBase

        protected boolean canWritePersistentBase()
      • writeShortString

        public void writeShortString​(Transaction trans,
                                     java.lang.String a_string)
      • writeLong

        public void writeLong​(long l)
        Description copied from interface: WriteBuffer
        writes a long to the buffer
        Specified by:
        writeLong in interface WriteBuffer
        Parameters:
        l - the long
      • offset

        public int offset()
        Description copied from interface: ReadBuffer
        returns the current offset in the buffer
        Specified by:
        offset in interface ReadBuffer
        Returns:
        the offset
      • ensureSize

        public void ensureSize​(int size)
      • skip

        public void skip​(int length)
      • checkXBytes

        public void checkXBytes​(boolean flag)
      • checkXBytes

        public boolean checkXBytes()
      • eof

        public boolean eof()
      • remainingByteCount

        public int remainingByteCount()