XmlEncodingBase (Apache Tomcat 9.0.37 API Documentation)

org.apache.tomcat.util.descriptor.web

## Class XmlEncodingBase

- java.lang.Object
- - org.apache.tomcat.util.descriptor.web.XmlEncodingBase

- Direct Known Subclasses:
    ErrorPage, FilterMap, JspPropertyGroup, LoginConfig, SecurityCollection, SecurityConstraint, WebXml

      public abstract class XmlEncodingBase
      extends Object

  Base class for those elements that need to track the encoding used in the source XML.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlEncodingBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Charset` | `getCharset()` Obtain the character encoding of the XML source that was used to populated this object.
    `void` | `setCharset(Charset charset)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XmlEncodingBase

          public XmlEncodingBase()

  - ### Method Detail

    - #### setCharset

          public void setCharset(Charset charset)

    - #### getCharset

          public Charset getCharset()

      Obtain the character encoding of the XML source that was used to populated this object.
      Returns:
        The character encoding of the associated XML source or `UTF-8` if the encoding could not be determined

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.