Barcode-Lib4J requires Java 9+

Java Class «ImplSSCC18»  –  Generate SSCC Barcode

All Implemented Interfaces:
Cloneable

public class ImplSSCC18 extends ImplEAN128
Implementation of SSCC (Serial Shipping Container Code) using GS1-128. To generate instances, please use one of the newInstance static methods in the Barcode class.

This convenience class generates a GS1-128 barcode that contains an SSCC as the sole data element. It automatically includes the Application Identifier prefix '00' in both the barcode and the human readable text line, allowing you to specify only the SSCC number itself.

Note: Encoding the same SSCC number with this class and with the GS1-128 implementation will produce exactly the same barcode.

  • Method Details

    • setContent

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

      The number must be either 18 (with check digit) or 17 (without check digit) in length.

      • If the number contains 18 digits, the 18th digit is checked to see if it is a valid check digit. If the check digit is invalid, a BarcodeException is thrown.
      • If the number contains 17 digits and autoComplete is set to true, the method calculates the missing check digit and appends it to the specified number. If autoComplete is set to false, a BarcodeException is thrown.
      Overrides:
      setContent in class ImplEAN128
      Parameters:
      content - the SSCC number to be encoded in the barcode
      autoComplete - whether to automatically calculate and append a check digit if it is missing
      appendOptionalChecksum - has no function, as SSCC uses a fixed check digit which is not optional
      Throws:
      BarcodeException - if the content is empty, contains non-numeric characters, is of invalid length, or has an invalid check digit