AztecEncodeMode

Inheritance: java.lang.Object, java.lang.Enum

public enum AztecEncodeMode extends Enum<AztecEncodeMode>

Encoding mode for Aztec barcodes.


String codetext = "\u72acRight\u72d7";
 BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.AZTEC, codetext);
 generator.getParameters().getBarcode().getAztec().setECIEncoding(ECIEncodings.UTF_8);
 generator.save("test.bmp");
 byte[] encodedArr = { 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 };
 BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.AZTEC);
 generator.setCodetext(encodedArr);
 generator.getParameters().getBarcode().getAztec().setAztecEncodeMode(AztecEncodeMode.BINARY);
 generator.save("test.bmp");

 //Extended mode
 //create codetext
 AztecExtCodetextBuilder textBuilder = new AztecExtCodetextBuilder();
 textBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
 textBuilder.addECICodetext(ECIEncodings.UTF8, "\u72acRight\u72d7");
 textBuilder.addECICodetext(ECIEncodings.UTF16BE, "\u72acPower\u72d7");
 textBuilder.addPlainCodetext("Plain text");
 //generate codetext
 String codetext = textBuilder.getExtendedCodetext();
 //generate
 BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.AZTEC, codetext);
 generator.getParameters().getBarcode().getAztec().setAztecEncodeMode(AztecEncodeMode.EXTENDED);
 generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
 generator.save("test.bmp");

Fields

FieldDescription
AUTOIn Auto mode, the CodeText is encoded with maximum data compactness.
BINARYIn Binary mode, the CodeText is encoded with maximum data compactness.
BYTESEncode codetext as plain bytes.
ECIIn ECI mode, the entire message is re-encoded in the ECIEncoding specified encoding with the insertion of an ECI identifier.
EXTENDED
EXTENDED_CODETEXT

Methods

MethodDescription
valueOf(Class arg0, String arg1)
compareTo(E arg0)
equals(Object arg0)
getClass()
getDeclaringClass()
getValue()
hashCode()
name()
notify()
notifyAll()
ordinal()
toString()
valueOf(String name)
values()
wait()
wait(long arg0)
wait(long arg0, int arg1)

AUTO

public static final AztecEncodeMode AUTO

In Auto mode, the CodeText is encoded with maximum data compactness. Unicode characters are re-encoded in the ECIEncoding specified encoding with the insertion of an ECI identifier. If a character is found that is not supported by the selected ECI encoding, an exception is thrown.

BINARY

public static final AztecEncodeMode BINARY

In Binary mode, the CodeText is encoded with maximum data compactness. If a Unicode character is found, an exception is thrown.

BYTES

public static final AztecEncodeMode BYTES

Encode codetext as plain bytes. If it detects any Unicode character, the character will be encoded as two bytes, lower byte first.

ECI

public static final AztecEncodeMode ECI

In ECI mode, the entire message is re-encoded in the ECIEncoding specified encoding with the insertion of an ECI identifier. If a character is found that is not supported by the selected ECI encoding, an exception is thrown. Please note that some old (pre 2006) scanners may not support this mode.

EXTENDED

public static final AztecEncodeMode EXTENDED

Extended mode which supports multi ECI modes.

It is better to use AztecExtCodetextBuilder for extended codetext generation.

Use Display2DText property to set visible text to removing managing characters.

ECI identifiers are set as single slash and six digits identifier “\000026” - UTF8 ECI identifier

All unicode characters after ECI identifier are automatically encoded into correct character codeset.

EXTENDED_CODETEXT

public static final AztecEncodeMode EXTENDED_CODETEXT

Extended mode which supports multi ECI modes.

It is better to use AztecExtCodetextBuilder for extended codetext generation.

Use Display2DText property to set visible text to removing managing characters.

ECI identifiers are set as single slash and six digits identifier “\000026” - UTF8 ECI identifier

All unicode characters after ECI identifier are automatically encoded into correct character codeset.

valueOf(Class arg0, String arg1)

public static T <T>valueOf(Class<T> arg0, String arg1)

Parameters:

ParameterTypeDescription
arg0java.lang.Class
arg1java.lang.String

Returns: T

compareTo(E arg0)

public final int compareTo(E arg0)

Parameters:

ParameterTypeDescription
arg0E

Returns: int

equals(Object arg0)

public final boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDeclaringClass()

public final Class<E> getDeclaringClass()

Returns: java.lang.Class

getValue()

public int getValue()

Returns: int

hashCode()

public final int hashCode()

Returns: int

name()

public final String name()

Returns: java.lang.String

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

ordinal()

public final int ordinal()

Returns: int

toString()

public String toString()

Returns: java.lang.String

valueOf(String name)

public static AztecEncodeMode valueOf(String name)

Parameters:

ParameterTypeDescription
namejava.lang.String

Returns: com.aspose.barcode.generation.AztecEncodeMode

values()

public static AztecEncodeMode[] values()

Returns: com.aspose.barcode.generation.AztecEncodeMode[]

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int