Package com.iizix.codepage
Class CodepageMapper
java.lang.Object
com.iizix.codepage.CodepageMapper
Maps ASCII to/from Unicode, EBCDIC to/from Unicode, Ansi to/from Unicode.
- Author:
- Christopher Mindus
- See Also:
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static char- convertAnsiToChar- (byte b) Converts a single Ansi byte to character.- static char[]- convertAnsiToChar- (byte[] b) Converts an array of Ansi bytes to an array of characters.- static String- convertAnsiToString- (byte[] b) Converts an array of Ansi bytes to a string.- static String- convertAnsiToString- (byte[] b, int offset, int length) Converts an array of Ansi bytes to a string.- static char- convertASCIIToChar- (byte b) Converts a single ASCII byte to character.- static char[]- convertASCIIToChar- (byte[] b) Converts an array of ASCII bytes to an array of characters.- static String- convertASCIIToString- (byte[] b) Converts an array of ASCII bytes to a string.- static String- convertASCIIToString- (byte[] b, int offset, int length) Converts an array of ASCII bytes to a string.- static byte- convertCharToAnsi- (char c) Converts a single character to Ansi byte.- static byte[]- convertCharToAnsi- (char[] c) Converts an array of characters to an array of Ansi bytes.- static byte- convertCharToASCII- (char c) Converts a single character to ASCII byte.- static byte[]- convertCharToASCII- (char[] c) Converts an array of characters to an array of ASCII bytes.- static byte- convertCharToEBCDIC- (char c) Converts a single character to EBCDIC byte.- static byte[]- convertCharToEBCDIC- (char[] c) Converts an array of characters to an array of EBCDIC bytes.- static char- convertEBCDICToChar- (byte b) Converts a single EBCDIC byte to character.- static char[]- convertEBCDICToChar- (byte[] b) Converts an array of EBCDIC bytes to an array of characters.- static String- convertEBCDICToString- (byte[] b) Converts an array of EBCDIC bytes to a string.- static String- convertEBCDICToString- (byte[] b, int offset, int length) Converts an array of EBCDIC bytes to a string.- static byte[]Converts a string to an array of Ansi bytes.- static byte[]Converts a string to an array of ASCII bytes.- static byte[]Converts a string to an array of EBCDIC bytes.- static CodepageConverterCreates an instance of a codepage converter class.- static final CodepageConverterGets the codepage converter for Ansi.- static final CodepageConverterGets the codepage converter for ASCII.- static intGets the current EBCDIC code page value, e.g.- static final CodepageConverterGets the codepage converter for EBCDIC.- static booleanSets the Ansi codepage.- static booleanSets the ASCII codepage.- static booleanSets the EBCDIC codepage.
- Constructor Details- CodepageMapperpublic CodepageMapper()
 
- Method Details- createCodepageConverterCreates an instance of a codepage converter class.- Returns:
- null if codepage is not found.
 
- setAnsiSets the Ansi codepage.
- setASCIISets the ASCII codepage.
- setEBCDICSets the EBCDIC codepage.
- getASCIIConverterGets the codepage converter for ASCII.
- getAnsiConverterGets the codepage converter for Ansi.
- getEBCDICConverterGets the codepage converter for EBCDIC.
- convertAnsiToCharpublic static char convertAnsiToChar- (byte b) Converts a single Ansi byte to character.
- convertAnsiToCharpublic static char[] convertAnsiToChar- (byte[] b) Converts an array of Ansi bytes to an array of characters.
- convertCharToAnsipublic static byte convertCharToAnsi- (char c) Converts a single character to Ansi byte.
- convertCharToAnsipublic static byte[] convertCharToAnsi- (char[] c) Converts an array of characters to an array of Ansi bytes.
- convertAnsiToStringConverts an array of Ansi bytes to a string.
- convertAnsiToStringConverts an array of Ansi bytes to a string.
- convertStringToAnsiConverts a string to an array of Ansi bytes.
- convertASCIIToCharpublic static char convertASCIIToChar- (byte b) Converts a single ASCII byte to character.
- convertASCIIToCharpublic static char[] convertASCIIToChar- (byte[] b) Converts an array of ASCII bytes to an array of characters.
- convertCharToASCIIpublic static byte convertCharToASCII- (char c) Converts a single character to ASCII byte.
- convertCharToASCIIpublic static byte[] convertCharToASCII- (char[] c) Converts an array of characters to an array of ASCII bytes.
- convertASCIIToStringConverts an array of ASCII bytes to a string.
- convertASCIIToStringConverts an array of ASCII bytes to a string.
- convertStringToASCIIConverts a string to an array of ASCII bytes.
- convertEBCDICToCharpublic static char convertEBCDICToChar- (byte b) Converts a single EBCDIC byte to character.
- convertEBCDICToCharpublic static char[] convertEBCDICToChar- (byte[] b) Converts an array of EBCDIC bytes to an array of characters.
- convertCharToEBCDICpublic static byte convertCharToEBCDIC- (char c) Converts a single character to EBCDIC byte.
- convertCharToEBCDICpublic static byte[] convertCharToEBCDIC- (char[] c) Converts an array of characters to an array of EBCDIC bytes.
- convertEBCDICToStringConverts an array of EBCDIC bytes to a string.
- convertEBCDICToStringConverts an array of EBCDIC bytes to a string.
- convertStringToEBCDICConverts a string to an array of EBCDIC bytes.
- getCurrentEBCDICCodePagepublic static int getCurrentEBCDICCodePage()Gets the current EBCDIC code page value, e.g. 37, 278, 500...