Home All Groups
lz4-java / net / jpountz / xxhash / XXHash32.html /
net.jpountz.xxhash

Class XXHash32

  • java.lang.Object
    • net.jpountz.xxhash.XXHash32

  • public abstract class XXHash32
    extends java.lang.Object
    A 32-bits hash.

    Instances of this class are thread-safe.

    • Constructor Summary

      Constructors 
      Constructor and Description
      XXHash32() 
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      abstract inthash(byte[] buf, int off, int len, int seed)
      Computes the 32-bits hash of buf[off:off+len] using seed seed.
      inthash(java.nio.ByteBuffer buf, int seed)
      Computes the hash of the given ByteBuffer.
      abstract inthash(java.nio.ByteBuffer buf, int off, int len, int seed)
      Computes the hash of the given slice of the ByteBuffer.
      java.lang.StringtoString() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • XXHash32

        public XXHash32()
    • Method Detail

      • hash

        public abstract int hash(byte[] buf,
               int off,
               int len,
               int seed)
        Computes the 32-bits hash of buf[off:off+len] using seed seed.
        Parameters:
        buf - the input data
        off - the start offset in buf
        len - the number of bytes to hash
        seed - the seed to use
        Returns:
        the hash value
      • hash

        public abstract int hash(java.nio.ByteBuffer buf,
               int off,
               int len,
               int seed)
        Computes the hash of the given slice of the ByteBuffer. position and limit are not modified.
        Parameters:
        buf - the input data
        off - the start offset in buf
        len - the number of bytes to hash
        seed - the seed to use
        Returns:
        the hash value
      • hash

        public final int hash(java.nio.ByteBuffer buf,
               int seed)
        Computes the hash of the given ByteBuffer. The position is moved in order to reflect bytes which have been read.
        Parameters:
        buf - the input data
        seed - the seed to use
        Returns:
        the hash value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class  java.lang.Object