MaxiCodeEncodeMode
Inheritance: java.lang.Object, java.lang.Enum
public enum MaxiCodeEncodeMode extends Enum<MaxiCodeEncodeMode>
Encoding mode for MaxiCode barcodes.
//Auto mode
String codetext = "\u72acRight\u72d7";
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext);
{
generator.getParameters().getBarcode().getMaxiCode().setECIEncoding(ECIEncodings.UTF8);
generator.save("test.bmp");
}
//Bytes mode
byte[] encodedArr = { 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 };
//encode array to string
StringBuilder strBld = new StringBuilder();
for(byte bval : encodedArr)
strBld.append((char) bval);
String codetext = strBld.ToString();
BarcodeGenerator generator1 = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext);
generator.getParameters().getBarcode().getMaxiCode().setMaxiCodeEncodeMode(MaxiCodeEncodeMode.BYTES);
generator.save("test.bmp");
//Extended codetext mode
//create codetext
MaxiCodeExtCodetextBuilder textBuilder = new MaxiCodeExtCodetextBuilder();
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.MaxiCode, codetext);
generator.getParameters().getBarcode().getMaxiCode().setMaxiCodeEncodeMode(MaxiCodeEncodeMode.EXTENDED_CODETEXT);
generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
generator.save("test.bmp");
Fields
Field | Description |
---|---|
AUTO | Encode codetext with value set in the ECIEncoding property. |
BYTES | Encode codetext as plain bytes. |
EXTENDED_CODETEXT | Extended mode which supports multi ECI modes. |
Methods
AUTO
public static final MaxiCodeEncodeMode AUTO
Encode codetext with value set in the ECIEncoding property.
BYTES
public static final MaxiCodeEncodeMode BYTES
Encode codetext as plain bytes. If it detects any Unicode character, the character will be encoded as two bytes, lower byte first.
EXTENDED_CODETEXT
public static final MaxiCodeEncodeMode EXTENDED_CODETEXT
Extended mode which supports multi ECI modes. It is better to use MaxiCodeExtCodetextBuilder 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:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Class | |
arg1 | java.lang.String |
Returns: T
compareTo(E arg0)
public final int compareTo(E arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | E |
Returns: int
equals(Object arg0)
public final boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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 MaxiCodeEncodeMode valueOf(String name)
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String |
Returns: MaxiCodeEncodeMode
values()
public static MaxiCodeEncodeMode[] values()
Returns: com.aspose.barcode.generation.MaxiCodeEncodeMode[]
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |