Package com.itextpdf.text.pdf.qrcode
Class Version
- java.lang.Object
-
- com.itextpdf.text.pdf.qrcode.Version
-
public final class Version extends java.lang.ObjectSee ISO 18004:2006 Annex D- Since:
- 5.0.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVersion.ECBEncapsualtes the parameters for one error-correction block in one symbol version.static classVersion.ECBlocksEncapsulates a set of error-correction blocks in one symbol version.
-
Field Summary
Fields Modifier and Type Field Description private int[]alignmentPatternCentersprivate Version.ECBlocks[]ecBlocksprivate inttotalCodewordsprivate static int[]VERSION_DECODE_INFOSee ISO 18004:2006 Annex D.private intversionNumberprivate static Version[]VERSIONS
-
Constructor Summary
Constructors Modifier Constructor Description privateVersion(int versionNumber, int[] alignmentPatternCenters, Version.ECBlocks ecBlocks1, Version.ECBlocks ecBlocks2, Version.ECBlocks ecBlocks3, Version.ECBlocks ecBlocks4)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) BitMatrixbuildFunctionPattern()See ISO 18004:2006 Annex Eprivate static Version[]buildVersions()See ISO 18004:2006 6.5.1 Table 9(package private) static VersiondecodeVersionInformation(int versionBits)int[]getAlignmentPatternCenters()intgetDimensionForVersion()Version.ECBlocksgetECBlocksForLevel(ErrorCorrectionLevel ecLevel)static VersiongetProvisionalVersionForDimension(int dimension)Deduces version information purely from QR Code dimensions.intgetTotalCodewords()static VersiongetVersionForNumber(int versionNumber)intgetVersionNumber()java.lang.StringtoString()
-
-
-
Field Detail
-
VERSION_DECODE_INFO
private static final int[] VERSION_DECODE_INFO
See ISO 18004:2006 Annex D. Element i represents the raw version bits that specify version i + 7
-
VERSIONS
private static final Version[] VERSIONS
-
versionNumber
private final int versionNumber
-
alignmentPatternCenters
private final int[] alignmentPatternCenters
-
ecBlocks
private final Version.ECBlocks[] ecBlocks
-
totalCodewords
private final int totalCodewords
-
-
Constructor Detail
-
Version
private Version(int versionNumber, int[] alignmentPatternCenters, Version.ECBlocks ecBlocks1, Version.ECBlocks ecBlocks2, Version.ECBlocks ecBlocks3, Version.ECBlocks ecBlocks4)
-
-
Method Detail
-
getVersionNumber
public int getVersionNumber()
-
getAlignmentPatternCenters
public int[] getAlignmentPatternCenters()
-
getTotalCodewords
public int getTotalCodewords()
-
getDimensionForVersion
public int getDimensionForVersion()
-
getECBlocksForLevel
public Version.ECBlocks getECBlocksForLevel(ErrorCorrectionLevel ecLevel)
-
getProvisionalVersionForDimension
public static Version getProvisionalVersionForDimension(int dimension)
Deduces version information purely from QR Code dimensions.
- Parameters:
dimension- dimension in modules- Returns:
Versionfor a QR Code of that dimension- Throws:
FormatException- if dimension is not 1 mod 4
-
getVersionForNumber
public static Version getVersionForNumber(int versionNumber)
-
decodeVersionInformation
static Version decodeVersionInformation(int versionBits)
-
buildFunctionPattern
BitMatrix buildFunctionPattern()
See ISO 18004:2006 Annex E
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
buildVersions
private static Version[] buildVersions()
See ISO 18004:2006 6.5.1 Table 9
-
-