|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BarcodeStrategy
Interface which defines the barcode strategy for any given type of barcode. Classes that implement this interface exist for each of the barcode types such as Code39, Interleaved25, etc.
Field Summary | |
---|---|
static int |
MANDATORY_CHECKSUM
When returned by requiresChecksum() , indicates that this type of
barcode always has a checksum. |
static int |
NO_CHECKSUM
When returned by requiresChecksum() , indicates that this type of
barcode does not support a checksum. |
static int |
OPTIONAL_CHECKSUM
When returned by requiresChecksum() , indicates that this type of
barcode may have an optional checksum. |
Method Summary | |
---|---|
EncodedBarcode |
encode(java.lang.String text,
boolean checked)
Subclasses implement this method to encode some text into a barcode. |
int |
requiresChecksum()
Subclasses implement this method to determine whether this type of barcode has a mandatory, optional or no checksum. |
Field Detail |
---|
static final int NO_CHECKSUM
requiresChecksum()
, indicates that this type of
barcode does not support a checksum.
static final int MANDATORY_CHECKSUM
requiresChecksum()
, indicates that this type of
barcode always has a checksum.
static final int OPTIONAL_CHECKSUM
requiresChecksum()
, indicates that this type of
barcode may have an optional checksum.
Method Detail |
---|
EncodedBarcode encode(java.lang.String text, boolean checked) throws BarcodeException
text
- The raw text to encode.checked
- true if a checksum is to be calculated, false if not.
EncodedBarcode
object.
BarcodeException
- Typically caused by passing in
a String containing illegal characters (characters that cannot be encoded in
this type of barcode).int requiresChecksum()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |