com.google.zxing.qrcode.decoder
Class Mode

java.lang.Object
  extended by com.google.zxing.qrcode.decoder.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:
BlackBerry API 6.0.0

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()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Field Detail

TERMINATOR

public static final Mode TERMINATOR
Since:
BlackBerry API 6.0.0

NUMERIC

public static final Mode NUMERIC
Since:
BlackBerry API 6.0.0

ALPHANUMERIC

public static final Mode ALPHANUMERIC
Since:
BlackBerry API 6.0.0

STRUCTURED_APPEND

public static final Mode STRUCTURED_APPEND
Since:
BlackBerry API 6.0.0

BYTE

public static final Mode BYTE
Since:
BlackBerry API 6.0.0

ECI

public static final Mode ECI
Since:
BlackBerry API 6.0.0

KANJI

public static final Mode KANJI
Since:
BlackBerry API 6.0.0

FNC1_FIRST_POSITION

public static final Mode FNC1_FIRST_POSITION
Since:
BlackBerry API 6.0.0

FNC1_SECOND_POSITION

public static final Mode FNC1_SECOND_POSITION
Since:
BlackBerry API 6.0.0


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
Since:
BlackBerry API 6.0.0

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
Since:
BlackBerry API 6.0.0

getBits

public int getBits()
Since:
BlackBerry API 6.0.0

getName

public String getName()
Since:
BlackBerry API 6.0.0

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Object
Returns:
a string representation of the object.
Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal