- endPattern = findGuardPattern(row, endStart, END_PATTERN_REVERSED);\r
- } catch (ReaderException e) {\r
- // Put our row of data back the right way before throwing\r
+ int endStart = skipWhiteSpace(row);\r
+ int[] endPattern = findGuardPattern(row, endStart, END_PATTERN_REVERSED);\r
+\r
+ // The start & end patterns must be pre/post fixed by a quiet zone. This\r
+ // zone must be at least 10 times the width of a narrow line.\r
+ // ref: http://www.barcode-1.net/i25code.html\r
+ validateQuietZone(row, endPattern[0]);\r
+\r
+ // Now recalculate the indices of where the 'endblock' starts & stops to\r
+ // accommodate\r
+ // the reversed nature of the search\r
+ int temp = endPattern[0];\r
+ endPattern[0] = row.getSize() - endPattern[1];\r
+ endPattern[1] = row.getSize() - temp;\r
+\r
+ return endPattern;\r
+ } finally {\r
+ // Put the row back the right way.\r