publicstaticvoid main(String args[]) throws Exception { // Perform the same test for FileInputStream, FileOutputStream // and RandomAccessFile.
FileInputStream fs = null; // This test attempts to FileInputStream.open(".") // This should fail since . is a directory. try {
fs = new FileInputStream("."); thrownew
Exception("FileInputStream.open should not work on dirs");
} catch (IOException e) {
}
FileOutputStream fos = null; try {
fos = new FileOutputStream("."); thrownew
Exception("FileOutputStream.open should'nt work on dirs");
} catch (IOException e) {
}
RandomAccessFile ras = null; try {
ras = new RandomAccessFile(".","r"); thrownew
Exception("RandomAccessFile.open should'nt work on dirs");
} catch (IOException e) {
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.18 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.