mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue 1737: Add hint to not strip Codabar start/end
git-svn-id: https://zxing.googlecode.com/svn/trunk@2847 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
ef96893525
commit
20193fda16
|
@ -75,6 +75,13 @@ public enum DecodeHintType {
|
|||
*/
|
||||
ASSUME_GS1(Void.class),
|
||||
|
||||
/**
|
||||
* If true, return the start and end digits in a Codabar barcode instead of stripping them. They
|
||||
* are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
|
||||
* to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
|
||||
*/
|
||||
RETURN_CODABAR_START_END(Void.class),
|
||||
|
||||
/**
|
||||
* The caller needs to be notified via callback when a possible {@link ResultPoint}
|
||||
* is found. Maps to a {@link ResultPointCallback}.
|
||||
|
|
|
@ -138,8 +138,10 @@ public final class CodaBarReader extends OneDReader {
|
|||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
|
||||
if (hints == null || !hints.containsKey(DecodeHintType.RETURN_CODABAR_START_END)) {
|
||||
decodeRowResult.deleteCharAt(decodeRowResult.length() - 1);
|
||||
decodeRowResult.deleteCharAt(0);
|
||||
}
|
||||
|
||||
int runningCount = 0;
|
||||
for (int i = 0; i < startOffset; i++) {
|
||||
|
|
Loading…
Reference in a new issue