org.apache.xml.serializer

Class 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.

UNKNOWN: internal

Method Summary
static StringconvertMime2JavaEncoding(String encoding)
Try the best we can to convert a Java encoding to a XML-style encoding.
static chargetHighChar(String encoding)
Characters with values at or below the high code point are in the encoding.
static booleanisRecognizedEncoding(String encoding)
Determines if the encoding specified was recognized by the serializer or not.

Method Detail

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.

UNKNOWN: internal

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.

UNKNOWN: internal

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

Copyright B) 2006 Apache XML Project. All Rights Reserved.