net.jpountz.xxhash
Class StreamingXXHash64
- java.lang.Object
-
- net.jpountz.xxhash.StreamingXXHash64
-
public abstract class StreamingXXHash64 extends java.lang.ObjectStreaming interface forXXHash64.This API is compatible with the
block APIand the following code samples are equivalent:long hash(XXHashFactory xxhashFactory, byte[] buf, int off, int len, long seed) { return xxhashFactory.hash64().hash(buf, off, len, seed); }long hash(XXHashFactory xxhashFactory, byte[] buf, int off, int len, long seed) { StreamingXXHash64 sh64 = xxhashFactory.newStreamingHash64(seed); sh64.update(buf, off, len); return sh64.getValue(); }Instances of this class are not thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description java.util.zip.ChecksumasChecksum()Return aChecksumview of this instance.abstract longgetValue()Get the value of the checksum.abstract voidreset()Reset this instance to the state it had right after instantiation.java.lang.StringtoString()abstract voidupdate(byte[] buf, int off, int len)Update the value of the hash with buf[off:off+len].
-
-
-
Method Detail
-
getValue
public abstract long getValue()
Get the value of the checksum.
-
update
public abstract void update(byte[] buf, int off, int len)Update the value of the hash with buf[off:off+len].
-
reset
public abstract void reset()
Reset this instance to the state it had right after instantiation. The seed remains unchanged.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
asChecksum
public final java.util.zip.Checksum asChecksum()
Return aChecksumview of this instance. Modifications to the view will modify this instance too and vice-versa.
-
-
DMelt 3.0 © DataMelt by jWork.ORG