|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.serialize.Encodings
Provides information about encodings. Depends on the Java runtime to provides writers for the different encodings, but can be used to override encoding names and provide the last printable character for each encoding.
Field Summary | |
private static EncodingInfo[] |
_encodings
|
static String |
DEFAULT_MIME_ENCODING
The default encoding, ISO style, ISO style. |
(package private) static String |
ENCODINGS_FILE
Standard filename for properties file with encodings data. |
(package private) static int |
m_defaultLastPrintable
The last printable character for unknown encodings. |
private static Class[] |
NO_CLASSES
a zero length Class array used in loadPropertyFile() |
private static Object[] |
NO_OBJS
a zero length Object array used in loadPropertyFile() |
Constructor Summary | |
Encodings()
|
Method Summary | |
static String |
convertJava2MimeEncoding(String encoding)
Try the best we can to convert a Java encoding to a XML-style encoding. |
static String |
convertMime2JavaEncoding(String encoding)
Try the best we can to convert a Java encoding to a XML-style encoding. |
static Object |
getCharToByteConverter(String encoding)
Returns an opaque CharToByte converter for the specified encoding. |
static int |
getLastPrintable()
Returns the last printable character for an unspecified encoding. |
static int |
getLastPrintable(String encoding)
Returns the last printable character for the specified encoding. |
static String |
getMimeEncoding(String encoding)
Get the proper mime encoding. |
static Writer |
getWriter(OutputStream output,
String encoding)
Returns a writer for the specified encoding based on an output stream. |
private static EncodingInfo[] |
loadEncodingInfo()
Load a list of all the supported encodings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final int m_defaultLastPrintable
static final String ENCODINGS_FILE
private static final Class[] NO_CLASSES
private static final Object[] NO_OBJS
public static final String DEFAULT_MIME_ENCODING
private static final EncodingInfo[] _encodings
Constructor Detail |
public Encodings()
Method Detail |
public static Writer getWriter(OutputStream output, String encoding) throws UnsupportedEncodingException
output
- The output streamencoding
- The encoding
UnsupportedEncodingException
- There is no convertor
to support this encodingpublic static Object getCharToByteConverter(String encoding)
encoding
- The encoding
public static int getLastPrintable(String encoding)
encoding
- The encoding
public static int getLastPrintable()
public static String getMimeEncoding(String encoding)
encoding
- Reference to java-style encoding string, which may be null,
in which case a default will be found.
public static String convertJava2MimeEncoding(String encoding)
encoding
- non-null reference to encoding string, java style.
public static String convertMime2JavaEncoding(String encoding)
encoding
- non-null reference to encoding string, java style.
private static EncodingInfo[] loadEncodingInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |