barcode4j 2.1.0

org.krysalis.barcode4j.impl.fourstate
Class USPSIntelligentMailLogicImpl

java.lang.Object
  extended by org.krysalis.barcode4j.impl.fourstate.AbstractFourStateLogicImpl
      extended by org.krysalis.barcode4j.impl.fourstate.USPSIntelligentMailLogicImpl

public class USPSIntelligentMailLogicImpl
extends AbstractFourStateLogicImpl

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
USPSIntelligentMailLogicImpl()
          Main constructor.
 
Method Summary
 char calcChecksum(java.lang.String msg)
          Calculates the checksum for a message to be encoded as an one of the foru-state barcode symbologies.
protected  java.lang.String[] encodeHighLevel(java.lang.String msg)
          Does the high-level encoding of the message into codewords.
 void generateBarcodeLogic(ClassicBarcodeLogicHandler logic, java.lang.String msg)
          Generates the barcode logic
protected  java.lang.String normalizeMessage(java.lang.String msg)
          Turns the given message into a normalize representation.
 
Methods inherited from class org.krysalis.barcode4j.impl.fourstate.AbstractFourStateLogicImpl
encodeCodeword, getChecksumMode, isIgnoredChar, validateChecksum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

USPSIntelligentMailLogicImpl

public USPSIntelligentMailLogicImpl()
Main constructor.

Method Detail

calcChecksum

public char calcChecksum(java.lang.String msg)
Calculates the checksum for a message to be encoded as an one of the foru-state barcode symbologies.

Specified by:
calcChecksum in class AbstractFourStateLogicImpl
Parameters:
msg - message to calculate the check digit for
Returns:
char the check digit

encodeHighLevel

protected java.lang.String[] encodeHighLevel(java.lang.String msg)
Does the high-level encoding of the message into codewords.

Specified by:
encodeHighLevel in class AbstractFourStateLogicImpl
Parameters:
msg - the message
Returns:
an array of Strings with codewords

normalizeMessage

protected java.lang.String normalizeMessage(java.lang.String msg)
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:
normalizeMessage in class AbstractFourStateLogicImpl
Parameters:
msg - the message
Returns:
the normalized message to be encoded

generateBarcodeLogic

public void generateBarcodeLogic(ClassicBarcodeLogicHandler logic,
                                 java.lang.String msg)
Generates the barcode logic

Overrides:
generateBarcodeLogic in class AbstractFourStateLogicImpl
Parameters:
logic - the logic handler to receive generated events
msg - the message to encode

barcode4j 2.1.0

Copyright © 2000-2010 Jeremias Maerki. All rights reserved.