static long getLong ( final byte [ ] arr , final long off ) throws IOException { final int ioff = ( int ) off ; if ( ioff < 0 || ioff > arr . length - 8 ) { throw new IndexOutOfBoundsException ( ) ; } return ( ( arr [ ioff + 7 ] & 0xff L ) << 56 ) // | ( ( arr [ ioff + 6 ] & 0xff L ) << 48 ) // | ( ( arr [ ioff + 5 ] & 0xff L ) << 40 ) // | ( ( arr [ ioff + 4 ] & 0xff L ) << 32 ) // | ( ( arr [ ioff + 3 ] & 0xff L ) << 24 ) // | ( ( arr [ ioff + 2 ] & 0xff L ) << 16 ) // | ( ( arr [ ioff + 1 ] & 0xff L ) << 8 ) // | ( arr [ ioff ] & 0xff L ) ; }
Get a long from a byte array .