barcode4j 2.1.0

org.krysalis.barcode4j.impl.code128
Class DefaultCode128Encoder

java.lang.Object
  extended by org.krysalis.barcode4j.impl.code128.DefaultCode128Encoder
All Implemented Interfaces:
Code128Constants, Code128Encoder

public class DefaultCode128Encoder
extends java.lang.Object
implements Code128Encoder, Code128Constants

Default encoder algorithm for Code128 barcode messages.

Version:
$Id: DefaultCode128Encoder.java,v 1.5 2009/02/18 16:09:05 jmaerki Exp $

Field Summary
 
Fields inherited from interface org.krysalis.barcode4j.impl.code128.Code128Constants
CODESET_A, CODESET_ALL, CODESET_B, CODESET_C
 
Constructor Summary
DefaultCode128Encoder()
          Default constructor allowing all codesets.
DefaultCode128Encoder(int codesets)
          Create a new encoder
 
Method Summary
 int[] encode(java.lang.String message)
          Encodes message using code set A, B and C.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCode128Encoder

public DefaultCode128Encoder(int codesets)
Create a new encoder

Parameters:
codesets - the allowed codesets

DefaultCode128Encoder

public DefaultCode128Encoder()
Default constructor allowing all codesets.

Method Detail

encode

public int[] encode(java.lang.String message)
Encodes message using code set A, B and C. Tries to use as few characters as possible.

Specified by:
encode in interface Code128Encoder
Parameters:
message - to encoded
Returns:
array of code set caracters
See Also:
Code128Encoder.encode(java.lang.String)

barcode4j 2.1.0

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