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.
枚举常量和说明 |
---|
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 |
限定符和类型 | 方法和说明 |
---|---|
static Mode |
forBits(int bits) |
int |
getBits() |
int |
getCharacterCountBits(Version version) |
static Mode |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Mode[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Mode TERMINATOR
public static final Mode NUMERIC
public static final Mode ALPHANUMERIC
public static final Mode STRUCTURED_APPEND
public static final Mode BYTE
public static final Mode ECI
public static final Mode KANJI
public static final Mode FNC1_FIRST_POSITION
public static final Mode FNC1_SECOND_POSITION
public static final Mode HANZI
public static Mode[] values()
for (Mode c : Mode.values()) System.out.println(c);
public static Mode valueOf(String name)
name
- 要返回的枚举常量的名称。如果该枚举类型没有带有指定名称的常量,
- 则抛出 IllegalArgumentException如果参数为空值,
- 则抛出 NullPointerExceptionpublic static Mode forBits(int bits)
bits
- four bits encoding a QR Code data modeIllegalArgumentException
- if bits do not correspond to a known modepublic int getCharacterCountBits(Version version)
version
- version in questionVersion
, to encode the
count of characters that will follow encoded in this Modepublic int getBits()
Copyright © 2007–2014. All rights reserved.