static void b2lBig(byte[] in,int inOfs,long[] out,int outOfs,int len){
  if ((inOfs < 0) || ((in.length - inOfs) < len) || (outOfs < 0)|| ((out.length - outOfs) < len / 8)) {
    throw new ArrayIndexOutOfBoundsException();
  }
  if (littleEndianUnaligned) {
    inOfs+=byteArrayOfs;
    len+=inOfs;
    while (inOfs < len) {
      out[outOfs++]=reverseBytes(unsafe.getLong(in,(long)inOfs));
      inOfs+=8;
    }
  }
 else   if (bigEndian && ((inOfs & 3) == 0)) {
    inOfs+=byteArrayOfs;
    len+=inOfs;
    while (inOfs < len) {
      out[outOfs++]=((long)unsafe.getInt(in,(long)inOfs) << 32) | (unsafe.getInt(in,(long)(inOfs + 4)) & 0xffffffffL);
      inOfs+=8;
    }
  }
 else {
    len+=inOfs;
    while (inOfs < len) {
      int i1=((in[inOfs + 3] & 0xff)) | ((in[inOfs + 2] & 0xff) << 8) | ((in[inOfs + 1] & 0xff) << 16)| ((in[inOfs]) << 24);
      inOfs+=4;
      int i2=((in[inOfs + 3] & 0xff)) | ((in[inOfs + 2] & 0xff) << 8) | ((in[inOfs + 1] & 0xff) << 16)| ((in[inOfs]) << 24);
      out[outOfs++]=((long)i1 << 32) | (i2 & 0xffffffffL);
      inOfs+=4;
    }
  }
}

static void b2lBig ( byte [ ] in , int inOfs , long [ ] out , int outOfs , int len ) { if ( ( inOfs < 0 ) || ( ( in . length - inOfs ) < len ) || ( outOfs < 0 ) || ( ( out . length - outOfs ) < len / 8 ) ) { throw new ArrayIndexOutOfBoundsException ( ) ; } if ( littleEndianUnaligned ) { inOfs += byteArrayOfs ; len += inOfs ; while ( inOfs < len ) { out [ outOfs ++ ] = reverseBytes ( unsafe . getLong ( in , ( long ) inOfs ) ) ; inOfs += 8 ; } } else if ( bigEndian && ( ( inOfs & 3 ) == 0 ) ) { inOfs += byteArrayOfs ; len += inOfs ; while ( inOfs < len ) { out [ outOfs ++ ] = ( ( long ) unsafe . getInt ( in , ( long ) inOfs ) << 32 ) | ( unsafe . getInt ( in , ( long ) ( inOfs + 4 ) ) & 0xffffffffL ) ; inOfs += 8 ; } } else { len += inOfs ; while ( inOfs < len ) { int i1 = ( ( in [ inOfs + 3 ] & 0xff ) ) | ( ( in [ inOfs + 2 ] & 0xff ) << 8 ) | ( ( in [ inOfs + 1 ] & 0xff ) << 16 ) | ( ( in [ inOfs ] ) << 24 ) ; inOfs += 4 ; int i2 = ( ( in [ inOfs + 3 ] & 0xff ) ) | ( ( in [ inOfs + 2 ] & 0xff ) << 8 ) | ( ( in [ inOfs + 1 ] & 0xff ) << 16 ) | ( ( in [ inOfs ] ) << 24 ) ; out [ outOfs ++ ] = ( ( long ) i1 << 32 ) | ( i2 & 0xffffffffL ) ; inOfs += 4 ; } } }
byte [ ] to long [ ] conversion , big endian byte order .
