{
try {
AppletFormatAdapter afa = new AppletFormatAdapter();
- afa.readFile(args[i], FILE, new IdentifyFile().Identify(args[i], FILE));
+ Runtime r = Runtime.getRuntime();
+ System.gc();
+ long memf = -r.totalMemory()+r.freeMemory();
+ long t1 = -System.currentTimeMillis();
+ Alignment al = afa.readFile(args[i], FILE, new IdentifyFile().Identify(args[i], FILE));
+ t1 +=System.currentTimeMillis();
+ System.gc();
+ memf += r.totalMemory()-r.freeMemory();
+ System.out.println("Read took "+(t1/1000.0)+" seconds.");
+ System.out.println("Difference between free memory now and before is "+(memf/(1024.0*1024.0)*1.0)+" MB");
+
} catch (Exception e)
{
System.err.println("Exception when dealing with "+i+"'th argument: "+args[i]+"\n"+e);