XXHash64.
This API is compatible with the block API and 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.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final Checksum | |
| public abstract long | |
| public abstract void | |
| public String | |
| public abstract void |
| seed | back to summary |
|---|---|
| pack-priv final long seed | |
| StreamingXXHash64 | back to summary |
|---|---|
| pack-priv StreamingXXHash64(long seed) | |
| asChecksum | back to summary |
|---|---|
| public final Checksum asChecksum() Return a | |
| getValue | back to summary |
|---|---|
| public abstract long getValue() Get the value of the checksum. | |
| reset | back to summary |
|---|---|
| public abstract void reset() Reset this instance to the state it had right after instantiation. The seed remains unchanged. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| update | back to summary |
|---|---|
| public abstract void update(byte[] buf, int off, int len) Update the value of the hash with buf[off:off+len]. | |
| Modifier and Type | Method and Description |
|---|---|
| public StreamingXXHash64 |
| newStreamingHash | back to summary |
|---|---|
| public StreamingXXHash64 newStreamingHash(long seed) | |