Package com.google.zxing.qrcode.decoder
Class DecodedBitStreamParser
- java.lang.Object
-
- com.google.zxing.qrcode.decoder.DecodedBitStreamParser
-
final class DecodedBitStreamParser extends java.lang.ObjectQR Codes can encode text as bits in one of several modes, and can use multiple modes in one QR Code. This class decodes the bits back into text.
See ISO 18004:2006, 6.4.3 - 6.4.7
-
-
Field Summary
Fields Modifier and Type Field Description private static char[]ALPHANUMERIC_CHARSSee ISO 18004:2006, 6.4.4 Table 5private static intGB2312_SUBSET
-
Constructor Summary
Constructors Modifier Constructor Description privateDecodedBitStreamParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static DecoderResultdecode(byte[] bytes, Version version, ErrorCorrectionLevel ecLevel, java.util.Map<DecodeHintType,?> hints)private static voiddecodeAlphanumericSegment(BitSource bits, java.lang.StringBuilder result, int count, boolean fc1InEffect)private static voiddecodeByteSegment(BitSource bits, java.lang.StringBuilder result, int count, CharacterSetECI currentCharacterSetECI, java.util.Collection<byte[]> byteSegments, java.util.Map<DecodeHintType,?> hints)private static voiddecodeHanziSegment(BitSource bits, java.lang.StringBuilder result, int count)See specification GBT 18284-2000private static voiddecodeKanjiSegment(BitSource bits, java.lang.StringBuilder result, int count)private static voiddecodeNumericSegment(BitSource bits, java.lang.StringBuilder result, int count)private static intparseECIValue(BitSource bits)private static chartoAlphaNumericChar(int value)
-
-
-
Field Detail
-
ALPHANUMERIC_CHARS
private static final char[] ALPHANUMERIC_CHARS
See ISO 18004:2006, 6.4.4 Table 5
-
GB2312_SUBSET
private static final int GB2312_SUBSET
- See Also:
- Constant Field Values
-
-
Method Detail
-
decode
static DecoderResult decode(byte[] bytes, Version version, ErrorCorrectionLevel ecLevel, java.util.Map<DecodeHintType,?> hints) throws FormatException
- Throws:
FormatException
-
decodeHanziSegment
private static void decodeHanziSegment(BitSource bits, java.lang.StringBuilder result, int count) throws FormatException
See specification GBT 18284-2000- Throws:
FormatException
-
decodeKanjiSegment
private static void decodeKanjiSegment(BitSource bits, java.lang.StringBuilder result, int count) throws FormatException
- Throws:
FormatException
-
decodeByteSegment
private static void decodeByteSegment(BitSource bits, java.lang.StringBuilder result, int count, CharacterSetECI currentCharacterSetECI, java.util.Collection<byte[]> byteSegments, java.util.Map<DecodeHintType,?> hints) throws FormatException
- Throws:
FormatException
-
toAlphaNumericChar
private static char toAlphaNumericChar(int value) throws FormatException- Throws:
FormatException
-
decodeAlphanumericSegment
private static void decodeAlphanumericSegment(BitSource bits, java.lang.StringBuilder result, int count, boolean fc1InEffect) throws FormatException
- Throws:
FormatException
-
decodeNumericSegment
private static void decodeNumericSegment(BitSource bits, java.lang.StringBuilder result, int count) throws FormatException
- Throws:
FormatException
-
parseECIValue
private static int parseECIValue(BitSource bits) throws FormatException
- Throws:
FormatException
-
-