org.krysalis.barcode4j.impl.pdf417
Class PDF417ErrorCorrection
java.lang.Object
org.krysalis.barcode4j.impl.pdf417.PDF417ErrorCorrection
- All Implemented Interfaces:
- PDF417Constants
public class PDF417ErrorCorrection
- extends java.lang.Object
- implements PDF417Constants
PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in
chapter 4.10.
- Version:
- $Id: PDF417ErrorCorrection.java,v 1.1 2006/06/22 09:01:16 jmaerki Exp $
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 |
Method Summary |
static java.lang.String |
generateErrorCorrection(java.lang.String dataCodewords,
int errorCorrectionLevel)
Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). |
static int |
getErrorCorrectionCodewordCount(int errorCorrectionLevel)
Determines the number of error correction codewords for a specified error correction
level. |
static int |
getRecommendedMinimumErrorCorrectionLevel(int n)
Returns the recommended minimum error correction level as described in annex E of
ISO/IEC 15438:2001(E). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PDF417ErrorCorrection
public PDF417ErrorCorrection()
getErrorCorrectionCodewordCount
public static int getErrorCorrectionCodewordCount(int errorCorrectionLevel)
- Determines the number of error correction codewords for a specified error correction
level.
- Parameters:
errorCorrectionLevel
- the error correction level (0-8)
- Returns:
- the number of codewords generated for error correction
getRecommendedMinimumErrorCorrectionLevel
public static int getRecommendedMinimumErrorCorrectionLevel(int n)
- Returns the recommended minimum error correction level as described in annex E of
ISO/IEC 15438:2001(E).
- Parameters:
n
- the number of data codewords
- Returns:
- the recommended minimum error correction level
generateErrorCorrection
public static java.lang.String generateErrorCorrection(java.lang.String dataCodewords,
int errorCorrectionLevel)
- Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E).
- Parameters:
dataCodewords
- the data codewordserrorCorrectionLevel
- the error correction level (0-8)
- Returns:
- the String representing the error correction codewords
Copyright © 2000-2010 Jeremias Maerki. All rights reserved.