Class MinimalEncoder.Edge
java.lang.Object
com.google.zxing.datamatrix.encoder.MinimalEncoder.Edge
- Enclosing class:
MinimalEncoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int[]
private final int
private final int
private final int
private final MinimalEncoder.Input
private final MinimalEncoder.Mode
private final MinimalEncoder.Edge
private static final int[]
private static final int[]
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Edge
(MinimalEncoder.Input input, MinimalEncoder.Mode mode, int fromPosition, int characterLength, MinimalEncoder.Edge previous) -
Method Summary
Modifier and TypeMethodDescription(package private) int
(package private) static byte[]
getBytes
(int c) (package private) static byte[]
getBytes
(int c1, int c2) private static int
getC40Value
(boolean c40, int setIndex, char c, int fnc1) (package private) byte[]
getC40Words
(boolean c40, int fnc1) (package private) int
getCodewordsRemaining
(int minimum) Returns the remaining capacity in codewords of the smallest symbol that has enough capacity to fit the given minimal number of codewords.(package private) byte[]
(package private) byte[]
(package private) MinimalEncoder.Mode
Returns Mode.ASCII in case that: - Mode is EDIFACT and characterLength is less than 4 or the remaining characters can be encoded in at most 2 ASCII bytes.(package private) int
Peeks ahead and returns 1 if the postfix consists of exactly two digits, 2 if the postfix consists of exactly two consecutive digits and a non extended character or of 4 digits.(package private) byte[]
(package private) int
getMinSymbolSize
(int minimum) Returns the capacity in codewords of the smallest symbol that has enough capacity to fit the given minimal number of codewords.(package private) MinimalEncoder.Mode
getMode()
(package private) MinimalEncoder.Mode
(package private) MinimalEncoder.Mode
(package private) static int
getShiftValue
(char c, boolean c40, int fnc1) private static int
getX12Value
(char c) (package private) byte[]
(package private) static void
setC40Word
(byte[] bytes, int offset, int c1, int c2, int c3)
-
Field Details
-
allCodewordCapacities
private static final int[] allCodewordCapacities -
squareCodewordCapacities
private static final int[] squareCodewordCapacities -
rectangularCodewordCapacities
private static final int[] rectangularCodewordCapacities -
input
-
mode
-
fromPosition
private final int fromPosition -
characterLength
private final int characterLength -
previous
-
cachedTotalSize
private final int cachedTotalSize
-
-
Constructor Details
-
Edge
private Edge(MinimalEncoder.Input input, MinimalEncoder.Mode mode, int fromPosition, int characterLength, MinimalEncoder.Edge previous)
-
-
Method Details
-
getB256Size
int getB256Size() -
getPreviousStartMode
MinimalEncoder.Mode getPreviousStartMode() -
getPreviousMode
MinimalEncoder.Mode getPreviousMode() -
getEndMode
MinimalEncoder.Mode getEndMode()Returns Mode.ASCII in case that: - Mode is EDIFACT and characterLength is less than 4 or the remaining characters can be encoded in at most 2 ASCII bytes. - Mode is C40, TEXT or X12 and the remaining characters can be encoded in at most 1 ASCII byte. Returns mode in all other cases. -
getMode
MinimalEncoder.Mode getMode() -
getLastASCII
int getLastASCII()Peeks ahead and returns 1 if the postfix consists of exactly two digits, 2 if the postfix consists of exactly two consecutive digits and a non extended character or of 4 digits. Returns 0 in any other case -
getMinSymbolSize
int getMinSymbolSize(int minimum) Returns the capacity in codewords of the smallest symbol that has enough capacity to fit the given minimal number of codewords. -
getCodewordsRemaining
int getCodewordsRemaining(int minimum) Returns the remaining capacity in codewords of the smallest symbol that has enough capacity to fit the given minimal number of codewords. -
getBytes
static byte[] getBytes(int c) -
getBytes
static byte[] getBytes(int c1, int c2) -
setC40Word
static void setC40Word(byte[] bytes, int offset, int c1, int c2, int c3) -
getX12Value
private static int getX12Value(char c) -
getX12Words
byte[] getX12Words() -
getShiftValue
static int getShiftValue(char c, boolean c40, int fnc1) -
getC40Value
private static int getC40Value(boolean c40, int setIndex, char c, int fnc1) -
getC40Words
byte[] getC40Words(boolean c40, int fnc1) -
getEDFBytes
byte[] getEDFBytes() -
getLatchBytes
byte[] getLatchBytes() -
getDataBytes
byte[] getDataBytes()
-