public final class UPCEReader extends UPCEANReader
Implements decoding of the UPC-E format.
This is a great reference for UPC-E information.
INTEGER_MATH_SHIFT, PATTERN_MATCH_RESULT_SCALE_FACTOR
Constructor and Description |
---|
UPCEReader() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkChecksum(java.lang.String s) |
static java.lang.String |
convertUPCEtoUPCA(java.lang.String upce)
Expands a UPC-E value back into its full, equivalent UPC-A code value.
|
protected int[] |
decodeEnd(BitArray row,
int endStart) |
protected int |
decodeMiddle(BitArray row,
int[] startRange,
java.lang.StringBuilder result)
Subclasses override this to decode the portion of a barcode between the start
and end guard patterns.
|
decodeRow, decodeRow
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse, reset
protected int decodeMiddle(BitArray row, int[] startRange, java.lang.StringBuilder result) throws NotFoundException
UPCEANReader
decodeMiddle
in class UPCEANReader
row
- row of black/white values to searchstartRange
- start/end offset of start guard patternresult
- StringBuilder
to append decoded chars toNotFoundException
- if decoding could not complete successfullyprotected int[] decodeEnd(BitArray row, int endStart) throws NotFoundException
NotFoundException
protected boolean checkChecksum(java.lang.String s) throws FormatException, ChecksumException
public static java.lang.String convertUPCEtoUPCA(java.lang.String upce)
upce
- UPC-E code as string of digits