Class USPSIntelligentMailLogicImpl
java.lang.Object
org.krysalis.barcode4j.impl.fourstate.AbstractFourStateLogicImpl
org.krysalis.barcode4j.impl.fourstate.USPSIntelligentMailLogicImpl
This class is a logic implementation for the USPS Intelligent Mail Barcode (aka 4-State Customer
Barcode, USPS-B-3200 revision E, 2007-10-30).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharcalcChecksum(String msg) Calculates the checksum for a message to be encoded as an one of the foru-state barcode symbologies.protected String[]encodeHighLevel(String msg) Does the high-level encoding of the message into codewords.voidgenerateBarcodeLogic(ClassicBarcodeLogicHandler logic, String msg) Generates the barcode logicprotected StringnormalizeMessage(String msg) Turns the given message into a normalize representation.Methods inherited from class org.krysalis.barcode4j.impl.fourstate.AbstractFourStateLogicImpl
encodeCodeword, getChecksumMode, isIgnoredChar, validateChecksum
-
Constructor Details
-
USPSIntelligentMailLogicImpl
public USPSIntelligentMailLogicImpl()Main constructor.
-
-
Method Details
-
calcChecksum
Calculates the checksum for a message to be encoded as an one of the foru-state barcode symbologies.- Specified by:
calcChecksumin classAbstractFourStateLogicImpl- Parameters:
msg- message to calculate the check digit for- Returns:
- char the check digit
-
normalizeMessage
Turns the given message into a normalize representation. Some subclasses may update/add parentheses around the message and/or handle the checksum as necessary.- Specified by:
normalizeMessagein classAbstractFourStateLogicImpl- Parameters:
msg- the message- Returns:
- the normalized message to be encoded
-
encodeHighLevel
Does the high-level encoding of the message into codewords.- Specified by:
encodeHighLevelin classAbstractFourStateLogicImpl- Parameters:
msg- the message- Returns:
- an array of Strings with codewords
-
generateBarcodeLogic
Generates the barcode logic- Overrides:
generateBarcodeLogicin classAbstractFourStateLogicImpl- Parameters:
logic- the logic handler to receive generated eventsmsg- the message to encode
-