com.google.zxing.qrcode.encoder

## Class MatrixUtil

- java.lang.Object
- - com.google.zxing.qrcode.encoder.MatrixUtil

-     final class MatrixUtil
      extends Object

  Utility class for QR code matrix operations.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) static void` | `buildMatrix(BitArray dataBits, ErrorCorrectionLevel ecLevel, Version version, int maskPattern, ByteMatrix matrix)`
    `(package private) static int` | `calculateBCHCode(int value, int poly)`
    `(package private) static void` | `clearMatrix(ByteMatrix matrix)`
    `(package private) static void` | `embedBasicPatterns(Version version, ByteMatrix matrix)`
    `(package private) static void` | `embedDataBits(BitArray dataBits, int maskPattern, ByteMatrix matrix)`
    `(package private) static void` | `embedTypeInfo(ErrorCorrectionLevel ecLevel, int maskPattern, ByteMatrix matrix)`
    `(package private) static int` | `findMSBSet(int value)`
    `(package private) static void` | `makeTypeInfoBits(ErrorCorrectionLevel ecLevel, int maskPattern, BitArray bits)`
    `(package private) static void` | `makeVersionInfoBits(Version version, BitArray bits)`
    `(package private) static void` | `maybeEmbedVersionInfo(Version version, ByteMatrix matrix)`

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

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

- - ### Method Detail

    - #### buildMatrix

          static void buildMatrix(BitArray dataBits,
                                  ErrorCorrectionLevel ecLevel,
                                  Version version,
                                  int maskPattern,
                                  ByteMatrix matrix)
                           throws WriterException

      Throws:
        `WriterException`

    - #### calculateBCHCode

          static int calculateBCHCode(int value,
                                      int poly)

    - #### clearMatrix

          static void clearMatrix(ByteMatrix matrix)

    - #### embedBasicPatterns

          static void embedBasicPatterns(Version version,
                                         ByteMatrix matrix)
                                  throws WriterException

      Throws:
        `WriterException`

    - #### embedDataBits

          static void embedDataBits(BitArray dataBits,
                                    int maskPattern,
                                    ByteMatrix matrix)
                             throws WriterException

      Throws:
        `WriterException`

    - #### embedTypeInfo

          static void embedTypeInfo(ErrorCorrectionLevel ecLevel,
                                    int maskPattern,
                                    ByteMatrix matrix)
                             throws WriterException

      Throws:
        `WriterException`

    - #### findMSBSet

          static int findMSBSet(int value)

    - #### makeTypeInfoBits

          static void makeTypeInfoBits(ErrorCorrectionLevel ecLevel,
                                       int maskPattern,
                                       BitArray bits)
                                throws WriterException

      Throws:
        `WriterException`

    - #### makeVersionInfoBits

          static void makeVersionInfoBits(Version version,
                                          BitArray bits)
                                   throws WriterException

      Throws:
        `WriterException`

    - #### maybeEmbedVersionInfo

          static void maybeEmbedVersionInfo(Version version,
                                            ByteMatrix matrix)
                                     throws WriterException

      Throws:
        `WriterException`