Example #1
0
 private static void benchStream() {
   try {
     boolean[] b = {false, true};
     for (boolean buffered : b) {
       File file = File.createTempFile("junk", "dat");
       file.deleteOnExit();
       // File file = new File("junk.dat");
       benchStream(file, buffered);
     }
   } catch (IOException ioe) {
     throw new RuntimeException(ioe);
   }
 }
Example #2
0
 private static void bench(ByteOrder order) {
   System.out.println("order=" + order);
   int n = 1000000;
   try {
     File file = File.createTempFile("junk", "dat");
     file.deleteOnExit();
     ArrayFile af = new ArrayFile(file, "rw", order, order);
     benchFloat(af, n);
     benchDouble(af, n);
     af.close();
   } catch (IOException ioe) {
     throw new RuntimeException(ioe);
   }
 }