Package com.google.zxing
Enum Class EncodeHintType
- All Implemented Interfaces:
Serializable
,Comparable<EncodeHintType>
,Constable
These are a set of hints that you may pass to Writers to specify their behavior.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSpecifies the required number of layers for an Aztec code.Specifies what character encoding to use where applicable (typeString
)Specifies the matrix shape for Data Matrix (typeSymbolShapeHint
)Specifies what degree of error correction to use, for example in QR Codes.Forces which encoding will be used.Specifies margin, in pixels, to use when generating the barcode.Deprecated.without replacementDeprecated.use width/height params inDataMatrixWriter.encode(String, BarcodeFormat, int, int)
Specifies what compaction mode to use for PDF417 (typeCompaction
orString
value of one of its enum values).Specifies the minimum and maximum number of rows and columns for PDF417 (typeDimensions
).Specifies the QR code mask pattern to be used.Specifies the exact version of QR code to be encoded. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EncodeHintType
Returns the enum constant of this class with the specified name.static EncodeHintType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ERROR_CORRECTION
Specifies what degree of error correction to use, for example in QR Codes. Type depends on the encoder. For example for QR codes it's typeErrorCorrectionLevel
. For Aztec it is of typeInteger
, representing the minimal percentage of error correction words. For PDF417 it is of typeInteger
, valid values being 0 to 8. In all cases, it can also be aString
representation of the desired value as well. Note: an Aztec symbol should have a minimum of 25% EC words. -
CHARACTER_SET
Specifies what character encoding to use where applicable (typeString
) -
DATA_MATRIX_SHAPE
Specifies the matrix shape for Data Matrix (typeSymbolShapeHint
) -
DATA_MATRIX_COMPACT
Specifies whether to use compact mode for Data Matrix (typeBoolean
, or "true" or "false"String
value). The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1 character set via ECIs. Please note that in that case, the most compact character encoding is chosen for characters in the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by means of theCHARACTER_SET
encoding hint. Compact encoding also provides GS1-FNC1 support whenGS1_FORMAT
is selected. In this case group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords for the purpose of delimiting AIs. This option andFORCE_C40
are mutually exclusive. -
MIN_SIZE
Deprecated.use width/height params inDataMatrixWriter.encode(String, BarcodeFormat, int, int)
Specifies a minimum barcode size (typeDimension
). Only applicable to Data Matrix now. -
MAX_SIZE
Deprecated.without replacementSpecifies a maximum barcode size (typeDimension
). Only applicable to Data Matrix now. -
MARGIN
-
PDF417_COMPACT
-
PDF417_COMPACTION
Specifies what compaction mode to use for PDF417 (typeCompaction
orString
value of one of its enum values). -
PDF417_DIMENSIONS
Specifies the minimum and maximum number of rows and columns for PDF417 (typeDimensions
). -
PDF417_AUTO_ECI
Specifies whether to automatically insert ECIs when encoding PDF417 (typeBoolean
, or "true" or "false"String
value). Please note that in that case, the most compact character encoding is chosen for characters in the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by means of theCHARACTER_SET
encoding hint. -
AZTEC_LAYERS
Specifies the required number of layers for an Aztec code. A negative number (-1, -2, -3, -4) specifies a compact Aztec code. 0 indicates to use the minimum number of layers (the default). A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code. (TypeInteger
, orString
representation of the integer value). -
QR_VERSION
-
QR_MASK_PATTERN
-
QR_COMPACT
Specifies whether to use compact mode for QR code (typeBoolean
, or "true" or "false"String
value). Please note that when compaction is performed, the most compact character encoding is chosen for characters in the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by means of theCHARACTER_SET
encoding hint. -
GS1_FORMAT
-
FORCE_CODE_SET
Forces which encoding will be used. Currently only used for Code-128 code sets (TypeString
). Valid values are "A", "B", "C". This option andCODE128_COMPACT
are mutually exclusive. -
FORCE_C40
Forces C40 encoding for data-matrix (typeBoolean
, or "true" or "false")String
value). This option andDATA_MATRIX_COMPACT
are mutually exclusive. -
CODE128_COMPACT
Specifies whether to use compact mode for Code-128 code (typeBoolean
, or "true" or "false"String
value). This can yield slightly smaller bar codes. This option andFORCE_CODE_SET
are mutually exclusive.
-
-
Constructor Details
-
EncodeHintType
private EncodeHintType()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-