Encoder (ZXing 3.5.0 API)

com.google.zxing.aztec.encoder

## Class Encoder

- java.lang.Object
- - com.google.zxing.aztec.encoder.Encoder

-     public final class Encoder
      extends Object

  Generates Aztec 2D barcodes.
  Author:
    Rustam Abdullaev

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_AZTEC_LAYERS`
    `static int` | `DEFAULT_EC_PERCENT`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AztecCode` | `encode(byte[] data)` Encodes the given binary content as an Aztec symbol (without ECI code)
    `static AztecCode` | `encode(byte[] data, int minECCPercent, int userSpecifiedLayers)` Encodes the given binary content as an Aztec symbol (without ECI code)
    `static AztecCode` | `encode(byte[] data, int minECCPercent, int userSpecifiedLayers, Charset charset)` Encodes the given binary content as an Aztec symbol
    `static AztecCode` | `encode(String data)` Encodes the given string content as an Aztec symbol (without ECI code)
    `static AztecCode` | `encode(String data, int minECCPercent, int userSpecifiedLayers)` Encodes the given string content as an Aztec symbol (without ECI code)
    `static AztecCode` | `encode(String data, int minECCPercent, int userSpecifiedLayers, Charset charset)` Encodes the given string content as an Aztec symbol

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_EC_PERCENT

          public static final int DEFAULT_EC_PERCENT

      See Also:
        Constant Field Values

    - #### DEFAULT_AZTEC_LAYERS

          public static final int DEFAULT_AZTEC_LAYERS

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### encode

          public static AztecCode encode(String data)

      Encodes the given string content as an Aztec symbol (without ECI code)
      Parameters:
        `data` - input data string; must be encodable as ISO/IEC 8859-1 (Latin-1)
      Returns:
        Aztec symbol matrix with metadata

    - #### encode

          public static AztecCode encode(String data,
                                         int minECCPercent,
                                         int userSpecifiedLayers)

      Encodes the given string content as an Aztec symbol (without ECI code)
      Parameters:
        `data` - input data string; must be encodable as ISO/IEC 8859-1 (Latin-1)
        `minECCPercent` - minimal percentage of error check words (According to ISO/IEC 24778:2008, a minimum of 23% + 3 words is recommended)
        `userSpecifiedLayers` - if non-zero, a user-specified value for the number of layers
      Returns:
        Aztec symbol matrix with metadata

    - #### encode

          public static AztecCode encode(String data,
                                         int minECCPercent,
                                         int userSpecifiedLayers,
                                         Charset charset)

      Encodes the given string content as an Aztec symbol
      Parameters:
        `data` - input data string
        `minECCPercent` - minimal percentage of error check words (According to ISO/IEC 24778:2008, a minimum of 23% + 3 words is recommended)
        `userSpecifiedLayers` - if non-zero, a user-specified value for the number of layers
        `charset` - character set in which to encode string using ECI; if null, no ECI code will be inserted, and the string must be encodable as ISO/IEC 8859-1 (Latin-1), the default encoding of the symbol.
      Returns:
        Aztec symbol matrix with metadata

    - #### encode

          public static AztecCode encode(byte[] data)

      Encodes the given binary content as an Aztec symbol (without ECI code)
      Parameters:
        `data` - input data string
      Returns:
        Aztec symbol matrix with metadata

    - #### encode

          public static AztecCode encode(byte[] data,
                                         int minECCPercent,
                                         int userSpecifiedLayers)

      Encodes the given binary content as an Aztec symbol (without ECI code)
      Parameters:
        `data` - input data string
        `minECCPercent` - minimal percentage of error check words (According to ISO/IEC 24778:2008, a minimum of 23% + 3 words is recommended)
        `userSpecifiedLayers` - if non-zero, a user-specified value for the number of layers
      Returns:
        Aztec symbol matrix with metadata

    - #### encode

          public static AztecCode encode(byte[] data,
                                         int minECCPercent,
                                         int userSpecifiedLayers,
                                         Charset charset)

      Encodes the given binary content as an Aztec symbol
      Parameters:
        `data` - input data string
        `minECCPercent` - minimal percentage of error check words (According to ISO/IEC 24778:2008, a minimum of 23% + 3 words is recommended)
        `userSpecifiedLayers` - if non-zero, a user-specified value for the number of layers
        `charset` - character set to mark using ECI; if null, no ECI code will be inserted, and the default encoding of ISO/IEC 8859-1 will be assuming by readers.
      Returns:
        Aztec symbol matrix with metadata

Copyright © 2007–2022. All rights reserved.