public LongFileGetterInMemory(File file) throws IOException {
  limit=file.length() / 8;
  data=new long[(int)((limit >>> BITS)) + 1][];
  final int length0=(1 << BITS);
  for (int i=0; i < data.length; i++) {
    int length=(i < data.length - 1 ? length0 : (int)(limit & BIT_MASK) + 1);
    data[i]=new long[length];
  }
  try (BufferedInputStream ins=new BufferedInputStream(new FileInputStream(file));ProgressPercentage progress=new ProgressPercentage("Reading file: " + file,limit)){
    int whichArray=0;
    int indexInArray=0;
    for (long index=0; index < limit; index++) {
      data[whichArray][indexInArray]=(((long)ins.read()) << 56) | (((long)ins.read()) << 48) | (((long)ins.read()) << 40)| (((long)ins.read()) << 32)| (((long)ins.read()) << 24)| (((long)ins.read() & 0xFF) << 16)| (((long)ins.read() & 0xFF) << 8)| (((long)ins.read() & 0xFF));
      if (++indexInArray == length0) {
        whichArray++;
        indexInArray=0;
      }
      progress.setProgress(index);
    }
  }
 }

public LongFileGetterInMemory ( File file ) throws IOException { limit = file . length ( ) / 8 ; data = new long [ ( int ) ( ( limit > > > BITS ) ) + 1 ] [ ] ; final int length0 = ( 1 << BITS ) ; for ( int i = 0 ; i < data . length ; i ++ ) { int length = ( i < data . length - 1 ? length0 : ( int ) ( limit & BIT_MASK ) + 1 ) ; data [ i ] = new long [ length ] ; } try ( BufferedInputStream ins = new BufferedInputStream ( new FileInputStream ( file ) ) ; ProgressPercentage progress = new ProgressPercentage ( "Reading file: " + file , limit ) ) { int whichArray = 0 ; int indexInArray = 0 ; for ( long index = 0 ; index < limit ; index ++ ) { data [ whichArray ] [ indexInArray ] = ( ( ( long ) ins . read ( ) ) << 56 ) | ( ( ( long ) ins . read ( ) ) << 48 ) | ( ( ( long ) ins . read ( ) ) << 40 ) | ( ( ( long ) ins . read ( ) ) << 32 ) | ( ( ( long ) ins . read ( ) ) << 24 ) | ( ( ( long ) ins . read ( ) & 0xFF ) << 16 ) | ( ( ( long ) ins . read ( ) & 0xFF ) << 8 ) | ( ( ( long ) ins . read ( ) & 0xFF ) ) ; if ( ++ indexInArray == length0 ) { whichArray ++ ; indexInArray = 0 ; } progress . setProgress ( index ) ; } } }
long file getter in memory
