Class RoyalMailCBCLogicImpl
java.lang.Object
org.krysalis.barcode4j.impl.fourstate.AbstractFourStateLogicImpl
org.krysalis.barcode4j.impl.fourstate.AbstractRMCBCKIXLogicImpl
org.krysalis.barcode4j.impl.fourstate.RoyalMailCBCLogicImpl
Implements the Royal Mail Customer Barcode (CBC).
- Version:
- $Id: RoyalMailCBCLogicImpl.java,v 1.2 2008-05-13 13:00:43 jmaerki Exp $
-
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 StringhandleChecksum(String msg) Handles the checksum, either checking if the right value was specified or adding the missing checksum depending on the settings.normalizeMessage(String msg) Turns the given message into a normalize representation.static StringremoveStartStop(String msg) Removes the start and stop characters from the message.Methods inherited from class org.krysalis.barcode4j.impl.fourstate.AbstractRMCBCKIXLogicImpl
encodeHighLevelMethods inherited from class org.krysalis.barcode4j.impl.fourstate.AbstractFourStateLogicImpl
encodeCodeword, generateBarcodeLogic, getChecksumMode, isIgnoredChar, validateChecksum
-
Constructor Details
-
RoyalMailCBCLogicImpl
Main constructor- Parameters:
mode- checksum mode
-
-
Method Details
-
removeStartStop
Removes the start and stop characters from the message.- Parameters:
msg- the message- Returns:
- the modified message
-
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
-
handleChecksum
Handles the checksum, either checking if the right value was specified or adding the missing checksum depending on the settings.- Parameters:
msg- the message- Returns:
- the (possibly) modified message
-