Class CircularBuffer<T extends CircularBuffer<T>>

    • Constructor Summary

      Constructors 
      Constructor Description
      CircularBuffer​(int size, int maxSize)
      Creates a new circular buffer of the given size.
    • Method Summary

      Modifier and Type Method Description
      int available()
      Data available in the buffer for reading.
      int maxPossibleRemainingCapacity()
      Returns how many more bytes this buffer can receive.
      T putRawBytes​(byte[] source, int offset, int length)
      Writes data to this buffer from the provided array.
      void readRawBytes​(byte[] destination, int offset, int length)
      Reads data from this buffer into the provided array.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CircularBuffer

        public CircularBuffer​(int size,
                              int maxSize)
        Creates a new circular buffer of the given size. The capacity of the buffer is one less than the size/