java.lang.Object
zext.plantuml.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.

  • Field Details

    • 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 Details

    • 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