HIBCLICPrimaryDataCodetext

HIBCLICPrimaryDataCodetext class

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 HIBCLICPrimaryCodetext.

new HIBCLICPrimaryDataCodetext()

Example:

let complexCodetext  = new HIBCLICPrimaryCodetext();
complexCodetext.setBarcodeType(EncodeTypes.HIBCQRLIC);
complexCodetext.setData(new PrimaryData());
complexCodetext.getData().setProductOrCatalogNumber("12345");
complexCodetext.getData().setLabelerIdentificationCode("A999");
complexCodetext.getData().setUnitOfMeasureID(1);
let generator = new ComplexBarcodeGenerator(complexCodetext);
let image = generator.generateBarCodeImage(BarCodeImageFormat.PNG);
let reader = new BarCodeReader(image, null, DecodeType.HIBCQRLIC);
reader.readBarCodes();
let codetext = reader.getFoundBarCodes()[0].getCodeText();
let result = ComplexCodetextReader.tryDecodeHIBCLIC(codetext) ;
print("Product or catalog number: " + result.getData().getProductOrCatalogNumber());
print("Labeler identification code: " + result.getData().getLabelerIdentificationCode());
print("Unit of measure ID: " + result.getData().getUnitOfMeasureID());

Methods

NameDescription
equals(obj)Returns a value indicating whether this instance is equal to a specified HIBCLICPrimaryDataCodetext value.
getConstructedCodetext()Constructs codetext
getData()Identifies primary data.
hashCode()Returns the hash code for this instance.
initFromString(constructedCodetext)Initializes instance from constructed codetext.
setData()Identifies primary data.

equals(obj)

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

ParameterDescription
objAn HIBCLICPrimaryDataCodetext value to compare to this instance.

Returns: true if obj has the same value as this instance; otherwise, false .

getConstructedCodetext()

Constructs codetext

Returns: Constructed codetext

getData()

Identifies primary data.

hashCode()

Returns the hash code for this instance.

Returns: A 32-bit signed integer hash code.

initFromString(constructedCodetext)

Initializes instance from constructed codetext.

ParameterDescription
constructedCodetextConstructed codetext.

setData()

Identifies primary data.