// write a single space to the test file
FileOutputStream fos = new FileOutputStream(file);
fos.write(' ');
fos.close();
// test empty properties
Properties prop1 = new Properties();
// now load the file we just created, into a // properties object. // the properties object should have no elements, // but due to a bug, it has an empty key/value. // key = "", value = ""
Properties prop2 = new Properties();
InputStream is = new FileInputStream(file); try {
prop2.load(is);
} finally {
is.close();
} if (!prop1.equals(prop2)) thrownew RuntimeException("Incorrect properties loading.");
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.