public final class CyclicBuffer extends Object
Constructor and Description |
---|
CyclicBuffer(int size)
Creates a new instance of CyclicBuffer.
|
Modifier and Type | Method and Description |
---|---|
int |
add(byte item)
Adds a byte into the buffer.
|
void |
clear()
Resets this buffer.
|
boolean |
compareWith(byte[] buffer)
Compares the content of this buffer with another buffer that must be long enough.
|
long |
getChecksum(Checksum crc)
Calculates the checksum of the stored data with a given algorithm.
|
boolean |
isFull() |
void |
writeTo(DataOutput different) |
public CyclicBuffer(int size)
public int add(byte item)
public void clear()
public boolean compareWith(byte[] buffer)
public long getChecksum(Checksum crc)
public void writeTo(DataOutput different) throws IOException
IOException
public boolean isFull()
Copyright © 2016 Egothor. All Rights Reserved.