Class Code39Writer

All Implemented Interfaces:
Writer

public final class Code39Writer extends OneDimensionalCodeWriter
This object renders a CODE39 code as a BitMatrix.
  • Constructor Details

    • Code39Writer

      public Code39Writer()
  • Method Details

    • 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)
    • toIntArray

      private static void toIntArray(int a, int[] toReturn)
    • tryToConvertToExtendedMode

      private static String tryToConvertToExtendedMode(String contents)