public byte[] read(final int offset){
  final int length=(int)file.length() - offset;
  InputStream in=null;
  if (Cfg.DEBUG) {
    Check.asserts(file != null," (read) Assert failed, null file");
  }
  if (length == 0) {
    return null;
  }
  try {
    in=new BufferedInputStream(new FileInputStream(file),length);
    final byte[] buffer=new byte[length];
    in.skip(offset);
    in.read(buffer,0,length);
    return buffer;
  }
 catch (  final IOException e) {
    if (Cfg.EXCEPTION) {
      Check.log(e);
    }
    if (Cfg.DEBUG) {
      Check.log(e);
    }
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      final IOException e) {
        if (Cfg.EXCEPTION) {
          Check.log(e);
        }
        if (Cfg.DEBUG) {
          Check.log(e);
        }
      }
    }
  }
  return null;
}

public byte [ ] read ( final int offset ) { final int length = ( int ) file . length ( ) - offset ; InputStream in = null ; if ( Cfg . DEBUG ) { Check . asserts ( file != null , " (read) Assert failed, null file" ) ; } if ( length == 0 ) { return null ; } try { in = new BufferedInputStream ( new FileInputStream ( file ) , length ) ; final byte [ ] buffer = new byte [ length ] ; in . skip ( offset ) ; in . read ( buffer , 0 , length ) ; return buffer ; } catch ( final IOException e ) { if ( Cfg . EXCEPTION ) { Check . log ( e ) ; } if ( Cfg . DEBUG ) { Check . log ( e ) ; } } finally { if ( in != null ) { try { in . close ( ) ; } catch ( final IOException e ) { if ( Cfg . EXCEPTION ) { Check . log ( e ) ; } if ( Cfg . DEBUG ) { Check . log ( e ) ; } } } } return null ; }
read the file starting from the offset specified .
