Package net.sf.okapi.common
Class CharsetStore
- java.lang.Object
-
- net.sf.okapi.common.CharsetStore
-
public class CharsetStore extends Object
Purpose of this class is to have it “hidden” inside existing classes that have charsets to reconcile situations when one does a setCharset (or in constructor) with a Charset and then a getCharset as a String. Or the other way around. Example:Foo foo = new Foo(…, "utf-8"); Charset cs = foo.getCharset(); String srtCs = foo.CharsetAsString();And that would open the door to adding more public APIs taking / returning Charset
-
-
Field Summary
Fields Modifier and Type Field Description static CharsetStoreUNKNOWNstatic StringUNKNOWN_CHARSET_NAMEstatic CharsetStoreUTF_16static CharsetStoreUTF_16BEstatic CharsetStoreUTF_16LEstatic CharsetStoreUTF_8
-
Constructor Summary
Constructors Constructor Description CharsetStore(String charsetName)CharsetStore(Charset charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharsetgetCharset()StringgetCharsetName()StringtoString()
-
-
-
Field Detail
-
UTF_8
public static final CharsetStore UTF_8
-
UTF_16
public static final CharsetStore UTF_16
-
UTF_16BE
public static final CharsetStore UTF_16BE
-
UTF_16LE
public static final CharsetStore UTF_16LE
-
UNKNOWN_CHARSET_NAME
public static final String UNKNOWN_CHARSET_NAME
- See Also:
- Constant Field Values
-
UNKNOWN
public static final CharsetStore UNKNOWN
-
-