Constructor and Description |
---|
ATStringConverter() |
Modifier and Type | Method and Description |
---|---|
static String |
GSM2Java(String gsmStr)
Convert GSM encoded string into a Java string, "\xy" character
escaping is supported.
|
static String |
GSM2Java(String gsmStr,
boolean handleEscaping)
Convert GSM encoded string into a Java string, "\xy" character
escaping is switchable.
|
static String |
Java2GSM(String str)
Converts a Java encoded string into a GSM encoded string.
|
static String |
Java2UCS2Hex(String str)
Converts a Java encoded string into a string containing the characters
in the UCS2 hex format.
|
static String |
UCS2Hex2Java(String str)
Converts a string in the UCS2 hex format into a Java encoded string.
|
public static String Java2GSM(String str) throws IllegalArgumentException
str
- The String instance from Java to be converted.IllegalArgumentException
- If one or more characters cannot be mapped to
GSM encoding, i.e. a character is not defined
within the GSM alphabet.public static String GSM2Java(String gsmStr) throws IllegalArgumentException
gsmStr
- GSM encoded string to be converted, which
may contain "\xy" escape sequences with xy in
the range of 0x00 ~ 0x7F, which are converted
to single characters.IllegalArgumentException
- If one or more characters cannot be mapped from
GSM encoding, e.g. a character value was > 0x7F.public static String GSM2Java(String gsmStr, boolean handleEscaping) throws IllegalArgumentException
gsmStr
- GSM encoded string to be converted.handleEscaping
- "\xy" character escape handling selector
gsmStr
may contain "\xy" escape sequences
with xy in the range of 0x00 ~ 0x7F, which are
converted to single characters.
gsmStr
are not evaluated, i.e. they are printed as
these three characters.
IllegalArgumentException
- If one or more characters cannot be mapped from
GSM encoding, e.g. a character value was > 0x7F.public static String Java2UCS2Hex(String str)
str
- The String instance from Java to be converted.public static String UCS2Hex2Java(String str) throws IllegalArgumentException
str
- The UCS2 hex string to be converted.IllegalArgumentException
- If the passed string isn't in proper
UCS2 hex format.Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.