public class PDF417HighLevelEncoder extends Object implements PDF417Constants
BYTE_COMPACTION, CODEWORD_TABLE, CP437, DEFAULT_ENCODING, EC_COEFFICIENTS, ECI_CHARSET, ECI_GENERAL_PURPOSE, ECI_USER_DEFINED, LATCH_TO_BYTE, LATCH_TO_BYTE_PADDED, LATCH_TO_NUMERIC, LATCH_TO_TEXT, MACRO_PDF_CONTROL_BLOCK_START, MACRO_PDF_OPTIONAL_FIELD_START, MACRO_PDF_TERMINATOR, NUMERIC_COMPACTION, PAD, READER_INITIALISATION, SHIFT_TO_BYTE, START_PATTERN, STOP_PATTERN, SUBMODE_ALPHA, SUBMODE_LOWER, SUBMODE_MIXED, SUBMODE_PUNCTUATION, TEXT_COMPACTION, TEXT_MIXED_RAW, TEXT_PUNCTUATION_RAW| Constructor and Description |
|---|
PDF417HighLevelEncoder() |
| Modifier and Type | Method and Description |
|---|---|
static int |
determineConsecutiveBinaryCount(String msg,
byte[] bytes,
int startpos)
Determines the number of consecutive characters that are encodable using binary compaction.
|
static int |
determineConsecutiveDigitCount(String msg,
int startpos)
Determines the number of consecutive characters that are encodable using numeric compaction.
|
static int |
determineConsecutiveTextCount(String msg,
int startpos)
Determines the number of consecutive characters that are encodable using text compaction.
|
static void |
encodeBinary(String msg,
byte[] bytes,
int startpos,
int count,
int startmode,
StringBuffer sb)
Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E),
chapter 4.4.3.
|
static String |
encodeHighLevel(byte[] data)
Performs high-level encoding of a PDF417 message (binary data).
|
static String |
encodeHighLevel(String msg)
Performs high-level encoding of a PDF417 message using the algorithm described in annex P
of ISO/IEC 15438:2001(E).
|
static String |
encodeHighLevel(String msg,
String encoding,
boolean enableECI)
Performs high-level encoding of a PDF417 message using the algorithm described in annex P
of ISO/IEC 15438:2001(E).
|
static void |
encodeNumeric(String msg,
int startpos,
int count,
StringBuffer sb) |
static int |
encodeText(String msg,
int startpos,
int count,
StringBuffer sb,
int initialSubmode)
Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E),
chapter 4.4.2.
|
public static String encodeHighLevel(byte[] data)
data - the binary data streampublic static String encodeHighLevel(String msg)
msg - the messagepublic static String encodeHighLevel(String msg, String encoding, boolean enableECI)
msg - the messageencoding - specify an encoding other than the default PDF417Constants.DEFAULT_ENCODINGenableECI - whether to enable ECI (extended channel interpretation).public static int encodeText(String msg, int startpos, int count, StringBuffer sb, int initialSubmode)
msg - the messagestartpos - the start position within the messagecount - the number of characters to encodesb - receives the encoded codewordsinitialSubmode - should normally be SUBMODE_ALPHApublic static void encodeBinary(String msg, byte[] bytes, int startpos, int count, int startmode, StringBuffer sb)
msg - the messagebytes - the message converted to a byte arraystartpos - the start position within the messagecount - the number of bytes to encodestartmode - the mode from which this method startssb - receives the encoded codewordspublic static void encodeNumeric(String msg, int startpos, int count, StringBuffer sb)
public static int determineConsecutiveDigitCount(String msg, int startpos)
msg - the messagestartpos - the start position within the messagepublic static int determineConsecutiveTextCount(String msg, int startpos)
msg - the messagestartpos - the start position within the messagepublic static int determineConsecutiveBinaryCount(String msg, byte[] bytes, int startpos)
msg - the messagebytes - the message converted to a byte arraystartpos - the start position within the messageCopyright © 2003–2023. All rights reserved.