Barcode-Lib4J requires Java 11+

Java Class «ImplCode39»  –  Barcode «Code 39»

java.lang.Object
de.vwsoft.barcodelib4j.oned.Barcode
de.vwsoft.barcodelib4j.oned.ImplCode39
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ImplCode39E, ImplPZN, ImplPZN8

public class ImplCode39 extends Barcode
Implementation of Code 39 (also known as Code 3 of 9). To create instances, 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 (%)
  • Method Details

    • setContent

      public void setContent(String content, boolean autoComplete, boolean appendOptionalChecksum) throws BarcodeException
      Sets the content to be encoded in the barcode.

      The content is validated against the allowed character set. If autoComplete is enabled, lowercase letters are automatically converted to uppercase. If appendOptionalChecksum is enabled, a modulo 43 checksum is calculated and appended.

      Specified by:
      setContent in class Barcode
      Parameters:
      content - the content to be encoded in the Code 39 barcode
      autoComplete - whether to convert lowercase letters to uppercase letters
      appendOptionalChecksum - whether to append an optional modulo 43 checksum
      Throws:
      BarcodeException - if the content is empty or contains invalid characters