Interface Buffer

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int limit()  
      void limit​(int newLimit)
      Change the buffer's limit
      byte readByte​(int index)
      Read byte from the buffer at index.
      int readInt​(int index)
      Read int from the buffer at index.
      short readShort​(int index)
      Read short from the buffer at index.
      void writeByte​(int index, byte value)
      Write byte to the buffer at index.
      void writeInt​(int index, int value)
      Write int to the buffer at index.
      void writeShort​(int index, short value)
      Write int to the buffer at index.
    • Method Detail

      • readByte

        byte readByte​(int index)
        Read byte from the buffer at index.
        8bit integer (00)
        Parameters:
        index - index to read from
        Returns:
        the byte value at the index.
      • writeByte

        void writeByte​(int index,
                       byte value)
        Write byte to the buffer at index.
        8bit integer (00)
        Parameters:
        index - index to write to
        value - to be written
      • readShort

        short readShort​(int index)
        Read short from the buffer at index.
        16bit integer (00 00)
        Parameters:
        index - index to read from
        Returns:
        the short value at index.
      • writeShort

        void writeShort​(int index,
                        short value)
        Write int to the buffer at index.
        16bit integer (00 00)
        Parameters:
        index - index to write to
        value - to be written
      • readInt

        int readInt​(int index)
        Read int from the buffer at index.
        32bit integer (00 00 00 00)
        Parameters:
        index - index to read from
        Returns:
        the int value at index.
      • writeInt

        void writeInt​(int index,
                      int value)
        Write int to the buffer at index.
        32bit integer (00 00 00 00)
        Parameters:
        index - index to write to
        value - to be written
      • limit

        int limit()
        Returns:
        the buffer's limit
      • limit

        void limit​(int newLimit)
        Change the buffer's limit
        Parameters:
        newLimit - the new limit