Package com.google.zxing.qrcode.decoder
Class DecodedBitStreamParser
java.lang.Object
com.google.zxing.qrcode.decoder.DecodedBitStreamParser
QR 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
FieldsModifier and TypeFieldDescriptionprivate static final char[]
See ISO 18004:2006, 6.4.4 Table 5private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static DecoderResult
decode
(byte[] bytes, Version version, ErrorCorrectionLevel ecLevel, Map<DecodeHintType, ?> hints) private static void
decodeAlphanumericSegment
(BitSource bits, StringBuilder result, int count, boolean fc1InEffect) private static void
decodeByteSegment
(BitSource bits, StringBuilder result, int count, CharacterSetECI currentCharacterSetECI, Collection<byte[]> byteSegments, Map<DecodeHintType, ?> hints) private static void
decodeHanziSegment
(BitSource bits, StringBuilder result, int count) See specification GBT 18284-2000private static void
decodeKanjiSegment
(BitSource bits, StringBuilder result, int count) private static void
decodeNumericSegment
(BitSource bits, StringBuilder result, int count) private static int
parseECIValue
(BitSource bits) private static char
toAlphaNumericChar
(int value)
-
Field Details
-
ALPHANUMERIC_CHARS
private static final char[] ALPHANUMERIC_CHARSSee ISO 18004:2006, 6.4.4 Table 5 -
GB2312_SUBSET
private static final int GB2312_SUBSET- See Also:
-
-
Constructor Details
-
DecodedBitStreamParser
private DecodedBitStreamParser()
-
-
Method Details
-
decode
static DecoderResult decode(byte[] bytes, Version version, ErrorCorrectionLevel ecLevel, Map<DecodeHintType, ?> hints) throws FormatException- Throws:
FormatException
-
decodeHanziSegment
private static void decodeHanziSegment(BitSource bits, StringBuilder result, int count) throws FormatException See specification GBT 18284-2000- Throws:
FormatException
-
decodeKanjiSegment
private static void decodeKanjiSegment(BitSource bits, StringBuilder result, int count) throws FormatException - Throws:
FormatException
-
decodeByteSegment
private static void decodeByteSegment(BitSource bits, StringBuilder result, int count, CharacterSetECI currentCharacterSetECI, Collection<byte[]> byteSegments, Map<DecodeHintType, ?> hints) throws FormatException- Throws:
FormatException
-
toAlphaNumericChar
- Throws:
FormatException
-
decodeAlphanumericSegment
private static void decodeAlphanumericSegment(BitSource bits, StringBuilder result, int count, boolean fc1InEffect) throws FormatException - Throws:
FormatException
-
decodeNumericSegment
private static void decodeNumericSegment(BitSource bits, StringBuilder result, int count) throws FormatException - Throws:
FormatException
-
parseECIValue
- Throws:
FormatException
-