Package org.apache.nifi.stream.io.util
Class NonThreadSafeCircularBuffer
java.lang.Object
org.apache.nifi.stream.io.util.NonThreadSafeCircularBuffer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[]
private int
private int
private final byte[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addAndCompare
(byte data) byte[]
int
Returns the oldest byte in the bufferboolean
isFilled()
-
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)
-