EAN13Writer (ZXing 3.5.0 API)

com.google.zxing.oned

## Class EAN13Writer

- java.lang.Object
- - com.google.zxing.oned.OneDimensionalCodeWriter
  - - com.google.zxing.oned.UPCEANWriter
    - - com.google.zxing.oned.EAN13Writer

- All Implemented Interfaces:
    Writer

      public final class EAN13Writer
      extends UPCEANWriter

  This object renders an EAN13 code as a `BitMatrix`.
  Author:
    aripollak@gmail.com (Ari Pollak)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EAN13Writer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean[]` | `encode(String contents)` Encode the contents to boolean array expression of one-dimensional barcode.
    `protected Collection<BarcodeFormat>` | `getSupportedWriteFormats()`

    - ### Methods inherited from class com.google.zxing.oned.UPCEANWriter

      `getDefaultMargin`

    - ### Methods inherited from class com.google.zxing.oned.OneDimensionalCodeWriter

      `appendPattern, checkNumeric, encode, encode, encode`

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

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

- - ### Constructor Detail

    - #### EAN13Writer

          public EAN13Writer()

  - ### Method Detail

    - #### getSupportedWriteFormats

          protected Collection<BarcodeFormat> getSupportedWriteFormats()

      Overrides:
        `getSupportedWriteFormats` in class `OneDimensionalCodeWriter`

    - #### encode

          public boolean[] encode(String contents)

      Description copied from class: `OneDimensionalCodeWriter`
      Encode the contents to boolean array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included.
      Specified by:
        `encode` in class `OneDimensionalCodeWriter`
      Parameters:
        `contents` - barcode contents to encode
      Returns:
        a `boolean[]` of horizontal pixels (false = white, true = black)

Copyright © 2007–2022. All rights reserved.