public IndexFile(final File dir) throws IOException {
  mPrereadArm=PrereadArm.UNKNOWN;
  mPrereadType=PrereadType.UNKNOWN;
  mSdfId=new SdfId(0);
  final File index=new File(dir,SdfFileUtils.INDEX_FILENAME);
  try (DataInputStream indexStream=new DataInputStream(new BufferedInputStream(new FileInputStream(index),FileUtils.BUFFERED_STREAM_SIZE))){
    final PrereadHashFunction headerHash=new PrereadHashFunction();
    version1Load(indexStream,headerHash,dir);
    if (mVersion > VERSION) {
      throw new NoTalkbackSlimException("The SDF " + dir.toString() + " has been created with a newer version of RTG tools and cannot be read with this version.");
    }
    loadVersion3Fields(indexStream,headerHash);
    loadVersion4Fields(indexStream,headerHash,dir);
    loadVersion6Fields(indexStream,headerHash);
    loadVersion8Fields(indexStream,headerHash);
    loadVersion9Fields();
    loadVersion10Fields(indexStream,headerHash);
    loadVersion12Fields(indexStream,headerHash);
    loadVersion13Fields(indexStream,headerHash);
    checksumLoad(indexStream,headerHash,dir);
  }
 catch (  final EOFException e) {
    throw new CorruptSdfException(dir);
  }
}

public IndexFile ( final File dir ) throws IOException { mPrereadArm = PrereadArm . UNKNOWN ; mPrereadType = PrereadType . UNKNOWN ; mSdfId = new SdfId ( 0 ) ; final File index = new File ( dir , SdfFileUtils . INDEX_FILENAME ) ; try ( DataInputStream indexStream = new DataInputStream ( new BufferedInputStream ( new FileInputStream ( index ) , FileUtils . BUFFERED_STREAM_SIZE ) ) ) { final PrereadHashFunction headerHash = new PrereadHashFunction ( ) ; version1Load ( indexStream , headerHash , dir ) ; if ( mVersion > VERSION ) { throw new NoTalkbackSlimException ( "The SDF " + dir . toString ( ) + " has been created with a newer version of RTG tools and cannot be read with this version." ) ; } loadVersion3Fields ( indexStream , headerHash ) ; loadVersion4Fields ( indexStream , headerHash , dir ) ; loadVersion6Fields ( indexStream , headerHash ) ; loadVersion8Fields ( indexStream , headerHash ) ; loadVersion9Fields ( ) ; loadVersion10Fields ( indexStream , headerHash ) ; loadVersion12Fields ( indexStream , headerHash ) ; loadVersion13Fields ( indexStream , headerHash ) ; checksumLoad ( indexStream , headerHash , dir ) ; } catch ( final EOFException e ) { throw new CorruptSdfException ( dir ) ; } }
constructs object , reading in all values from index
