File f = new File(System.getProperty("test.dir", "."), "raf.txt");
f.createNewFile();
f.deleteOnExit();
RandomAccessFile raf = new RandomAccessFile(f, "rw"); if (testRandomAccessFile(raf)) { thrownew Exception("Test failed for some of the operation{s}" + " on RandomAccessFile, check the messages");
}
}
privatestaticboolean testRandomAccessFile(RandomAccessFile r) throws Exception {
r.close(); boolean failed = false; boolean result;
System.out.println("Testing File:" + r); for (OpsAfterClose op : OpsAfterClose.values()) {
result = op.check(r); if (!result) {
failed = true;
}
System.out.println(op + ":" + result);
} if (failed) {
System.out.println("Test failed for the failed operation{s}" + " above for the RandomAccessFile:" + r);
} return failed;
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.38 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.