Package com.iizix.codepage
Class CodepageConverter
java.lang.Object
com.iizix.codepage.CodepageConverter
The class is the actual "doer" for the CodepageMapper class.
- Author:
- Christopher Mindus
- See Also:
- Constructor SummaryConstructorsConstructorDescription- CodepageConverter- (int[] map, String codepageName) Creates an instance and sets the available codepage.
- Method SummaryModifier and TypeMethodDescription- char- convertByteToChar- (byte b) Converts a single byte to character.- char[]- convertByteToChar- (byte[] b) Converts an array of bytes to an array of characters.- char[]- convertByteToChar- (byte[] b, int offset, int length) Converts an array of bytes to an array of characters.- convertByteToString- (byte[] b) Converts an array of bytes to a string.- convertByteToString- (byte[] b, int offset, int length) Converts an array of bytes to a string.- byte- convertCharToByte- (char c) Converts a single character to byte.- byte[]- convertCharToByte- (char[] c) Converts an array of characters to an array of bytes.- byte[]Converts a string to an array of bytes.- static CodepageConverter- createCodepageConverter- (int[] map) Creates an instance and sets the available codepage.- static CodepageConverter- createCodepageConverter- (int[] map, String codepageName) Creates an instance and sets the available codepage.- static CodepageConverter- createCodepageConverter- (String codepageName) Creates an instance of a codepage short name.Gets the current codepage short name.- intGets the current (EBCDIC) code page value, e.g.
- Constructor Details- CodepageConverterCreates an instance and sets the available codepage.
 
- Method Details- createCodepageConverterCreates an instance and sets the available codepage.
- createCodepageConverterCreates an instance and sets the available codepage.
- createCodepageConverterCreates an instance of a codepage short name. This codepage short name must be a class implementing the- CodepageMapInterfaceclass in the same package as this class.- Returns:
- null if the codepage cannot be created.
 
- getCodePageGets the current codepage short name.
- getCodePageValuepublic int getCodePageValue()Gets the current (EBCDIC) code page value, e.g. 37, 278, 500...
- convertByteToCharpublic char convertByteToChar- (byte b) Converts a single byte to character.
- convertByteToCharpublic char[] convertByteToChar- (byte[] b) Converts an array of bytes to an array of characters.
- convertByteToCharpublic char[] convertByteToChar- (byte[] b, int offset, int length) Converts an array of bytes to an array of characters.
- convertByteToStringConverts an array of bytes to a string.
- convertByteToStringConverts an array of bytes to a string.
- convertCharToBytepublic byte convertCharToByte- (char c) Converts a single character to byte.
- convertCharToBytepublic byte[] convertCharToByte- (char[] c) Converts an array of characters to an array of bytes.
- convertStringToByteConverts a string to an array of bytes.