|
|||||||||
| Home >> All >> gnu >> java >> nio >> [ charset overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
gnu.java.nio.charset
Class EncodingHelper

java.lang.Objectgnu.java.nio.charset.EncodingHelper
- public class EncodingHelper
- extends java.lang.Object
This class provides some useful utility methods for charset encoding for the java.lang and java.io methods.
| Field Summary | |
private static java.util.HashMap |
canonicalNames
Contains the mapping from java.io canonical names to java.nio canonical names. |
| Constructor Summary | |
EncodingHelper()
|
|
| Method Summary | |
static java.nio.charset.Charset |
getCharset(java.lang.String name)
Gets a charset, throwing the java.io exception and not the java.nio exception if an error occurs. |
static java.lang.String |
getDefaultEncoding()
Returns the name of the default encoding, falls back on defaults to Latin-1 if there's a problem. |
static java.lang.String |
getOldCanonical(java.lang.String newCanonical)
Returns the java.io canonical name of a charset given with the java.nio canonical name. |
static boolean |
isISOLatin1(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
canonicalNames
private static java.util.HashMap canonicalNames
- Contains the mapping from java.io canonical names
to java.nio canonical names.
| Constructor Detail |
EncodingHelper
public EncodingHelper()
| Method Detail |
getDefaultEncoding
public static java.lang.String getDefaultEncoding()
- Returns the name of the default encoding,
falls back on defaults to Latin-1 if there's a problem.
getOldCanonical
public static java.lang.String getOldCanonical(java.lang.String newCanonical)
- Returns the java.io canonical name of a charset given with the
java.nio canonical name. If the charset does not have a java.io
canonical name, the input string is returned.
isISOLatin1
public static boolean isISOLatin1(java.lang.String s)
getCharset
public static java.nio.charset.Charset getCharset(java.lang.String name) throws java.io.UnsupportedEncodingException
- Gets a charset, throwing the java.io exception and not
the java.nio exception if an error occurs.
|
|||||||||
| Home >> All >> gnu >> java >> nio >> [ charset overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
gnu.java.nio.charset.EncodingHelper