com.nothome.delta.text
Class Checksum
java.lang.Object
com.nothome.delta.text.Checksum
public class Checksum
- extends Object
Checksum that uses character streams.
Field Summary |
protected gnu.trove.TLongIntHashMap |
checksums
|
static boolean |
debug
|
Constructor Summary |
Checksum(Readable source,
int chunkSize)
Initialize checksums for source. |
debug
public static boolean debug
checksums
protected gnu.trove.TLongIntHashMap checksums
Checksum
public Checksum(Readable source,
int chunkSize)
throws IOException
- Initialize checksums for source. The checksum for the
chunkSize
bytes at offset
chunkSize
* i is inserted into an array at index i.
- Throws:
IOException
queryChecksum
public static long queryChecksum(CharBuffer bb,
int len)
- Marks, gets, then resets the checksum computed from the buffer.
incrementChecksum
public static long incrementChecksum(long checksum,
char out,
char in,
int chunkSize)
findChecksumIndex
public int findChecksumIndex(long hashf)
toString
public String toString()
- Returns a debug
String
.
- Overrides:
toString
in class Object
Copyright © 2003-2008. All Rights Reserved.