|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.util.XPEncoding
public final class XPEncoding
Provides methods to convert arrays and strings of Unicode characters
to a specific encoding.
For the methods of this class, if the supplied encoding name
is one of ISO-8859-1, ISO8859_1, 8859_1, ISO8859-1, latin1, the
actual encoding used will be Windows-1252, to allow "faux" ISO-8859-1
documents to render the Euro sign (0x80, U+20AC) as well as right single
quotation (0x92) and en- and em-dash (0x96, 0x97).
Windows-1252 is a superset
(in terms of displayable characters) of ISO-8859-1.
Since this class has only static methods, it is declared final.
Field Summary | |
---|---|
static java.lang.String |
ISO_8859_1_STRICT
Refer to this encoding name to avoid aliasing of ISO-8859-1 to Windows-1252 if desired. |
Method Summary | |
---|---|
static byte[] |
GetBytes(java.lang.String str,
java.lang.String encoding)
Convert this String into bytes according to the specified character encoding, storing the result into the byte array. |
static java.lang.String |
GetString(byte[] bytes,
java.lang.String encoding)
Construct a new String by converting the specified array of bytes using the specified character encoding. |
static java.lang.String |
GetString(java.lang.String str,
java.lang.String encoding)
Construct a new String by converting the given string using the specified character encoding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String ISO_8859_1_STRICT
Method Detail |
---|
public static byte[] GetBytes(java.lang.String str, java.lang.String encoding)
str
- - the string to be encodedencoding
- - the name of the encoding
public static java.lang.String GetString(java.lang.String str, java.lang.String encoding)
str
- - the string to be encodedencoding
- - the name of the encoding
public static java.lang.String GetString(byte[] bytes, java.lang.String encoding)
bytes
- - array of byte to be convertedencoding
- - the name of the encoding
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |