|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vgrs.xcode.cmdline.CmdLine
com.vgrs.xcode.cmdline.common.NativeCmdLine
public class NativeCmdLine
This class converts between native language encodings like Big5, S-JIS, or UTF- 8. Input data can be converted between one or more native encodings given in a space-separated list. The full list of supported encodings can be found in the Appendices section of the IDNSDK User's guide. Because of the nature of Java's support for Native Encodings, the round trip checking must be done deep inside the code. It does not, therefore need to take place here in the test driver. The encode and decode methods here just make one call, because the answer is guaranteed to be reliable.
| Field Summary |
|---|
| Fields inherited from class com.vgrs.xcode.cmdline.CmdLine |
|---|
SWITCH_FILE |
| Constructor Summary | |
|---|---|
NativeCmdLine(java.lang.String[] args)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getUsageOptions()
Return only the options for this command. |
static void |
main(java.lang.String[] args)
|
static void |
testDecode(java.io.File input,
java.lang.String[] encodings)
Use the specified native encoding to return the input sequence in UTF16 format. |
static void |
testDecode(java.lang.String input,
java.lang.String encoding)
Use the specified native encoding to return the input sequence in UTF16 format. |
static void |
testDecode(java.lang.String input,
java.lang.String[] encodings)
Use the specified native encoding to return the input sequence in UTF16 format. |
static void |
testEncode(java.io.File input,
java.lang.String[] encodings)
Encodes the input in the file using each of the Java supported encoding types. |
static void |
testEncode(java.lang.String input,
java.lang.String encoding)
Encode the input using the indicated encoding type. |
static void |
testEncode(java.lang.String input,
java.lang.String[] encodings)
Encode the input using the indicated encoding types. |
| Methods inherited from class com.vgrs.xcode.cmdline.CmdLine |
|---|
getCommandName, getOptions, setCommandName, setOptions, showUsage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NativeCmdLine(java.lang.String[] args)
args - the command line arguments| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line arguments
public static void testEncode(java.io.File input,
java.lang.String[] encodings)
input - the file name of the file containing the input to be encoded.encodings - the encoding scheme to use
public static void testDecode(java.io.File input,
java.lang.String[] encodings)
input - the file name of the file containing the input to be encoded.encodings - the encoding scheme to use
public static void testEncode(java.lang.String input,
java.lang.String encoding)
throws XcodeException
input - string to be encodedencoding - string to indicate the encoding type of the output
XcodeException
public static void testEncode(java.lang.String input,
java.lang.String[] encodings)
throws XcodeException
input - the string to be encodedencodings - indicate the encoding types of the output string
XcodeException - if input is null or empty string or if the named charset is not
supported
public static void testDecode(java.lang.String input,
java.lang.String encoding)
throws XcodeException
input - the string to be decodedencoding - the encoding type to be used in decoding
XcodeException - if input is null or empty string or if the named charset is not
supported
public static void testDecode(java.lang.String input,
java.lang.String[] encodings)
throws XcodeException
input - the string to be decodedencodings - the encoding types to be used in decoding
XcodeException - if input is null or empty string or if the named charset is not
supportedpublic java.lang.String getUsageOptions()
getUsageOptions in class CmdLine
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||