| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Encodings. | |
| pack-priv static final String | DEFAULT_MIME_ENCODING
The default encoding, ISO style, ISO style. |
| private static final String | ENCODINGS_FILE
Standard filename for properties file with encodings data. |
| private static final String | ENCODINGS_PROP
Standard filename for properties file with encodings data. |
| private static final int | m_defaultLastPrintable
The last printable character for unknown encodings. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static String | Returns: ISO-style encoding string.non-null reference to encoding string, java style. encoding)Try the best we can to convert a Java encoding to a XML-style encoding. |
| public static String | Returns: ISO-style encoding string.non-null reference to encoding string, java style. encoding)Try the best we can to convert a Java encoding to a XML-style encoding. |
| pack-priv static EncodingInfo | Returns: The object that is used to determine if characters are in the given encoding.The encoding encoding)Returns the EncodingInfo object for the specified encoding. |
| public static int | Returns: the default sizeReturns the last printable character for an unspecified encoding. |
| pack-priv static String | Returns: The ISO-style encoding string, or null if failure.Reference to java-style encoding string, which may be null,
in which case a default will be found. encoding)Get the proper mime encoding. |
| pack-priv static Writer | Returns: A suitable writerThe output stream output, String The encoding encoding)Returns a writer for the specified encoding based on an output stream. |
| pack-priv static boolean | isHighUTF16Surrogate(char
the character to test ch)Return true if the character is the high member of a surrogate pair. |
| pack-priv static boolean | isLowUTF16Surrogate(char
the character to test ch)Return true if the character is the low member of a surrogate pair. |
| public static boolean | Returns: boolean - true if the encoding was recognized else falseThe encoding encoding)Determines if the encoding specified was recognized by the serializer or not. |
| pack-priv static int | toCodePoint(char
the high char of the high/low pair highSurrogate, char the low char of the high/low pair lowSurrogate)Return the unicode code point represented by the high/low surrogate pair. |
| pack-priv static int | |
| private static String | Returns: an uppercased version of the input String, possibly the same String.a String of ASCII characters s)A fast and cheap way to uppercase a String that is only made of printable ASCII characters. |
| _encodingInfos | back to summary |
|---|---|
| private static final Encodings. | |
| DEFAULT_MIME_ENCODING | back to summary |
|---|---|
| pack-priv static final String DEFAULT_MIME_ENCODING The default encoding, ISO style, ISO style. | |
| ENCODINGS_FILE | back to summary |
|---|---|
| private static final String ENCODINGS_FILE Standard filename for properties file with encodings data. | |
| ENCODINGS_PROP | back to summary |
|---|---|
| private static final String ENCODINGS_PROP Standard filename for properties file with encodings data. | |
| m_defaultLastPrintable | back to summary |
|---|---|
| private static final int m_defaultLastPrintable The last printable character for unknown encodings. | |
| Encodings | back to summary |
|---|---|
| public Encodings() | |
| convertJava2MimeEncoding | back to summary |
|---|---|
| private static String convertJava2MimeEncoding(String encoding) Try the best we can to convert a Java encoding to a XML-style encoding. | |
| convertMime2JavaEncoding | back to summary |
|---|---|
| public static String convertMime2JavaEncoding(String encoding) Try the best we can to convert a Java encoding to a XML-style encoding. | |
| getEncodingInfo | back to summary |
|---|---|
| pack-priv static EncodingInfo getEncodingInfo(String encoding) Returns the EncodingInfo object for the specified encoding. This is not a public API.
| |
| getLastPrintable | back to summary |
|---|---|
| public static int getLastPrintable() Returns the last printable character for an unspecified encoding.
| |
| getMimeEncoding | back to summary |
|---|---|
| pack-priv static String getMimeEncoding(String encoding) Get the proper mime encoding. From the XSLT recommendation: "The encoding attribute specifies the preferred encoding to use for outputting the result tree. XSLT processors are required to respect values of UTF-8 and UTF-16. For other values, if the XSLT processor does not support the specified encoding it may signal an error; if it does not signal an error it should use UTF-8 or UTF-16 instead. The XSLT processor must not use an encoding whose name does not match the EncName production of the XML Recommendation [XML]. If no encoding attribute is specified, then the XSLT processor should use either UTF-8 or UTF-16." | |
| getWriter | back to summary |
|---|---|
| pack-priv static Writer getWriter(OutputStream output, String encoding) throws UnsupportedEncodingException Returns a writer for the specified encoding based on an output stream.
| |
| isHighUTF16Surrogate | back to summary |
|---|---|
| pack-priv static boolean isHighUTF16Surrogate(char ch) Return true if the character is the high member of a surrogate pair. This is not a public API.
| |
| isLowUTF16Surrogate | back to summary |
|---|---|
| pack-priv static boolean isLowUTF16Surrogate(char ch) Return true if the character is the low member of a surrogate pair. This is not a public API.
| |
| isRecognizedEncoding | back to summary |
|---|---|
| public static boolean isRecognizedEncoding(String encoding) Determines if the encoding specified was recognized by the serializer or not.
| |
| toCodePoint | back to summary |
|---|---|
| pack-priv static int toCodePoint(char highSurrogate, char lowSurrogate) Return the unicode code point represented by the high/low surrogate pair. This is not a public API.
| |
| toCodePoint | back to summary |
|---|---|
| pack-priv static int toCodePoint(char ch) Return the unicode code point represented by the char. A bit of a dummy method, since all it does is return the char, but as an int value. This is not a public API.
| |
| toUpperCaseFast | back to summary |
|---|---|
| private static String toUpperCaseFast(final String s) A fast and cheap way to uppercase a String that is only made of printable ASCII characters. This is not a public API. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Map | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| private String | |
| pack-priv EncodingInfo | |
| pack-priv EncodingInfo | |
| pack-priv EncodingInfo | |
| private void | |
| private Properties | |
| private InputStream | |
| private String[] | |
| pack-priv void |
| _encodingDynamicTable | back to summary |
|---|---|
| private final Map<String, EncodingInfo> _encodingDynamicTable | |
| _encodingTableKeyJava | back to summary |
|---|---|
| private final Map<String, EncodingInfo> _encodingTableKeyJava | |
| _encodingTableKeyMime | back to summary |
|---|---|
| private final Map<String, EncodingInfo> _encodingTableKeyMime | |
| EncodingInfos | back to summary |
|---|---|
| private EncodingInfos() | |
| findCharsetNameFor | back to summary |
|---|---|
| private String findCharsetNameFor(String name) | |
| findCharsetNameFor | back to summary |
|---|---|
| private String findCharsetNameFor(String javaName, String[] mimes) | |
| findEncoding | back to summary |
|---|---|
| pack-priv EncodingInfo findEncoding(String normalizedEncoding) | |
| getEncodingFromJavaKey | back to summary |
|---|---|
| pack-priv EncodingInfo getEncodingFromJavaKey(String normalizedJavaName) | |
| getEncodingFromMimeKey | back to summary |
|---|---|
| pack-priv EncodingInfo getEncodingFromMimeKey(String normalizedMimeName) | |
| loadEncodingInfo | back to summary |
|---|---|
| private void loadEncodingInfo() Loads a list of all the supported encodings. System property "encodings" formatted using URL syntax may define an external encodings list. Thanks to Sergey Ushakov for the code contribution! | |
| loadProperties | back to summary |
|---|---|
| private Properties loadProperties() throws MalformedURLException, IOException | |
| openEncodingsFileStream | back to summary |
|---|---|
| private InputStream openEncodingsFileStream() throws MalformedURLException, IOException | |
| parseMimeTypes | back to summary |
|---|---|
| private String[] parseMimeTypes(String val) | |
| putEncoding | back to summary |
|---|---|
| pack-priv void putEncoding(String key, EncodingInfo info) | |