Package com.google.zxing.oned
Class Code128Writer
java.lang.Object
com.google.zxing.oned.OneDimensionalCodeWriter
com.google.zxing.oned.Code128Writer
- All Implemented Interfaces:
Writer
This object renders a CODE128 code as a
BitMatrix
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enum
private static final class
Encodes minimally using Divide-And-Conquer with Memoization -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final char
private static final char
private static final char
private static final char
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
check
(String contents, Map<EncodeHintType, ?> hints) private static int
chooseCode
(CharSequence value, int start, int oldCode) boolean[]
Encode the contents to boolean array expression of one-dimensional barcode.boolean[]
encode
(String contents, Map<EncodeHintType, ?> hints) Can be overwritten if the encode requires to read the hints map.private static boolean[]
encodeFast
(String contents, int forcedCodeSet) private static Code128Writer.CType
findCType
(CharSequence value, int start) protected Collection
<BarcodeFormat> (package private) static boolean[]
produceResult
(Collection<int[]> patterns, int checkSum) Methods inherited from class com.google.zxing.oned.OneDimensionalCodeWriter
appendPattern, checkNumeric, encode, encode, getDefaultMargin
-
Field Details
-
CODE_START_A
private static final int CODE_START_A- See Also:
-
CODE_START_B
private static final int CODE_START_B- See Also:
-
CODE_START_C
private static final int CODE_START_C- See Also:
-
CODE_CODE_A
private static final int CODE_CODE_A- See Also:
-
CODE_CODE_B
private static final int CODE_CODE_B- See Also:
-
CODE_CODE_C
private static final int CODE_CODE_C- See Also:
-
CODE_STOP
private static final int CODE_STOP- See Also:
-
ESCAPE_FNC_1
private static final char ESCAPE_FNC_1- See Also:
-
ESCAPE_FNC_2
private static final char ESCAPE_FNC_2- See Also:
-
ESCAPE_FNC_3
private static final char ESCAPE_FNC_3- See Also:
-
ESCAPE_FNC_4
private static final char ESCAPE_FNC_4- See Also:
-
CODE_FNC_1
private static final int CODE_FNC_1- See Also:
-
CODE_FNC_2
private static final int CODE_FNC_2- See Also:
-
CODE_FNC_3
private static final int CODE_FNC_3- See Also:
-
CODE_FNC_4_A
private static final int CODE_FNC_4_A- See Also:
-
CODE_FNC_4_B
private static final int CODE_FNC_4_B- See Also:
-
-
Constructor Details
-
Code128Writer
public Code128Writer()
-
-
Method Details
-
getSupportedWriteFormats
- Overrides:
getSupportedWriteFormats
in classOneDimensionalCodeWriter
-
encode
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)
-
encode
Description copied from class:OneDimensionalCodeWriter
Can be overwritten if the encode requires to read the hints map. Otherwise it defaults toencode
.- Overrides:
encode
in classOneDimensionalCodeWriter
- Parameters:
contents
- barcode contents to encodehints
- encoding hints- Returns:
- a
boolean[]
of horizontal pixels (false = white, true = black)
-
check
-
encodeFast
-
produceResult
-
findCType
-
chooseCode
-