Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Missing LineSeparator documentation

  • Loading branch information...
commit 4869a2868d56ebc00b9031bd84e17ef870e1bad6 1 parent 5d42d71
@rolfl rolfl authored
View
6 core/src/java/org/jdom2/output/Format.java
@@ -71,6 +71,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* See the documentation for {@link TextMode} for details.
* <p>
* <b>Note about Line Separator:</b>
+ * <p>
+ * By default JDOM will always use the CRNL sequence "\r\n" for output. This
+ * can be changed in a number of different ways. See the {@link LineSeparator}
+ * enumeration for more information.
+ *
+ * @see LineSeparator
*
* @author Jason Hunter
* @author Rolf Lear
View
9 core/src/java/org/jdom2/output/LineSeparator.java
@@ -77,6 +77,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* Handling</a>). As a result there is no XML issue with the JDOM default CR/NL
* end-of-line sequence.
* <p>
+ * It should be noted that because JDOM internally stores just a '\n' as a line
+ * separator that any other output separator requires additional processing to
+ * output. There is a distinct performance benefit for using the UNIX, or NL
+ * LineSeparator for output.
+ * <p>
* JDOM has always allowed the line-terminating sequence to be customised (or
* even disabled) for each {@link XMLOutputter} operation by using this Format
* class.
@@ -98,7 +103,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* sequence instead of always CRLF:
* <p>
* <pre>
- * java -D org.jdom2.output.LineSeparator=SYSTEM ...
+ * java -Dorg.jdom2.output.LineSeparator=SYSTEM ...
* </pre>
*
* @since JDOM2
@@ -117,7 +122,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
*/
NL("\n"),
/**
- * The Separator sequence RC which is '\r'.
+ * The Separator sequence CR which is '\r'.
*/
CR("\r"),
Please sign in to comment.
Something went wrong with that request. Please try again.