- All Implemented Interfaces:
Serializable, Comparable<CharacterSetECI>, java.lang.constant.Constable
Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 of ISO 18004.
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUS-ASCII (27, 170)Big5 (28)windows-1250 (21)windows-1251 (22)windows-1252 (23)windows-1256 (24)Cp437 (0, 2).EUC-KR (30)GB2312 / EUC_CN / GBK (29)ISO-8859-1 (1, 3)ISO-8859-10 (12)ISO-8859-11 (13)ISO-8859-13 (15)ISO-8859-14 (16)ISO-8859-15 (17)ISO-8859-16 (18)ISO-8859-2 (4)ISO-8859-3 (5)ISO-8859-4 (6)ISO-8859-5 (7)ISO-8859-6 (8)ISO-8859-7 (9)ISO-8859-8 (10)ISO-8859-9 (11)Shift_JIS (20)UTF-16BE / UnicodeBig (25)UTF-8 (26)Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<String, CharacterSetECI> ECI instances by their name.private final String[]Alternate encoding names for this ECI.private static final Map<Integer, CharacterSetECI> ECI instances by their number.private final int[]The ECI numbers this instance answers to.Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCharacterSetECI(int value) Registers an ECI under one number.privateCharacterSetECI(int[] values, String... otherEncodingNames) Registers an ECI under several numbers.privateCharacterSetECI(int value, String... otherEncodingNames) Registers an ECI under one number with alternate names.Method Summary
Modifier and TypeMethodDescriptionstatic CharacterSetECIGet CharacterSetECI by name.static CharacterSetECIgetCharacterSetECIByValue(int value) Get CharacterSetECI by value.intgetValue()Get the first ECI value.static CharacterSetECIReturns the enum constant of this class with the specified name.static CharacterSetECI[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
Cp437
Cp437 (0, 2). The enum name is a Java encoding valid for java.lang and java.io.ISO8859_1
ISO-8859-1 (1, 3)ISO8859_2
ISO-8859-2 (4)ISO8859_3
ISO-8859-3 (5)ISO8859_4
ISO-8859-4 (6)ISO8859_5
ISO-8859-5 (7)ISO8859_6
ISO-8859-6 (8)ISO8859_7
ISO-8859-7 (9)ISO8859_8
ISO-8859-8 (10)ISO8859_9
ISO-8859-9 (11)ISO8859_10
ISO-8859-10 (12)ISO8859_11
ISO-8859-11 (13)ISO8859_13
ISO-8859-13 (15)ISO8859_14
ISO-8859-14 (16)ISO8859_15
ISO-8859-15 (17)ISO8859_16
ISO-8859-16 (18)SJIS
Shift_JIS (20)Cp1250
windows-1250 (21)Cp1251
windows-1251 (22)Cp1252
windows-1252 (23)Cp1256
windows-1256 (24)UnicodeBigUnmarked
UTF-16BE / UnicodeBig (25)UTF8
UTF-8 (26)ASCII
US-ASCII (27, 170)Big5
Big5 (28)GB18030
GB2312 / EUC_CN / GBK (29)EUC_KR
EUC-KR (30)
Field Details
VALUE_TO_ECI
ECI instances by their number.NAME_TO_ECI
ECI instances by their name.values
private final int[] valuesThe ECI numbers this instance answers to.otherEncodingNames
Alternate encoding names for this ECI.
Constructor Details
CharacterSetECI
private CharacterSetECI(int value) Registers an ECI under one number.- Parameters:
value- the ECI number
CharacterSetECI
Registers an ECI under one number with alternate names.- Parameters:
value- the ECI numberotherEncodingNames- alternate encoding names
CharacterSetECI
Registers an ECI under several numbers.- Parameters:
values- the ECI numbersotherEncodingNames- alternate encoding names
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
getValue
public int getValue()Get the first ECI value.- Returns:
- the first ECI value
getCharacterSetECIByValue
Get CharacterSetECI by value.- Parameters:
value- character set ECI value- Returns:
CharacterSetECIrepresenting ECI of given value, or null if it is legal but unsupported- Throws:
FormatException- if ECI value is invalid
getCharacterSetECIByName
Get CharacterSetECI by name.- Parameters:
name- character set ECI encoding name- Returns:
- CharacterSetECI representing ECI for character encoding, or null if it is legal but unsupported