From 71f936debf8c1fe1df0db86302a13a02064928ca Mon Sep 17 00:00:00 2001 From: joehni Date: Wed, 27 Sep 2023 23:49:29 +0200 Subject: [PATCH] Add Javadoc for new modes of PrettyPrintWriter. --- xstream-distribution/src/content/changes.html | 7 +++++++ .../xstream/io/xml/PrettyPrintWriter.java | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/xstream-distribution/src/content/changes.html b/xstream-distribution/src/content/changes.html index e50fb725c..44ae5077e 100644 --- a/xstream-distribution/src/content/changes.html +++ b/xstream-distribution/src/content/changes.html @@ -42,6 +42,13 @@

Minor changes

  • GHI:#342: Optimize internal handling of children in DomReader avoiding O(n²) access times for siblings (by Shiang-Yun Yang).
  • +

    API changes

    + + +

    1.4.20

    Released December 24, 2022.

    diff --git a/xstream/src/java/com/thoughtworks/xstream/io/xml/PrettyPrintWriter.java b/xstream/src/java/com/thoughtworks/xstream/io/xml/PrettyPrintWriter.java index cb8f4d0ce..8916d9d32 100644 --- a/xstream/src/java/com/thoughtworks/xstream/io/xml/PrettyPrintWriter.java +++ b/xstream/src/java/com/thoughtworks/xstream/io/xml/PrettyPrintWriter.java @@ -51,10 +51,21 @@ */ public class PrettyPrintWriter extends AbstractXmlWriter { + /** Quirks mode: Writes any character into data stream incl. U+0000. */ public static int XML_QUIRKS = -1; + /** XML 1.0 mode: Writes characters according XML 1.0 specification, throws {@link StreamException} for invalid characters. */ public static int XML_1_0 = 0; + /** XML 1.1 mode: Writes characters according XML 1.1 specification, throws {@link StreamException} for invalid characters. */ public static int XML_1_1 = 1; + /** + * XML 1.0 mode: Writes characters according XML 1.0 specification, writes character U+FFFFD as replacement for invalid ones. + * @since upcoming + */ public static int XML_1_0_REPLACEMENT = 2; + /** + * XML 1.1 mode: Writes characters according XML 1.1 specification, writes character U+FFFFD as replacement for invalid ones. + * @since upcoming + */ public static int XML_1_1_REPLACEMENT = 3; private final QuickWriter writer;