"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/oned/rss/expanded/decoders/GeneralAppIdDecoder.java" between
zxing-zxing-3.4.1.tar.gz and zxing-zxing-3.5.0.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Info: Project is in maintenance mode (no active development).

GeneralAppIdDecoder.java  (zxing-zxing-3.4.1):GeneralAppIdDecoder.java  (zxing-zxing-3.5.0)
skipping to change at line 188 skipping to change at line 188
DecodedInformation information = new DecodedInformation(current.getPosit ion(), buffer.toString()); DecodedInformation information = new DecodedInformation(current.getPosit ion(), buffer.toString());
return new BlockParsedResult(information, true); return new BlockParsedResult(information, true);
} }
buffer.append(numeric.getSecondDigit()); buffer.append(numeric.getSecondDigit());
} }
if (isNumericToAlphaNumericLatch(current.getPosition())) { if (isNumericToAlphaNumericLatch(current.getPosition())) {
current.setAlpha(); current.setAlpha();
current.incrementPosition(4); current.incrementPosition(4);
} }
return new BlockParsedResult(false); return new BlockParsedResult();
} }
private BlockParsedResult parseIsoIec646Block() throws FormatException { private BlockParsedResult parseIsoIec646Block() throws FormatException {
while (isStillIsoIec646(current.getPosition())) { while (isStillIsoIec646(current.getPosition())) {
DecodedChar iso = decodeIsoIec646(current.getPosition()); DecodedChar iso = decodeIsoIec646(current.getPosition());
current.setPosition(iso.getNewPosition()); current.setPosition(iso.getNewPosition());
if (iso.isFNC1()) { if (iso.isFNC1()) {
DecodedInformation information = new DecodedInformation(current.getPosit ion(), buffer.toString()); DecodedInformation information = new DecodedInformation(current.getPosit ion(), buffer.toString());
return new BlockParsedResult(information, true); return new BlockParsedResult(information, true);
skipping to change at line 215 skipping to change at line 215
current.setNumeric(); current.setNumeric();
} else if (isAlphaTo646ToAlphaLatch(current.getPosition())) { } else if (isAlphaTo646ToAlphaLatch(current.getPosition())) {
if (current.getPosition() + 5 < this.information.getSize()) { if (current.getPosition() + 5 < this.information.getSize()) {
current.incrementPosition(5); current.incrementPosition(5);
} else { } else {
current.setPosition(this.information.getSize()); current.setPosition(this.information.getSize());
} }
current.setAlpha(); current.setAlpha();
} }
return new BlockParsedResult(false); return new BlockParsedResult();
} }
private BlockParsedResult parseAlphaBlock() { private BlockParsedResult parseAlphaBlock() {
while (isStillAlpha(current.getPosition())) { while (isStillAlpha(current.getPosition())) {
DecodedChar alpha = decodeAlphanumeric(current.getPosition()); DecodedChar alpha = decodeAlphanumeric(current.getPosition());
current.setPosition(alpha.getNewPosition()); current.setPosition(alpha.getNewPosition());
if (alpha.isFNC1()) { if (alpha.isFNC1()) {
DecodedInformation information = new DecodedInformation(current.getPosit ion(), buffer.toString()); DecodedInformation information = new DecodedInformation(current.getPosit ion(), buffer.toString());
return new BlockParsedResult(information, true); //end of the char block return new BlockParsedResult(information, true); //end of the char block
skipping to change at line 243 skipping to change at line 243
current.setNumeric(); current.setNumeric();
} else if (isAlphaTo646ToAlphaLatch(current.getPosition())) { } else if (isAlphaTo646ToAlphaLatch(current.getPosition())) {
if (current.getPosition() + 5 < this.information.getSize()) { if (current.getPosition() + 5 < this.information.getSize()) {
current.incrementPosition(5); current.incrementPosition(5);
} else { } else {
current.setPosition(this.information.getSize()); current.setPosition(this.information.getSize());
} }
current.setIsoIec646(); current.setIsoIec646();
} }
return new BlockParsedResult(false); return new BlockParsedResult();
} }
private boolean isStillIsoIec646(int pos) { private boolean isStillIsoIec646(int pos) {
if (pos + 5 > this.information.getSize()) { if (pos + 5 > this.information.getSize()) {
return false; return false;
} }
int fiveBitValue = extractNumericValueFromBitArray(pos, 5); int fiveBitValue = extractNumericValueFromBitArray(pos, 5);
if (fiveBitValue >= 5 && fiveBitValue < 16) { if (fiveBitValue >= 5 && fiveBitValue < 16) {
return true; return true;
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)