com.google.zxing.oned
Class EAN8Writer

java.lang.Object
  extended by com.google.zxing.oned.AbstractUPCEANWriter
      extended by com.google.zxing.oned.EAN8Writer
All Implemented Interfaces:
UPCEANWriter, Writer

public final class EAN8Writer
extends AbstractUPCEANWriter

This object renders an EAN8 code as a ByteMatrix 2D array of greyscale values.

Since:
BlackBerry API 6.0.0

Constructor Summary
EAN8Writer()
           
 
Method Summary
 byte[] encode(String contents)
           
 ByteMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints)
           
 
Methods inherited from class com.google.zxing.oned.AbstractUPCEANWriter
appendPattern, encode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

EAN8Writer

public EAN8Writer()
Since:
BlackBerry API 6.0.0


Method Detail

encode

public ByteMatrix encode(String contents,
                         BarcodeFormat format,
                         int width,
                         int height,
                         Hashtable hints)
                  throws WriterException
Specified by:
encode in interface Writer
Overrides:
encode in class AbstractUPCEANWriter
Parameters:
contents - The contents to encode in the barcode
format - The barcode format to generate
width - The preferred width in pixels
height - The preferred height in pixels
hints - Additional parameters to supply to the encoder
Returns:
The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white)
Throws:
WriterException
Since:
BlackBerry API 6.0.0

encode

public byte[] encode(String contents)
Returns:
a byte array of horizontal pixels (0 = white, 1 = black)
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.