public abstract class XXHash32
extends java.lang.Object
Instances of this class are thread-safe.
Constructor and Description |
---|
XXHash32() |
Modifier and Type | Method and Description |
---|---|
abstract int |
hash(byte[] buf,
int off,
int len,
int seed)
Computes the 32-bits hash of
buf[off:off+len] using seed
seed . |
int |
hash(java.nio.ByteBuffer buf,
int seed)
Computes the hash of the given
ByteBuffer . |
abstract int |
hash(java.nio.ByteBuffer buf,
int off,
int len,
int seed)
Computes the hash of the given slice of the
ByteBuffer . |
java.lang.String |
toString() |
public abstract int hash(byte[] buf, int off, int len, int seed)
buf[off:off+len]
using seed
seed
.buf
- the input dataoff
- the start offset in buflen
- the number of bytes to hashseed
- the seed to usepublic abstract int hash(java.nio.ByteBuffer buf, int off, int len, int seed)
ByteBuffer
.
position
and limit
are not modified.buf
- the input dataoff
- the start offset in buflen
- the number of bytes to hashseed
- the seed to usepublic final int hash(java.nio.ByteBuffer buf, int seed)
ByteBuffer
. The
position
is moved in order to reflect bytes
which have been read.buf
- the input dataseed
- the seed to usepublic java.lang.String toString()
toString
in class java.lang.Object