Class AztecEncoder


public class AztecEncoder extends AztecMessageErrorCorrection
Encodes the data message into binary data.
  • Field Details

    • errorCorrectionLength

      public double errorCorrectionLength
      Amount of error correction is determined by this number. ecc_words = errorCorrectionLength*code_words - 3. Larger values will require more data and larger markers, but do offer more fault tolerance. See G.2 in ISO document.
  • Constructor Details

    • AztecEncoder

      public AztecEncoder()
  • Method Details

    • reset

      public void reset()
    • setEcc

      public AztecEncoder setEcc(double fraction)
    • setStructure

      public AztecEncoder setStructure(AztecCode.Structure structure)
    • setLayers

      public AztecEncoder setLayers(int numLayers)
    • addUpper

      public AztecEncoder addUpper(String message)
    • addLower

      public AztecEncoder addLower(String message)
    • addMixed

      public AztecEncoder addMixed(String message)
    • addPunctuation

      public AztecEncoder addPunctuation(String message)
    • addDigit

      public AztecEncoder addDigit(String message)
    • addBytes

      public AztecEncoder addBytes(byte[] data, int offset, int length)
    • addAutomatic

      public AztecEncoder addAutomatic(String message)
      Automatically select which encoding mode it should encode this message. This will select the most efficient encoding possible.
    • fixate

      public AztecCode fixate()
      Encodes into binary data all the segments, computes ECC, and constructs the final marker. Anything which is not explicitly specified will have a reasonable value auto selected.
      Returns:
      Returns a new marker.