Class NonThreadSafeCircularBuffer

java.lang.Object
org.apache.nifi.stream.io.util.NonThreadSafeCircularBuffer

public class NonThreadSafeCircularBuffer extends Object
  • Field Details

    • lookingFor

      private final byte[] lookingFor
    • buffer

      private final int[] buffer
    • insertionPointer

      private int insertionPointer
    • bufferSize

      private int bufferSize
  • Constructor Details

    • NonThreadSafeCircularBuffer

      public NonThreadSafeCircularBuffer(byte[] lookingFor)
  • Method Details

    • getByteArray

      public byte[] getByteArray()
    • getOldestByte

      public int getOldestByte()
      Returns the oldest byte in the buffer
      Returns:
      the oldest byte
    • isFilled

      public boolean isFilled()
    • addAndCompare

      public boolean addAndCompare(byte data)