public class RollingChecksum
extends java.lang.Object
Constructor and Description |
---|
RollingChecksum(java.nio.channels.ReadableByteChannel readableByteChannel,
int blockLength) |
Modifier and Type | Method and Description |
---|---|
int |
currentBlockLength() |
protected void |
generateWeakChecksum() |
byte |
getFirstByte()
Returns the first byte of data in the current block.
|
int |
getPosition()
Returns the position of the start of the current block in the file.
|
boolean |
hasNext() |
void |
nextBlock() |
void |
nextByte() |
byte[] |
strongChecksum()
Returns the strong checksum of the current block.
|
int |
weakChecksum()
Returns the weak checksum of the current block.
|
public RollingChecksum(java.nio.channels.ReadableByteChannel readableByteChannel, int blockLength) throws java.io.IOException
java.io.IOException
public int currentBlockLength()
public byte getFirstByte()
public int getPosition()
public boolean hasNext() throws java.io.IOException
java.io.IOException
public void nextBlock() throws java.io.IOException
java.io.IOException
public void nextByte() throws java.io.IOException
java.io.IOException
public byte[] strongChecksum()
public int weakChecksum()
protected void generateWeakChecksum() throws java.io.IOException
java.io.IOException