net.sourceforge.jbarcodebean.model
Class Ean8

java.lang.Object
  extended by net.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy
      extended by net.sourceforge.jbarcodebean.model.Ean13
          extended by net.sourceforge.jbarcodebean.model.Ean8
All Implemented Interfaces:
java.io.Serializable, BarcodeStrategy

public class Ean8
extends Ean13

EAN-8 barcode implementation. If less than 7 digits are supplied, the symbol is invalid Only the first 7 digits are considered: the checksum (8th digit) is always generated (MANDATORY_CHECKSUM).

Author:
Jose Gaonac'h
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy
AbstractBarcodeStrategy.CharacterCode
 
Field Summary
 
Fields inherited from class net.sourceforge.jbarcodebean.model.Ean13
checkSum
 
Fields inherited from interface net.sourceforge.jbarcodebean.model.BarcodeStrategy
MANDATORY_CHECKSUM, NO_CHECKSUM, OPTIONAL_CHECKSUM
 
Constructor Summary
Ean8()
           
 
Method Summary
protected  java.lang.String getBarcodeLabelText(java.lang.String text)
          Subclasses implement this method to return the text which appears below the barcode.
protected  java.lang.String preprocess(java.lang.String text)
          Subclasses implement this method to perform any preprocessing necessary on the original text to encode.
 
Methods inherited from class net.sourceforge.jbarcodebean.model.Ean13
augmentWithChecksum, computeChecksum, getCodes, getMarginWidth, getStartSentinel, getStopSentinel, isInterleaved, postprocess, requiresChecksum
 
Methods inherited from class net.sourceforge.jbarcodebean.model.AbstractBarcodeStrategy
computeSize, encode, getCharacterCode, getCharacterCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ean8

public Ean8()
Method Detail

preprocess

protected java.lang.String preprocess(java.lang.String text)
Description copied from class: AbstractBarcodeStrategy
Subclasses implement this method to perform any preprocessing necessary on the original text to encode. The result of this method is the string that gets passed to the AbstractBarcodeStrategy.augmentWithChecksum(java.lang.String) method.

Overrides:
preprocess in class Ean13
Parameters:
text - The raw text to encode.
Returns:
The string after preprocessing. If no preprocessing is required, the String passed to the method is returned.

getBarcodeLabelText

protected java.lang.String getBarcodeLabelText(java.lang.String text)
Description copied from class: AbstractBarcodeStrategy
Subclasses implement this method to return the text which appears below the barcode.

Overrides:
getBarcodeLabelText in class Ean13
Parameters:
text - The raw text to encode.
Returns:
A String containing the text that will appear beneath the barcode.


Copyright © 2004-2009 The JBarcodeBean project. All Rights Reserved.