Enum Class Code128EncodeMode

java.lang.Object
java.lang.Enum<Code128EncodeMode>
com.aspose.barcode.generation.Code128EncodeMode
All Implemented Interfaces:
Serializable, Comparable<Code128EncodeMode>, Constable

public enum Code128EncodeMode extends Enum<Code128EncodeMode>

Encoding mode for Code128 barcodes. Code 128 specification.


 Following code demonstrates how to generate code 128 with different encodings
 

 //Generate code 128 with ISO 15417 encoding
 BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_128, "ABCD1234567890");
 generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Code128EncodeMode.AUTO);
 generator.save(filePath, BarCodeImageFormat.PNG);

 //Generate code 128 only with Codeset A encoding
 BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_128, "ABCD1234567890");
 generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Code128EncodeMode.CODE_A);
 generator.save(filePath, BarCodeImageFormat.PNG);
 

  • Enum Constant Details

    • AUTO

      public static final Code128EncodeMode AUTO

      Encode codetext in classic ISO 15417 mode. The mode should be used in all ordinary cases.

    • CODE_A

      public static final Code128EncodeMode CODE_A

      Encode codetext only in 128A codeset.

    • CODE_B

      public static final Code128EncodeMode CODE_B

      Encode codetext only in 128B codeset.

    • CODE_C

      public static final Code128EncodeMode CODE_C

      Encode codetext only in 128C codeset.

    • CODE_AB

      public static final Code128EncodeMode CODE_AB

      Encode codetext only in 128A and 128B codesets.

    • CODE_AC

      public static final Code128EncodeMode CODE_AC

      Encode codetext only in 128A and 128C codesets.

    • CODE_BC

      public static final Code128EncodeMode CODE_BC

      Encode codetext only in 128B and 128C codesets.

  • Method Details

    • values

      public static Code128EncodeMode[] 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

      public static Code128EncodeMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
    • valueOf

      public static Code128EncodeMode valueOf(int value)
      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:
      value - 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 name
      NullPointerException - if the argument is null