Class EscapingCompactWriter

java.lang.Object
com.thoughtworks.xstream.io.AbstractWriter
com.thoughtworks.xstream.io.xml.AbstractXmlWriter
com.thoughtworks.xstream.io.xml.PrettyPrintWriter
com.thoughtworks.xstream.io.xml.CompactWriter
org.craftercms.core.util.xml.marshalling.xstream.EscapingCompactWriter
All Implemented Interfaces:
com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriter, com.thoughtworks.xstream.io.HierarchicalStreamWriter, com.thoughtworks.xstream.io.xml.XmlFriendlyWriter

public class EscapingCompactWriter extends com.thoughtworks.xstream.io.xml.CompactWriter
Extension of CompactWriter that enables setting on/off XML escaping.
Author:
Alfonso Vásquez
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     

    Fields inherited from class com.thoughtworks.xstream.io.xml.PrettyPrintWriter

    depth, XML_1_0, XML_1_1, XML_QUIRKS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    EscapingCompactWriter(Writer writer, int mode)
     
    EscapingCompactWriter(Writer writer, int mode, com.thoughtworks.xstream.io.naming.NameCoder nameCoder)
     
    EscapingCompactWriter(Writer writer, com.thoughtworks.xstream.io.naming.NameCoder nameCoder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setEscapeXml(boolean escapeXml)
     
    protected void
    writeAttributeValue(com.thoughtworks.xstream.core.util.QuickWriter writer, String text)
     
    protected void
    writeText(com.thoughtworks.xstream.core.util.QuickWriter writer, String text)
     

    Methods inherited from class com.thoughtworks.xstream.io.xml.CompactWriter

    endOfLine

    Methods inherited from class com.thoughtworks.xstream.io.xml.PrettyPrintWriter

    addAttribute, close, endNode, flush, getNewLine, setValue, startNode, startNode

    Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlWriter

    escapeXmlName

    Methods inherited from class com.thoughtworks.xstream.io.AbstractWriter

    encodeAttribute, encodeNode, underlyingWriter

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • escapeXml

      protected boolean escapeXml
  • Constructor Details

    • EscapingCompactWriter

      public EscapingCompactWriter(Writer writer)
    • EscapingCompactWriter

      public EscapingCompactWriter(Writer writer, int mode)
    • EscapingCompactWriter

      public EscapingCompactWriter(Writer writer, com.thoughtworks.xstream.io.naming.NameCoder nameCoder)
    • EscapingCompactWriter

      public EscapingCompactWriter(Writer writer, int mode, com.thoughtworks.xstream.io.naming.NameCoder nameCoder)
  • Method Details

    • setEscapeXml

      public void setEscapeXml(boolean escapeXml)
    • writeText

      protected void writeText(com.thoughtworks.xstream.core.util.QuickWriter writer, String text)
      Overrides:
      writeText in class com.thoughtworks.xstream.io.xml.PrettyPrintWriter
    • writeAttributeValue

      protected void writeAttributeValue(com.thoughtworks.xstream.core.util.QuickWriter writer, String text)
      Overrides:
      writeAttributeValue in class com.thoughtworks.xstream.io.xml.PrettyPrintWriter