public static Encoding getJVMEncoding ( String jvmEncoding ) { if ( "UTF-8" . equals ( jvmEncoding ) ) { return new UTF8Encoding ( ) ; } if ( Charset . isSupported ( jvmEncoding ) ) { return new Encoding ( jvmEncoding ) ; } else { return DEFAULT_ENCODING ; } }
Construct an Encoding for a given JVM encoding .