private void loadBinary(InputStream is) throws IOException {
  if (useNewIO && is instanceof FileInputStream) {
    FileInputStream fis=(FileInputStream)is;
    if (useIndexing) {
      loadBinaryIndex(new URL(indexName));
      mapDatabase(fis);
    }
 else {
      loadMappedBinary(fis);
    }
  }
 else {
    DataInputStream dis=new DataInputStream(new BufferedInputStream(is));
    loadBinary(dis);
  }
}

private void loadBinary ( InputStream is ) throws IOException { if ( useNewIO && is instanceof FileInputStream ) { FileInputStream fis = ( FileInputStream ) is ; if ( useIndexing ) { loadBinaryIndex ( new URL ( indexName ) ) ; mapDatabase ( fis ) ; } else { loadMappedBinary ( fis ) ; } } else { DataInputStream dis = new DataInputStream ( new BufferedInputStream ( is ) ) ; loadBinary ( dis ) ; } }
loads a binary file from the input stream . < p / > note that we currently have four ! methods of loading up the database . we were interested in the performance characteristics of the various methods of loading the database so we coded it all up .
