Class MinimalEncoder.Edge
- java.lang.Object
-
- com.google.zxing.datamatrix.encoder.MinimalEncoder.Edge
-
- Enclosing class:
- MinimalEncoder
private static final class MinimalEncoder.Edge extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static int[]
allCodewordCapacities
private int
cachedTotalSize
private int
characterLength
private int
fromPosition
private MinimalEncoder.Input
input
private MinimalEncoder.Mode
mode
private MinimalEncoder.Edge
previous
private static int[]
rectangularCodewordCapacities
private static int[]
squareCodewordCapacities
-
Constructor Summary
Constructors Modifier Constructor Description private
Edge(MinimalEncoder.Input input, MinimalEncoder.Mode mode, int fromPosition, int characterLength, MinimalEncoder.Edge previous)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
getB256Size()
(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[]
getDataBytes()
(package private) byte[]
getEDFBytes()
(package private) 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.(package private) 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.(package private) byte[]
getLatchBytes()
(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
getPreviousMode()
(package private) MinimalEncoder.Mode
getPreviousStartMode()
(package private) static int
getShiftValue(char c, boolean c40, int fnc1)
private static int
getX12Value(char c)
(package private) byte[]
getX12Words()
(package private) static void
setC40Word(byte[] bytes, int offset, int c1, int c2, int c3)
-
-
-
Field Detail
-
allCodewordCapacities
private static final int[] allCodewordCapacities
-
squareCodewordCapacities
private static final int[] squareCodewordCapacities
-
rectangularCodewordCapacities
private static final int[] rectangularCodewordCapacities
-
input
private final MinimalEncoder.Input input
-
mode
private final MinimalEncoder.Mode mode
-
fromPosition
private final int fromPosition
-
characterLength
private final int characterLength
-
previous
private final MinimalEncoder.Edge previous
-
cachedTotalSize
private final int cachedTotalSize
-
-
Constructor Detail
-
Edge
private Edge(MinimalEncoder.Input input, MinimalEncoder.Mode mode, int fromPosition, int characterLength, MinimalEncoder.Edge previous)
-
-
Method Detail
-
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()
-
-