Example usage for com.google.common.hash HashFunction hashBytes

List of usage examples for com.google.common.hash HashFunction hashBytes

Introduction

In this page you can find the example usage for com.google.common.hash HashFunction hashBytes.

Prototype

HashCode hashBytes(byte[] input, int off, int len);

Source Link

Document

Shortcut for newHasher().putBytes(input, off, len).hash() .

Usage

From source file:org.apache.accumulo.core.sample.RowSampler.java

@Override
protected HashCode hash(HashFunction hashFunction, Key k) {
    ByteSequence row = k.getRowData();/*from  w w  w.  ja  v a 2s  . c o  m*/
    return hashFunction.hashBytes(row.getBackingArray(), row.offset(), row.length());
}