public class DataMatrixHighLevelEncoder extends Object implements DataMatrixConstants
C40_UNLATCH, ECI, FNC1, LATCH_TO_ANSIX12, LATCH_TO_BASE256, LATCH_TO_C40, LATCH_TO_EDIFACT, LATCH_TO_TEXT, MACRO_05, MACRO_05_HEADER, MACRO_06, MACRO_06_HEADER, MACRO_TRAILER, PAD, READER_PROGRAMMING, STRUCTURED_APPEND, UPPER_SHIFT, X12_UNLATCH| Constructor and Description |
|---|
DataMatrixHighLevelEncoder() |
| Modifier and Type | Method and Description |
|---|---|
static int |
determineConsecutiveDigitCount(String msg,
int startpos)
Determines the number of consecutive characters that are encodable using numeric compaction.
|
static String |
encodeHighLevel(String msg)
Performs message encoding of a DataMatrix message using the algorithm described in annex P
of ISO/IEC 16022:2000(E).
|
static String |
encodeHighLevel(String msg,
SymbolShapeHint shape,
Dimension minSize,
Dimension maxSize)
Performs message encoding of a DataMatrix message using the algorithm described in annex P
of ISO/IEC 16022:2000(E).
|
static byte[] |
getBytesForMessage(String msg)
Converts the message to a byte array using the default encoding (cp437) as defined by the
specification
|
public static byte[] getBytesForMessage(String msg)
msg - the messagepublic static String encodeHighLevel(String msg) throws IOException
msg - the messageIOException - if an I/O error occurs while fetching external datapublic static String encodeHighLevel(String msg, SymbolShapeHint shape, Dimension minSize, Dimension maxSize) throws IOException
msg - the messageshape - requested shape. May be SymbolShapeHint.FORCE_NONE,
SymbolShapeHint.FORCE_SQUARE or SymbolShapeHint.FORCE_RECTANGLE.minSize - the minimum symbol size constraint or null for no constraintmaxSize - the maximum symbol size constraint or null for no constraintIOException - if an I/O error occurs while fetching external datapublic static int determineConsecutiveDigitCount(String msg, int startpos)
msg - the messagestartpos - the start position within the messageCopyright © 2003–2023. All rights reserved.