public class Encoding
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getJavaName(java.util.Locale locale)
Returns the Java name for the given locale.
|
static java.lang.String |
getJavaName(java.lang.String encoding)
Returns the Java name for the given encoding.
|
static EncodingWriter |
getLatin1Writer()
Returns the latin 1 writer.
|
static java.lang.String |
getMimeName(java.util.Locale locale)
Returns the canonical mime name for the given locale.
|
static java.lang.String |
getMimeName(java.lang.String encoding)
Returns the canonical mime name for the given character encoding.
|
static java.io.Reader |
getReadEncoding(java.io.InputStream is,
java.lang.String encoding)
Returns a Reader to translate bytes to characters.
|
static EncodingReader |
getReadFactory(java.lang.String encoding)
Returns a Reader to translate bytes to characters.
|
static EncodingWriter |
getWriteEncoding(java.lang.String encoding)
Returns an EncodingWriter to translate characters to bytes.
|
public static java.lang.String getMimeName(java.lang.String encoding)
encoding
- character encoding name, possibly an aliaspublic static java.lang.String getMimeName(java.util.Locale locale)
locale
- locale to use.public static java.io.Reader getReadEncoding(java.io.InputStream is, java.lang.String encoding) throws java.io.UnsupportedEncodingException
is
- the input stream.encoding
- the encoding name.java.io.UnsupportedEncodingException
public static EncodingReader getReadFactory(java.lang.String encoding) throws java.io.UnsupportedEncodingException
is
- the input stream.encoding
- the encoding name.java.io.UnsupportedEncodingException
public static EncodingWriter getWriteEncoding(java.lang.String encoding)
encoding
- the encoding name.public static EncodingWriter getLatin1Writer()
public static java.lang.String getJavaName(java.lang.String encoding)
encoding
- character encoding namepublic static java.lang.String getJavaName(java.util.Locale locale)
locale
- the locale to use