Top Description Inners Fields Constructors Methods
net.jpountz.xxhash

public abstract Class StreamingXXHash64

extends Object
Class Inheritance
Known Direct Subclasses
net.jpountz.xxhash.StreamingXXHash64JNI, net.jpountz.xxhash.AbstractStreamingXXHash64Java
Imports
java.util.zip.Checksum

Streaming interface for 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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface

Field Summary

Modifier and TypeField and Description
pack-priv final long

Constructor Summary

AccessConstructor and Description
pack-priv
StreamingXXHash64(long seed)

Method Summary

Modifier and TypeMethod and Description
public final Checksum
asChecksum()

Return a Checksum view of this instance.

public abstract long
getValue()

Get the value of the checksum.

public abstract void
reset()

Reset this instance to the state it had right after instantiation.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public abstract void
update(byte[] buf, int off, int len)

Update the value of the hash with buf[off:off+len].

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

seedback to summary
pack-priv final long seed

Constructor Detail

StreamingXXHash64back to summary
pack-priv StreamingXXHash64(long seed)

Method Detail

asChecksumback to summary
public final Checksum asChecksum()

Return a Checksum view of this instance. Modifications to the view will modify this instance too and vice-versa.

getValueback to summary
public abstract long getValue()

Get the value of the checksum.

resetback to summary
public abstract void reset()

Reset this instance to the state it had right after instantiation. The seed remains unchanged.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
updateback to summary
public abstract void update(byte[] buf, int off, int len)

Update the value of the hash with buf[off:off+len].

net.jpountz.xxhash back to summary

pack-priv Interface StreamingXXHash64.Factory

Known Direct Implementers
net.jpountz.xxhash.StreamingXXHash64JNI.Factory

Method Summary

Modifier and TypeMethod and Description
public StreamingXXHash64
newStreamingHash(long seed)

Method Detail

newStreamingHashback to summary
public StreamingXXHash64 newStreamingHash(long seed)