|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.serializer.Encodings
public final class Encodings
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.
Field Summary | |
---|---|
private static EncodingInfo[] |
_encodings
|
private static java.util.Hashtable |
_encodingTableKeyJava
|
private static java.util.Hashtable |
_encodingTableKeyMime
|
(package private) static java.lang.String |
DEFAULT_MIME_ENCODING
The default encoding, ISO style, ISO style. |
private static java.lang.String |
ENCODINGS_FILE
Standard filename for properties file with encodings data. |
Constructor Summary | |
---|---|
Encodings()
|
Method Summary | |
---|---|
private static java.lang.String |
convertJava2MimeEncoding(java.lang.String encoding)
Try the best we can to convert a Java encoding to a XML-style encoding. |
static java.lang.String |
convertMime2JavaEncoding(java.lang.String encoding)
Try the best we can to convert a Java encoding to a XML-style encoding. |
(package private) static EncodingInfo |
getEncodingInfo(java.lang.String encoding)
Returns the EncodingInfo object for the specified encoding, never null, although the encoding name inside the returned EncodingInfo object will be if we can't find a "real" EncodingInfo for the encoding. |
static char |
getHighChar(java.lang.String encoding)
Characters with values at or below the high code point are in the encoding. |
(package private) static java.lang.String |
getMimeEncoding(java.lang.String encoding)
Get the proper mime encoding. |
(package private) static java.io.Writer |
getWriter(java.io.OutputStream output,
java.lang.String encoding)
Returns a writer for the specified encoding based on an output stream. |
(package private) static boolean |
isHighUTF16Surrogate(char ch)
Return true if the character is the high member of a surrogate pair. |
(package private) static boolean |
isLowUTF16Surrogate(char ch)
Return true if the character is the low member of a surrogate pair. |
static boolean |
isRecognizedEncoding(java.lang.String encoding)
Determines if the encoding specified was recognized by the serializer or not. |
private static int |
lengthOfMimeNames(java.lang.String val)
Get the length of the Mime names within the property value |
private static EncodingInfo[] |
loadEncodingInfo()
Load a list of all the supported encodings. |
(package private) static int |
toCodePoint(char ch)
Return the unicode code point represented by the char. |
(package private) static int |
toCodePoint(char highSurrogate,
char lowSurrogate)
Return the unicode code point represented by the high/low surrogate pair. |
private static java.lang.String |
toUpperCaseFast(java.lang.String s)
A fast and cheap way to uppercase a String that is only made of printable ASCII characters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ENCODINGS_FILE
static final java.lang.String DEFAULT_MIME_ENCODING
private static final java.util.Hashtable _encodingTableKeyJava
private static final java.util.Hashtable _encodingTableKeyMime
private static final EncodingInfo[] _encodings
Constructor Detail |
---|
public Encodings()
Method Detail |
---|
static java.io.Writer getWriter(java.io.OutputStream output, java.lang.String encoding) throws java.io.UnsupportedEncodingException
This is not a public API.
output
- The output streamencoding
- The encoding MIME name, not a Java name for the encoding.
java.io.UnsupportedEncodingException
- There is no convertor
to support this encodingstatic EncodingInfo getEncodingInfo(java.lang.String encoding)
This is not a public API.
encoding
- The encoding
public static boolean isRecognizedEncoding(java.lang.String encoding)
encoding
- The encoding
private static java.lang.String toUpperCaseFast(java.lang.String s)
This is not a public API.
s
- a String of ASCII characters
static java.lang.String getMimeEncoding(java.lang.String encoding)
This is not a public API.
encoding
- Reference to java-style encoding string, which may be null,
in which case a default will be found.
private static java.lang.String convertJava2MimeEncoding(java.lang.String encoding)
This is not a public API.
encoding
- non-null reference to encoding string, java style.
public static java.lang.String convertMime2JavaEncoding(java.lang.String encoding)
This is not a public API.
encoding
- non-null reference to encoding string, java style.
This method is not a public API.
private static EncodingInfo[] loadEncodingInfo()
private static int lengthOfMimeNames(java.lang.String val)
val
- The value of the property, which should contain a comma
separated list of Mime names, followed optionally by a space and the
high char value
static boolean isHighUTF16Surrogate(char ch)
This is not a public API.
ch
- the character to teststatic boolean isLowUTF16Surrogate(char ch)
This is not a public API.
ch
- the character to teststatic int toCodePoint(char highSurrogate, char lowSurrogate)
This is not a public API.
highSurrogate
- the high char of the high/low pairlowSurrogate
- the low char of the high/low pairstatic int toCodePoint(char ch)
This is not a public API.
ch
- the char.public static char getHighChar(java.lang.String encoding)
This is for performance.
encoding
- The encoding
This method is not a public API.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |