Documentation of 'net.jpountz.xxhash.StreamingXXHash32' Java class
StreamingXXHash32
net.jpountz.xxhash

Class StreamingXXHash32



  • public abstract class StreamingXXHash32
    extends java.lang.Object
    Streaming interface for 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.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.zip.Checksum asChecksum()
      Return a Checksum view of this instance.
      abstract int getValue()
      Get the value of the checksum.
      abstract void reset()
      Reset this instance to the state it had right after instantiation.
      java.lang.String toString() 
      abstract void update(byte[] buf, int off, int len)
      Update the value of the hash with buf[off:off+len].
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getValue

        public abstract int 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:
        toString in class java.lang.Object
      • asChecksum

        public final java.util.zip.Checksum asChecksum()
        Return a Checksum view of this instance. Modifications to the view will modify this instance too and vice-versa.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.