XXHash32.
This API is compatible with the block API and the following
code samples are equivalent:
int hash(XXHashFactory xxhashFactory, byte[] buf, int off, int len, int seed) {
return xxhashFactory.hash32().hash(buf, off, len, seed);
}
int hash(XXHashFactory xxhashFactory, byte[] buf, int off, int len, int seed) {
StreamingXXHash32 sh32 = xxhashFactory.newStreamingHash32(seed);
sh32.update(buf, off, len);
return sh32.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 int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final Checksum | |
| public abstract int | |
| public abstract void | |
| public String | |
| public abstract void |
| seed | back to summary |
|---|---|
| pack-priv final int seed | |
| StreamingXXHash32 | back to summary |
|---|---|
| pack-priv StreamingXXHash32(int seed) | |
| asChecksum | back to summary |
|---|---|
| public final Checksum asChecksum() Return a | |
| getValue | back to summary |
|---|---|
| public abstract int 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 StreamingXXHash32 |
| newStreamingHash | back to summary |
|---|---|
| public StreamingXXHash32 newStreamingHash(int seed) | |