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