Class ByteBuffer


  • public class ByteBuffer
    extends java.lang.Object
    This class represents a variable-length buffer for bytes.
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteBuffer()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendByte​(byte b)
      Add a byte to the buffer at the end.
      void clear()
      Clear the buffer.
      byte readByte​(int position)
      Read a byte from the buffer from the specified place.
      int size()
      Get the current buffer length.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • arrayOfArrays

        protected final java.util.List<byte[]> arrayOfArrays
      • totalBytes

        protected int totalBytes
      • currentIndex

        protected int currentIndex
      • currentBuffer

        protected byte[] currentBuffer
    • Constructor Detail

      • ByteBuffer

        public ByteBuffer()
        Constructor
    • Method Detail

      • clear

        public void clear()
        Clear the buffer.
      • size

        public int size()
        Get the current buffer length.
      • appendByte

        public void appendByte​(byte b)
        Add a byte to the buffer at the end.
      • readByte

        public byte readByte​(int position)
        Read a byte from the buffer from the specified place.