|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.krysalis.barcode4j.impl.pdf417.PDF417HighLevelEncoder
public class PDF417HighLevelEncoder
PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in annex P.
Field Summary |
---|
Fields inherited from interface org.krysalis.barcode4j.impl.pdf417.PDF417Constants |
---|
BYTE_COMPACTION, CODEWORD_TABLE, 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 Summary | |
---|---|
PDF417HighLevelEncoder()
|
Method Summary | |
---|---|
static int |
determineConsecutiveBinaryCount(java.lang.String msg,
byte[] bytes,
int startpos)
Determines the number of consecutive characters that are encodable using binary compaction. |
static int |
determineConsecutiveDigitCount(java.lang.String msg,
int startpos)
Determines the number of consecutive characters that are encodable using numeric compaction. |
static int |
determineConsecutiveTextCount(java.lang.String msg,
int startpos)
Determines the number of consecutive characters that are encodable using text compaction. |
static void |
encodeBinary(java.lang.String msg,
byte[] bytes,
int startpos,
int count,
int startmode,
java.lang.StringBuffer sb)
Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), chapter 4.4.3. |
static java.lang.String |
encodeHighLevel(byte[] data)
Performs high-level encoding of a PDF417 message (binary data). |
static java.lang.String |
encodeHighLevel(java.lang.String msg)
Performs high-level encoding of a PDF417 message using the algorithm described in annex P of ISO/IEC 15438:2001(E). |
static void |
encodeNumeric(java.lang.String msg,
int startpos,
int count,
java.lang.StringBuffer sb)
|
static int |
encodeText(java.lang.String msg,
int startpos,
int count,
java.lang.StringBuffer sb,
int initialSubmode)
Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), chapter 4.4.2. |
static byte[] |
getBytesForMessage(java.lang.String msg)
Converts the message to a byte array using the default encoding (cp437) as defined by the specification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDF417HighLevelEncoder()
Method Detail |
---|
public static byte[] getBytesForMessage(java.lang.String msg)
msg
- the message
public static java.lang.String encodeHighLevel(byte[] data)
data
- the binary data stream
public static java.lang.String encodeHighLevel(java.lang.String msg)
msg
- the message
public static int encodeText(java.lang.String msg, int startpos, int count, java.lang.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_ALPHA
public static void encodeBinary(java.lang.String msg, byte[] bytes, int startpos, int count, int startmode, java.lang.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(java.lang.String msg, int startpos, int count, java.lang.StringBuffer sb)
public static int determineConsecutiveDigitCount(java.lang.String msg, int startpos)
msg
- the messagestartpos
- the start position within the message
public static int determineConsecutiveTextCount(java.lang.String msg, int startpos)
msg
- the messagestartpos
- the start position within the message
public static int determineConsecutiveBinaryCount(java.lang.String msg, byte[] bytes, int startpos)
msg
- the messagebytes
- the message converted to a byte arraystartpos
- the start position within the message
|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |