gather a partial long from the specified index using the specified number
of bytes into the byte array
19838
private static final long gatherPartialLongLE(final byte[] data, final int index, final int available) {
        if(available >= 4) {
            int i = gatherIntLE(data, index);
            long l = uintToLong(i);

            int left = available - 4;

            if(left == 0) {
                return l;
            }

            int i2 = gatherPartialIntLE(data, index + 4, left);

            l <<= (left << 3);
            l |= (long) i2;

            return l;
        } else {
            return (long) gatherPartialIntLE(data, index, available);
        }
    }
599430
public long getLong(int index) throws JSONException {
        Object object = this.get(index);
        try {
            return object instanceof Number ? ((Number) object).longValue()
                    : Long.parseLong((String) object);
        } catch (Exception e) {
            throw new JSONException("JSONArray[" + index + "] is not a number.");
        }
    }
734913
public long getKeyAsLong(int index) throws IOException {
        if (index >= structure.keySizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        return Bytes.toLong(key, structure.keyByteOffsets.get(index));
    }
148359
@Override
    public byte[] getBytes(int index) {
        String b64String = rows.get(row).getString(index);
        return Base64.getDecoder().decode(b64String);
    }
356529
public void setLong(int index, long value)
    {
        checkPositionIndexes(index, index + SIZE_OF_LONG, this.length);
        index += offset;
        data[index] = (byte) (value);
        data[index + 1] = (byte) (value >>> 8);
        data[index + 2] = (byte) (value >>> 16);
        data[index + 3] = (byte) (value >>> 24);
        data[index + 4] = (byte) (value >>> 32);
        data[index + 5] = (byte) (value >>> 40);
        data[index + 6] = (byte) (value >>> 48);
        data[index + 7] = (byte) (value >>> 56);
    }
1201373
long getLong(final long off) throws IOException, InterruptedException {
        if (off < 0 || off > zipFileSlice.len - 8) {
            throw new IndexOutOfBoundsException();
        }
        if (read(off, scratch, 0, 8) < 8) {
            throw new EOFException("Unexpected EOF");
        }
        return ((scratch[7] & 0xffL) << 56) //
                | ((scratch[6] & 0xffL) << 48) //
                | ((scratch[5] & 0xffL) << 40) //
                | ((scratch[4] & 0xffL) << 32) //
                | ((scratch[3] & 0xffL) << 24) //
                | ((scratch[2] & 0xffL) << 16) //
                | ((scratch[1] & 0xffL) << 8) //
                | (scratch[0] & 0xffL);
    }
734343
public static long getLongBE(final byte[] array, final int offset) {
    return  ( array[offset + 7] & 0XFFL       )
          | ((array[offset + 6] & 0XFFL) <<  8)
          | ((array[offset + 5] & 0XFFL) << 16)
          | ((array[offset + 4] & 0XFFL) << 24)
          | ((array[offset + 3] & 0XFFL) << 32)
          | ((array[offset + 2] & 0XFFL) << 40)
          | ((array[offset + 1] & 0XFFL) << 48)
          | ((array[offset    ] & 0XFFL) << 56);
  }
302121
private byte[] fromLong(long data)
    {
        return new byte[] { (byte) ((data >> 56) & 0xff), (byte) ((data >> 48) & 0xff), (byte) ((data >> 40) & 0xff),
                (byte) ((data >> 32) & 0xff), (byte) ((data >> 24) & 0xff), (byte) ((data >> 16) & 0xff),
                (byte) ((data >> 8) & 0xff), (byte) ((data >> 0) & 0xff), };
    }
586446
@SuppressWarnings ("WeakerAccess")
    public Long getLong (int index) {
        String string = getString (index);
        return (string != null) ? Long.parseLong (string) : null;
    }
664442
public static void longToBytes(long value, byte[] bytes, int offset) {
        for (int i = offset + 7; i >= offset; --i) {
            bytes[i] = (byte) value;
            value = value >> 8;
        }
    }
210620
private long fourByteToLong(byte[] bytes, int offset) {
        return (byteToLong(bytes[offset + 0])
                + (byteToLong(bytes[offset + 1]) << 8)
                + (byteToLong(bytes[offset + 2]) << 16)
                + (byteToLong(bytes[offset + 3]) << 24));
    }
914638
static int getShort(final byte[] arr, final long off) throws IndexOutOfBoundsException {
        final int ioff = (int) off;
        if (ioff < 0 || ioff > arr.length - 2) {
            throw new IndexOutOfBoundsException();
        }
        return ((arr[ioff + 1] & 0xff) << 8) | (arr[ioff] & 0xff);
    }
786360
public static long readUnsignedIntLittleEndian(byte[] data, int index) {
        long result = (long) (data[index] & 0xFF) | (long) ((data[index + 1] & 0xFF) << 8)
                      | (long) ((data[index + 2] & 0xFF) << 16) | (long) ((data[index + 3] & 0xFF) << 24);
        return result;
    }
100253
def _long_from_raw(thehash):
    """"""
    hashnum = 0
    for h in thehash:
        hashnum <<= 8
        hashnum |= ord(bytes([h]))
    return hashnum
390860
public static long parseLong(byte[] bytes, int from, int to) {
        long result = 0;
        for (int i = from; i < to && i < bytes.length; i++) {
            result *= 10;
            result += (bytes[i] - (byte) '0');
        }
        return result;
    }
11232
public boolean get(long index) {
    if (!(index < size))
      throw new IndexOutOfBoundsException();
    return (bytes.readLong(offset(index)) & (1l << (position(index)))) != 0;
  }
1342012
@Override
    public Long getLong(int index) {
        indexCheck();
        return rows.get(row).getLong(index);
    }