com.itextpdf.text.pdf.qrcode
Class Mode

java.lang.Object
  extended by com.itextpdf.text.pdf.qrcode.Mode

public final class Mode
extends Object

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.

Since:
5.0.2
Author:
Sean Owen

Field Summary
static Mode ALPHANUMERIC
           
static Mode BYTE
           
static Mode ECI
           
static Mode FNC1_FIRST_POSITION
           
static Mode FNC1_SECOND_POSITION
           
static Mode KANJI
           
static Mode NUMERIC
           
static Mode STRUCTURED_APPEND
           
static Mode TERMINATOR
           
 
Method Summary
static Mode forBits(int bits)
           
 int getBits()
           
 int getCharacterCountBits(Version version)
           
 String getName()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TERMINATOR

public static final Mode TERMINATOR

NUMERIC

public static final Mode NUMERIC

ALPHANUMERIC

public static final Mode ALPHANUMERIC

STRUCTURED_APPEND

public static final Mode STRUCTURED_APPEND

BYTE

public static final Mode BYTE

ECI

public static final Mode ECI

KANJI

public static final Mode KANJI

FNC1_FIRST_POSITION

public static final Mode FNC1_FIRST_POSITION

FNC1_SECOND_POSITION

public static final Mode FNC1_SECOND_POSITION
Method Detail

forBits

public static Mode forBits(int bits)
Parameters:
bits - four bits encoding a QR Code data mode
Returns:
Mode encoded by these bits
Throws:
IllegalArgumentException - if bits do not correspond to a known mode

getCharacterCountBits

public int getCharacterCountBits(Version version)
Parameters:
version - version in question
Returns:
number of bits used, in this QR Code symbol Version, to encode the count of characters that will follow encoded in this Mode

getBits

public int getBits()

getName

public String getName()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.