Package com.google.zxing.oned
Class UPCEWriter
- java.lang.Object
-
- com.google.zxing.oned.OneDimensionalCodeWriter
-
- com.google.zxing.oned.UPCEANWriter
-
- com.google.zxing.oned.UPCEWriter
-
- All Implemented Interfaces:
Writer
public final class UPCEWriter extends UPCEANWriter
This object renders an UPC-E code as aBitMatrix
.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
CODE_WIDTH
-
Constructor Summary
Constructors Constructor Description UPCEWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean[]
encode(java.lang.String contents)
Encode the contents to boolean array expression of one-dimensional barcode.protected java.util.Collection<BarcodeFormat>
getSupportedWriteFormats()
-
Methods inherited from class com.google.zxing.oned.UPCEANWriter
getDefaultMargin
-
Methods inherited from class com.google.zxing.oned.OneDimensionalCodeWriter
appendPattern, checkNumeric, encode, encode, encode
-
-
-
-
Field Detail
-
CODE_WIDTH
private static final int CODE_WIDTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSupportedWriteFormats
protected java.util.Collection<BarcodeFormat> getSupportedWriteFormats()
- Overrides:
getSupportedWriteFormats
in classOneDimensionalCodeWriter
-
encode
public boolean[] encode(java.lang.String contents)
Description copied from class:OneDimensionalCodeWriter
Encode the contents to boolean array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included.- Specified by:
encode
in classOneDimensionalCodeWriter
- Parameters:
contents
- barcode contents to encode- Returns:
- a
boolean[]
of horizontal pixels (false = white, true = black)
-
-