Class DecodedBitStreamParser
- java.lang.Object
-
- com.google.zxing.maxicode.decoder.DecodedBitStreamParser
-
final class DecodedBitStreamParser extends java.lang.Object
MaxiCodes can encode text or structured information as bits in one of several modes, with multiple character sets in one code. This class decodes the bits back into text.
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]
COUNTRY_BYTES
private static char
ECI
private static char
FS
private static char
GS
private static char
LATCHA
private static char
LATCHB
private static char
LOCK
private static char
NS
private static char
PAD
private static byte[]
POSTCODE_2_BYTES
private static byte[]
POSTCODE_2_LENGTH_BYTES
private static byte[][]
POSTCODE_3_BYTES
private static char
RS
private static byte[]
SERVICE_CLASS_BYTES
private static java.lang.String[]
SETS
private static char
SHIFTA
private static char
SHIFTB
private static char
SHIFTC
private static char
SHIFTD
private static char
SHIFTE
private static char
THREESHIFTA
private static char
TWOSHIFTA
-
Constructor Summary
Constructors Modifier Constructor Description private
DecodedBitStreamParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static DecoderResult
decode(byte[] bytes, int mode)
private static int
getBit(int bit, byte[] bytes)
private static int
getCountry(byte[] bytes)
private static int
getInt(byte[] bytes, byte[] x)
private static java.lang.String
getMessage(byte[] bytes, int start, int len)
private static int
getPostCode2(byte[] bytes)
private static int
getPostCode2Length(byte[] bytes)
private static java.lang.String
getPostCode3(byte[] bytes)
private static int
getServiceClass(byte[] bytes)
-
-
-
Field Detail
-
SHIFTA
private static final char SHIFTA
- See Also:
- Constant Field Values
-
SHIFTB
private static final char SHIFTB
- See Also:
- Constant Field Values
-
SHIFTC
private static final char SHIFTC
- See Also:
- Constant Field Values
-
SHIFTD
private static final char SHIFTD
- See Also:
- Constant Field Values
-
SHIFTE
private static final char SHIFTE
- See Also:
- Constant Field Values
-
TWOSHIFTA
private static final char TWOSHIFTA
- See Also:
- Constant Field Values
-
THREESHIFTA
private static final char THREESHIFTA
- See Also:
- Constant Field Values
-
LATCHA
private static final char LATCHA
- See Also:
- Constant Field Values
-
LATCHB
private static final char LATCHB
- See Also:
- Constant Field Values
-
LOCK
private static final char LOCK
- See Also:
- Constant Field Values
-
ECI
private static final char ECI
- See Also:
- Constant Field Values
-
NS
private static final char NS
- See Also:
- Constant Field Values
-
PAD
private static final char PAD
- See Also:
- Constant Field Values
-
FS
private static final char FS
- See Also:
- Constant Field Values
-
GS
private static final char GS
- See Also:
- Constant Field Values
-
RS
private static final char RS
- See Also:
- Constant Field Values
-
COUNTRY_BYTES
private static final byte[] COUNTRY_BYTES
-
SERVICE_CLASS_BYTES
private static final byte[] SERVICE_CLASS_BYTES
-
POSTCODE_2_LENGTH_BYTES
private static final byte[] POSTCODE_2_LENGTH_BYTES
-
POSTCODE_2_BYTES
private static final byte[] POSTCODE_2_BYTES
-
POSTCODE_3_BYTES
private static final byte[][] POSTCODE_3_BYTES
-
SETS
private static final java.lang.String[] SETS
-
-
Method Detail
-
decode
static DecoderResult decode(byte[] bytes, int mode) throws FormatException
- Throws:
FormatException
-
getBit
private static int getBit(int bit, byte[] bytes)
-
getInt
private static int getInt(byte[] bytes, byte[] x)
-
getCountry
private static int getCountry(byte[] bytes)
-
getServiceClass
private static int getServiceClass(byte[] bytes)
-
getPostCode2Length
private static int getPostCode2Length(byte[] bytes)
-
getPostCode2
private static int getPostCode2(byte[] bytes)
-
getPostCode3
private static java.lang.String getPostCode3(byte[] bytes)
-
getMessage
private static java.lang.String getMessage(byte[] bytes, int start, int len)
-
-