Barcode-Lib4J requires Java 9+

Java Class «ImplCode39»  –  Generate Code 39 Barcode

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ImplCode39E, ImplPZN, ImplPZN8

public class ImplCode39 extends LineageTwoWidth
Implementation of Code 39 (also known as Code 3 of 9). To generate instances, please use one of the newInstance static methods in the Barcode class.

Code 39 is an alphanumeric barcode format that is widely used in applications such as inventory management and tracking. It is capable of encoding:

  • Upper case letters (A-Z)
  • Digits (0-9)
  • Space character
  • Special characters: plus (+), minus (-), dollar ($), slash (/), period (.), percent (%)
This class extends the abstract class LineageTwoWidth, as Code 39 is a type of two-width barcode. See the linked class description for more information.
  • Method Details

    • setContent

      public void setContent(String content, boolean autoComplete, boolean appendOptionalChecksum) throws BarcodeException
      Sets the content to be encoded in the barcode.
      Specified by:
      setContent in class Barcode
      Parameters:
      content - the content to be encoded in the Code 39 barcode
      autoComplete - whether to automatically convert lowercase letters in the content to uppercase letters
      appendOptionalChecksum - whether to append an optional checksum to the content
      Throws:
      BarcodeException - if the content is empty or contains invalid characters