Class HIBCLICPrimaryDataCodetext

java.lang.Object
com.aspose.barcode.complexbarcode.HIBCLICComplexCodetext
com.aspose.barcode.complexbarcode.HIBCLICPrimaryDataCodetext
All Implemented Interfaces:
IComplexCodetext

public class HIBCLICPrimaryDataCodetext extends HIBCLICComplexCodetext

Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary data.


 This sample shows how to encode and decode HIBC LIC using HIBCLICPrimaryDataCodetext.
 
 HIBCLICPrimaryDataCodetext complexCodetext  = new HIBCLICPrimaryDataCodetext();
 complexCodetext.setBarcodeType(EncodeTypes.HIBCQRLIC);
 complexCodetext.setData(new PrimaryData());
 complexCodetext.getData().setProductOrCatalogNumber("12345");
 complexCodetext.getData().setLabelerIdentificationCode("A999");
 complexCodetext.getData().setUnitOfMeasureID(1);
 ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(complexCodetext);
 {
     BufferedImage image = generator.generateBarCodeImage();
     BarCodeReader reader = new BarCodeReader(image, DecodeType.HIBCQRLIC);
     {
         reader.readBarCodes();
         HIBCLICPrimaryCodetext result = (HIBCLICPrimaryCodetext)ComplexCodetextReader.TryDecodeHIBCLIC(codetext);
         HIBCLICPrimaryCodetext result = (HIBCLICPrimaryCodetext)ComplexCodetextReader.tryDecodeHIBCLIC(codetext);
         System.out.println("Product or catalog number: " + result.getData().getProductOrCatalogNumber());
         System.out.println("Labeler identification code: " + result.getData().getLabelerIdentificationCode());
         System.out.println("Unit of measure ID: " + result.getData().getUnitOfMeasureID());
     }
 }
 

  • Constructor Details

    • HIBCLICPrimaryDataCodetext

      public HIBCLICPrimaryDataCodetext()
  • Method Details

    • getData

      public PrimaryData getData()

      Identifies primary data.

    • setData

      public void setData(PrimaryData value)

      Identifies primary data.

    • getConstructedCodetext

      public String getConstructedCodetext()

      Constructs codetext

      Specified by:
      getConstructedCodetext in interface IComplexCodetext
      Specified by:
      getConstructedCodetext in class HIBCLICComplexCodetext
      Returns:
      Constructed codetext
    • initFromString

      public void initFromString(String constructedCodetext)

      Initializes instance from constructed codetext.

      Specified by:
      initFromString in interface IComplexCodetext
      Specified by:
      initFromString in class HIBCLICComplexCodetext
      Parameters:
      constructedCodetext - Constructed codetext.
    • equals

      public boolean equals(Object obj)

      Returns a value indicating whether this instance is equal to a specified HIBCLICPrimaryDataCodetext value.

      Overrides:
      equals in class Object
      Parameters:
      obj - An HIBCLICPrimaryDataCodetext value to compare to this instance.
      Returns:
      <b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>.
    • hashCode

      public int hashCode()

      Returns the hash code for this instance.

      Overrides:
      hashCode in class Object
      Returns:
      A 32-bit signed integer hash code.