public enum Mode extends Enum<Mode >
See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which data can be encoded to bits in the QR code standard.
| Enum Constant and Description |
|---|
ALPHANUMERIC
|
BYTE
|
ECI
|
FNC1_FIRST_POSITION
|
FNC1_SECOND_POSITION
|
HANZI
See GBT 18284-2000; "Hanzi" is a transliteration of this mode name.
|
KANJI
|
NUMERIC
|
STRUCTURED_APPEND
|
TERMINATOR
|
| Modifier and Type | Method and Description |
|---|---|
static Mode |
forBits(int bits)
|
int |
getBits()
|
int |
getCharacterCountBits(Version
|
static Mode |
valueOf(String
Returns the enum constant of this type with the specified name.
|
static Mode |
values()
Returns an array containing the constants of this enum type, in the order they are declared.
|
public static final ModeTERMINATOR
public static final ModeNUMERIC
public static final ModeALPHANUMERIC
public static final ModeSTRUCTURED_APPEND
public static final ModeBYTE
public static final ModeECI
public static final ModeKANJI
public static final ModeFNC1_FIRST_POSITION
public static final ModeFNC1_SECOND_POSITION
public static final ModeHANZI
public static Mode[] values()
for (Mode c : Mode.values()) System.out.println(c);
public static ModevalueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null
public static ModeforBits(int bits)
bits - four bits encoding a QR Code data mode
IllegalArgumentException - if bits do not correspond to a known mode
public int getCharacterCountBits(Versionversion)
version - version in question
Version, to encode the count of characters that will follow encoded in this Mode
public int getBits()