XmlEncodingBase (Apache Tomcat 8.5.43 API Documentation)

org.apache.tomcat.util.descriptor.web

## Class XmlEncodingBase

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

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

      public abstract class XmlEncodingBase
      extends java.lang.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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.nio.charset.Charset` | `getCharset()` Obtain the character encoding of the XML source that was used to populated this object.
    `java.lang.String` | `getEncoding()` Deprecated. This method will be removed in Tomcat 9
    `void` | `setCharset(java.nio.charset.Charset charset)`
    `void` | `setEncoding(java.lang.String encoding)` Deprecated. This method will be removed in Tomcat 9

    - ### 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

    - #### setEncoding

          @Deprecated
          public void setEncoding(java.lang.String encoding)

      Deprecated. This method will be removed in Tomcat 9
      Parameters:
        `encoding` - The encoding of the XML source that was used to populated this object.

    - #### getEncoding

          @Deprecated
          public java.lang.String getEncoding()

      Deprecated. This method will be removed in Tomcat 9
      Obtain the encoding of the XML source that was used to populated this object.
      Returns:
        The encoding of the associated XML source or `UTF-8` if the encoding could not be determined

    - #### setCharset

          public void setCharset(java.nio.charset.Charset charset)

    - #### getCharset

          public java.nio.charset.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-2019 Apache Software Foundation. All Rights Reserved.