Class CharSetXMLWriter

java.lang.Object
org.apache.ws.commons.serialize.XMLWriterImpl
org.apache.ws.commons.serialize.CharSetXMLWriter
All Implemented Interfaces:
XMLWriter, ContentHandler

public class CharSetXMLWriter extends XMLWriterImpl
An improved version of XMLWriterImpl, using theCharset from Java 1.4.
  • Field Details

  • Constructor Details

    • CharSetXMLWriter

      public CharSetXMLWriter()
  • Method Details

    • startDocument

      public void startDocument() throws SAXException
      Description copied from class: XMLWriterImpl

      Starts a document.

      Specified by:
      startDocument in interface ContentHandler
      Overrides:
      startDocument in class XMLWriterImpl
      Throws:
      SAXException - Not actually thrown, just for compliance to the interface specification.
    • canEncode

      public boolean canEncode(char c)
      Description copied from interface: XMLWriter

      Returns whether the XMLWriter can encode the character c without an escape sequence like &#ddd;.

      Specified by:
      canEncode in interface XMLWriter
      Overrides:
      canEncode in class XMLWriterImpl
      Parameters:
      c - The character being checked for escaping.
      Returns:
      Whether to encode the character.