public static long decodeLong ( byte [ ] src , int srcOffset ) throws CorruptEncodingException { try { return ( ( ( long ) ( ( ( src [ srcOffset ] ) << 24 ) | ( ( src [ srcOffset + 1 ] & 0xff ) << 16 ) | ( ( src [ srcOffset + 2 ] & 0xff ) << 8 ) | ( ( src [ srcOffset + 3 ] & 0xff ) ) ) ^ 0x80000000 ) << 32 ) | ( ( ( long ) ( ( ( src [ srcOffset + 4 ] ) << 24 ) | ( ( src [ srcOffset + 5 ] & 0xff ) << 16 ) | ( ( src [ srcOffset + 6 ] & 0xff ) << 8 ) | ( ( src [ srcOffset + 7 ] & 0xff ) ) ) & 0xffffffff L ) ) ; } catch ( IndexOutOfBoundsException e ) { throw new CorruptEncodingException ( null , e ) ; } }
Decodes a signed long from exactly 8 bytes .