Ejemplo n.º 1
0
 public static DatabaseArgs getArgs(
     String uri, long firstRecordIndex, long numRecords, boolean reading, boolean writing)
     throws IOException, ClassNotFoundException {
   DataInputStream in = new DataInputStream(new FileInputStream(uri));
   Util.skipFully((DataInput) in, 16);
   Configuration conf = Configuration.load(in);
   in.close();
   return getArgs(uri, conf, firstRecordIndex, numRecords, reading, writing);
 }
Ejemplo n.º 2
0
 public static int skipHeader(DataInput in) throws IOException {
   Util.skipFully(in, 16);
   int confLength = in.readInt();
   Util.skipFully(in, confLength);
   return 20 + confLength;
 }