public static long toLong(byte[] bytes, int offset, final int length) {
        if (length != SIZEOF_LONG || offset + length > bytes.length) {
            throw explainWrongLengthOrOffset(bytes, offset, length, SIZEOF_LONG);
        }
        return ConverterHolder.BEST_CONVERTER.toLong(bytes, offset, length);
    }
Converts a byte array to a long value.

@param bytes  array of bytes
@param offset offset into array
@param length length of data (must be {@link #SIZEOF_LONG})
@return the long value
@throws IllegalArgumentException if length is not {@link #SIZEOF_LONG} or if there's not enough
                                 room in the array at the offset indicated.
stroom-bytebuffer/src/main/java/stroom/bytebuffer/hbase/Bytes.java