|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.krysalis.barcode4j.impl.postnet.POSTNETLogicImpl
public class POSTNETLogicImpl
Implements the United States Postal Service Postnet barcode.
Constructor Summary | |
---|---|
POSTNETLogicImpl(ChecksumMode mode,
boolean displayChecksum)
Main constructor |
Method Summary | |
---|---|
static char |
calcChecksum(java.lang.String msg)
Calculates the checksum for a message to be encoded as an POSTNET barcode. |
protected void |
encodeChar(ClassicBarcodeLogicHandler logic,
char c)
Encodes a single character. |
void |
generateBarcodeLogic(ClassicBarcodeLogicHandler logic,
java.lang.String msg)
Generates the barcode logic |
ChecksumMode |
getChecksumMode()
Returns the currently active checksum mode. |
static boolean |
isIgnoredChar(char c)
Checks if a character is an ignored character (such as a '-' (dash)). |
static java.lang.String |
removeIgnoredCharacters(java.lang.String msg)
Removes ignored character from a valid POSTNET message. |
static boolean |
validateChecksum(java.lang.String msg)
Verifies the checksum for a message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public POSTNETLogicImpl(ChecksumMode mode, boolean displayChecksum)
mode
- checksum modedisplayChecksum
- Controls whether to display checksum
in the human-readable messageMethod Detail |
---|
public ChecksumMode getChecksumMode()
public static char calcChecksum(java.lang.String msg)
msg
- message to calculate the check digit for
public static boolean validateChecksum(java.lang.String msg)
msg
- message (check digit included)
public static boolean isIgnoredChar(char c)
c
- character to check
public static java.lang.String removeIgnoredCharacters(java.lang.String msg)
msg
- valid POSTNET message
protected void encodeChar(ClassicBarcodeLogicHandler logic, char c)
logic
- the logic handler to receive generated eventsc
- the character to encodepublic void generateBarcodeLogic(ClassicBarcodeLogicHandler logic, java.lang.String msg)
logic
- the logic handler to receive generated eventsmsg
- the message to encode
|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |