public static long readLong ( byte [ ] array , int offset ) { // First make integers to resolve signed vs. unsigned issues. long b0 = array [ offset + 0 ] ; long b1 = array [ offset + 1 ] & 0xFF ; long b2 = array [ offset + 2 ] & 0xFF ; long b3 = array [ offset + 3 ] & 0xFF ; long b4 = array [ offset + 4 ] & 0xFF ; int b5 = array [ offset + 5 ] & 0xFF ; int b6 = array [ offset + 6 ] & 0xFF ; int b7 = array [ offset + 7 ] & 0xFF ; return ( ( b0 << 56 ) + ( b1 << 48 ) + ( b2 << 40 ) + ( b3 << 32 ) + ( b4 << 24 ) + ( b5 << 16 ) + ( b6 << 8 ) + ( b7 << 0 ) ) ; }
Read a long from the byte array at the given offset .