"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/oned/UPCEANReader.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).

UPCEANReader.java  (zxing-zxing-3.4.1):UPCEANReader.java  (zxing-zxing-3.5.0)
skipping to change at line 156 skipping to change at line 156
* @throws FormatException if a potential barcode is found but format is inval id * @throws FormatException if a potential barcode is found but format is inval id
*/ */
public Result decodeRow(int rowNumber, public Result decodeRow(int rowNumber,
BitArray row, BitArray row,
int[] startGuardRange, int[] startGuardRange,
Map<DecodeHintType,?> hints) Map<DecodeHintType,?> hints)
throws NotFoundException, ChecksumException, FormatException { throws NotFoundException, ChecksumException, FormatException {
ResultPointCallback resultPointCallback = hints == null ? null : ResultPointCallback resultPointCallback = hints == null ? null :
(ResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBAC K); (ResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBAC K);
int symbologyIdentifier = 0;
if (resultPointCallback != null) { if (resultPointCallback != null) {
resultPointCallback.foundPossibleResultPoint(new ResultPoint( resultPointCallback.foundPossibleResultPoint(new ResultPoint(
(startGuardRange[0] + startGuardRange[1]) / 2.0f, rowNumber (startGuardRange[0] + startGuardRange[1]) / 2.0f, rowNumber
)); ));
} }
StringBuilder result = decodeRowStringBuffer; StringBuilder result = decodeRowStringBuffer;
result.setLength(0); result.setLength(0);
int endStart = decodeMiddle(row, startGuardRange, result); int endStart = decodeMiddle(row, startGuardRange, result);
skipping to change at line 241 skipping to change at line 242
throw NotFoundException.getNotFoundInstance(); throw NotFoundException.getNotFoundInstance();
} }
} }
if (format == BarcodeFormat.EAN_13 || format == BarcodeFormat.UPC_A) { if (format == BarcodeFormat.EAN_13 || format == BarcodeFormat.UPC_A) {
String countryID = eanManSupport.lookupCountryIdentifier(resultString); String countryID = eanManSupport.lookupCountryIdentifier(resultString);
if (countryID != null) { if (countryID != null) {
decodeResult.putMetadata(ResultMetadataType.POSSIBLE_COUNTRY, countryID) ; decodeResult.putMetadata(ResultMetadataType.POSSIBLE_COUNTRY, countryID) ;
} }
} }
if (format == BarcodeFormat.EAN_8) {
symbologyIdentifier = 4;
}
decodeResult.putMetadata(ResultMetadataType.SYMBOLOGY_IDENTIFIER, "]E" + sym
bologyIdentifier);
return decodeResult; return decodeResult;
} }
/** /**
* @param s string of digits to check * @param s string of digits to check
* @return {@link #checkStandardUPCEANChecksum(CharSequence)} * @return {@link #checkStandardUPCEANChecksum(CharSequence)}
* @throws FormatException if the string does not contain only digits * @throws FormatException if the string does not contain only digits
*/ */
boolean checkChecksum(String s) throws FormatException { boolean checkChecksum(String s) throws FormatException {
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added

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