mirror of
https://github.com/zxing/zxing.git
synced 2025-01-27 11:01:00 -08:00
Issue 127: Add structured append mode and make it clear this is not supported
git-svn-id: https://zxing.googlecode.com/svn/trunk@828 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
84e3f0f45d
commit
6a5d483aa5
|
@ -80,6 +80,9 @@ final class DecodedBitStreamParser {
|
|||
if (mode.equals(Mode.FNC1_FIRST_POSITION) || mode.equals(Mode.FNC1_SECOND_POSITION)) {
|
||||
// We do little with FNC1 except alter the parsed result a bit according to the spec
|
||||
fc1InEffect = true;
|
||||
} else if (mode.equals(Mode.STRUCTURED_APPEND)) {
|
||||
// not supported
|
||||
throw ReaderException.getInstance();
|
||||
} else if (mode.equals(Mode.ECI)) {
|
||||
// Count doesn't apply to ECI
|
||||
try {
|
||||
|
|
|
@ -29,6 +29,7 @@ public final class Mode {
|
|||
public static final Mode TERMINATOR = new Mode(new int[]{0, 0, 0}, 0x00, "TERMINATOR"); // Not really a mode...
|
||||
public static final Mode NUMERIC = new Mode(new int[]{10, 12, 14}, 0x01, "NUMERIC");
|
||||
public static final Mode ALPHANUMERIC = new Mode(new int[]{9, 11, 13}, 0x02, "ALPHANUMERIC");
|
||||
public static final Mode STRUCTURED_APPEND = new Mode(new int[]{0, 0, 0}, 0x03, "STRUCTURED_APPEND"); // Not supported
|
||||
public static final Mode BYTE = new Mode(new int[]{8, 16, 16}, 0x04, "BYTE");
|
||||
public static final Mode ECI = new Mode(null, 0x07, "ECI"); // character counts don't apply
|
||||
public static final Mode KANJI = new Mode(new int[]{8, 10, 12}, 0x08, "KANJI");
|
||||
|
@ -58,6 +59,8 @@ public final class Mode {
|
|||
return NUMERIC;
|
||||
case 0x2:
|
||||
return ALPHANUMERIC;
|
||||
case 0x3:
|
||||
return STRUCTURED_APPEND;
|
||||
case 0x4:
|
||||
return BYTE;
|
||||
case 0x5:
|
||||
|
|
Loading…
Reference in a new issue