Class 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 escapeXml  
      • Fields inherited from class com.thoughtworks.xstream.io.xml.PrettyPrintWriter

        depth, XML_1_0, XML_1_1, XML_QUIRKS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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
    • Field Detail

      • escapeXml

        protected boolean escapeXml
    • Constructor Detail

      • 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 Detail

      • 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