public class Interleaved2Of5LogicImpl extends Object
| Constructor and Description |
|---|
Interleaved2Of5LogicImpl(ChecksumMode mode,
boolean displayChecksum)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static char |
calcChecksum(String msg)
Calculates the checksum for a message to be encoded as an
Interleaved 2 of 5 barcode.
|
static char |
calcChecksum(String msg,
int oddMultiplier,
int evenMultiplier)
Calculates the checksum for a message to be encoded as an
Interleaved 2 of 5 barcode.
|
protected String |
doHandleChecksum(StringBuffer sb,
ChecksumMode mode)
Handles the checksum based on the given checksum mode.
|
void |
generateBarcodeLogic(ClassicBarcodeLogicHandler logic,
String msg)
Generates the barcode logic.
|
ChecksumMode |
getChecksumMode()
Returns the current checksum mode
|
protected String |
handleChecksum(StringBuffer sb)
Handles the checksum based on the checksum mode.
|
static boolean |
validateChecksum(String msg)
Verifies the checksum for a message.
|
public Interleaved2Of5LogicImpl(ChecksumMode mode, boolean displayChecksum)
mode - the checksum modedisplayChecksum - Controls whether to display checksum
in the human-readable messagepublic ChecksumMode getChecksumMode()
public static char calcChecksum(String msg, int oddMultiplier, int evenMultiplier)
msg - message to calculate the check digit foroddMultiplier - multiplier to be used for odd positions (usually 3 or 4)evenMultiplier - multiplier to be used for even positions (usually 1 or 9)public static char calcChecksum(String msg)
msg - message to calculate the check digit forpublic static boolean validateChecksum(String msg)
msg - message (check digit included)protected String doHandleChecksum(StringBuffer sb, ChecksumMode mode)
sb - the string buffer containing the messagemode - the checksum modeprotected String handleChecksum(StringBuffer sb)
sb - the string buffer containing the messagepublic void generateBarcodeLogic(ClassicBarcodeLogicHandler logic, String msg)
logic - the logic handler to receive generated eventsmsg - the message to encodeCopyright © 2003–2023. All rights reserved.