/* Note: this regression test only detects incorrect line *separatoronplatformrunningthetest
*/
publicclass SaveSeparator {
publicstaticvoid main(String[] argv) throws IOException { // Save a property set
Properties myProps = new Properties();
ByteArrayOutputStream myOut = new ByteArrayOutputStream(40);
myProps.store(myOut, "A test");
// Examine the result to verify that line.separator was used
String theSeparator = System.getProperty("line.separator");
String content = myOut.toString(); if (!content.endsWith(theSeparator)) thrownew RuntimeException("Incorrect Properties line separator.");
}
}
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.