Class Encodings

java.lang.Object
org.apache.xml.serializer.Encodings

public final class Encodings extends Object
Provides information about encodings. Depends on the Java runtime to provides writers for the different encodings.

This class is not a public API. It is only public because it is used outside of this package.

  • Constructor Details

    • Encodings

      public Encodings()
  • Method Details

    • isRecognizedEncoding

      public static boolean isRecognizedEncoding(String encoding)
      Determines if the encoding specified was recognized by the serializer or not.
      Parameters:
      encoding - The encoding
      Returns:
      boolean - true if the encoding was recognized else false
    • convertMime2JavaEncoding

      public static String convertMime2JavaEncoding(String encoding)
      Try the best we can to convert a Java encoding to a XML-style encoding.

      This is not a public API.

      Parameters:
      encoding - non-null reference to encoding string, java style.
      Returns:
      ISO-style encoding string.

      This method is not a public API.

    • getHighChar

      public static char getHighChar(String encoding)
      Characters with values at or below the high code point are in the encoding. Code point values above this one may or may not be in the encoding, but lower ones certainly are.

      This is for performance.

      Parameters:
      encoding - The encoding
      Returns:
      The code point for which characters at or below this code point are in the encoding. Characters with higher code point may or may not be in the encoding. A value of zero is returned if the high code point is unknown.

      This method is not a public API.