class BitBufferHelper {

    public static long toNumber(byte[] array) {
        long ret = 0;
        long length = array.length;
        int value = 0;
        for (int i = 0; i < length; i++) {
            value = array[i];
            if (value < 0) {
                value += 256;
            }
            ret = ret | (long) value << (length - i - 1) * NetUtils.NUM_BITS_IN_A_BYTE;
        }
        return ret;
    }

    private  BitBufferHelper();

}