public final class Code39Writer extends OneDimensionalCodeWriter
BitMatrix.
| Constructor and Description |
|---|
Code39Writer()
|
| Modifier and Type | Method and Description |
|---|---|
boolean[] |
encode(String
Encode the contents to boolean array expression of one-dimensional barcode.
|
BitMatrix |
encode(String
Encode the contents following specified format.
|
appendPattern, encode, getDefaultMarginpublic BitMatrixencode(String contents, BarcodeFormat format, int width, int height, Map <EncodeHintType ,?> hints) throws WriterException
OneDimensionalCodeWriter
width and
height are required size. This method may return bigger size
BitMatrix when specified size is too small. The user can set both
width and
height to zero to get minimum size barcode. If negative value is set to
width or
height,
IllegalArgumentException is thrown.
encode in interface
Writer
encode in class
OneDimensionalCodeWriter
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
BitMatrix representing encoded barcode image
WriterException - if contents cannot be encoded legally in a format
public boolean[] encode(Stringcontents)
OneDimensionalCodeWriter
encode in class
OneDimensionalCodeWriter
contents - barcode contents to encode
boolean[] of horizontal pixels (false = white, true = black)