public abstract class BaseCode39 extends AbstractBarcodeStrategy
AbstractBarcodeStrategy.CharacterCode
Modifier and Type | Field and Description |
---|---|
protected static AbstractBarcodeStrategy.CharacterCode[] |
codes
A static array of
CharacterCode objects
for the 3:1 (wide) variants of Code 39. |
protected static AbstractBarcodeStrategy.CharacterCode[] |
codes2to1
A static array of
CharacterCode objects
for the 2:1 (narrow) variants of Code 39. |
MANDATORY_CHECKSUM, NO_CHECKSUM, OPTIONAL_CHECKSUM
Constructor and Description |
---|
BaseCode39() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
augmentWithChecksum(java.lang.String text)
Returns a String containing the checksum-encoded version of the text passed
to the method.
|
protected byte |
getMarginWidth()
Always returns 11 (eleven).
|
protected char |
getStartSentinel()
Always returns '*' (asterisk).
|
protected char |
getStopSentinel()
Always returns '*' (asterisk).
|
protected boolean |
isInterleaved()
Always returns false.
|
protected java.lang.String |
postprocess(java.lang.String text)
Does nothing except return the String passed to the method.
|
int |
requiresChecksum()
Always returns
BarcodeStrategy.OPTIONAL_CHECKSUM . |
computeSize, encode, getBarcodeLabelText, getCharacterCode, getCharacterCode, getCodes, preprocess
protected static AbstractBarcodeStrategy.CharacterCode[] codes
CharacterCode
objects
for the 3:1 (wide) variants of Code 39. The
getCodes()
method of the wide
Code 39 subclasses (Code39
and ExtendedCode39
)
return this array.protected static AbstractBarcodeStrategy.CharacterCode[] codes2to1
CharacterCode
objects
for the 2:1 (narrow) variants of Code 39. The
getCodes()
method of the narrow
Code 39 subclasses (Code39_2to1
and ExtendedCode39_2to1
)
return this array.public int requiresChecksum()
BarcodeStrategy.OPTIONAL_CHECKSUM
.protected byte getMarginWidth()
getMarginWidth
in class AbstractBarcodeStrategy
protected char getStartSentinel()
getStartSentinel
in class AbstractBarcodeStrategy
protected char getStopSentinel()
getStopSentinel
in class AbstractBarcodeStrategy
protected boolean isInterleaved()
isInterleaved
in class AbstractBarcodeStrategy
protected java.lang.String postprocess(java.lang.String text)
postprocess
in class AbstractBarcodeStrategy
text
- String to process (returned by
AbstractBarcodeStrategy.augmentWithChecksum(java.lang.String)
).protected java.lang.String augmentWithChecksum(java.lang.String text) throws BarcodeException
augmentWithChecksum
in class AbstractBarcodeStrategy
text
- The text to encode (after preprocessing - see
AbstractBarcodeStrategy.preprocess(java.lang.String)
).BarcodeException
Copyright ? 2022. All Rights Reserved.