Class HIBCLICCombinedCodetext
java.lang.Object
com.aspose.barcode.complexbarcode.HIBCLICComplexCodetext
com.aspose.barcode.complexbarcode.HIBCLICCombinedCodetext
- All Implemented Interfaces:
IComplexCodetext
Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary and secodary data.
This sample shows how to encode and decode HIBC LIC using HIBCLICCombinedCodetext.HIBCLICCombinedCodetext combinedCodetext = new HIBCLICCombinedCodetext(); combinedCodetext.setBarcodeType(EncodeTypes.HIBCQRLIC); combinedCodetext.setPrimaryData(new PrimaryData()); combinedCodetext.getPrimaryData().setProductOrCatalogNumber("12345"); combinedCodetext.getPrimaryData().setLabelerIdentificationCode("A999"); combinedCodetext.getPrimaryData().setUnitOfMeasureID(1); combinedCodetext.setSecondaryAndAdditionalData(new SecondaryAndAdditionalData()); combinedCodetext.getSecondaryAndAdditionalData().setExpiryDate(new Date()); combinedCodetext.getSecondaryAndAdditionalData().setExpiryDateFormat(HIBCLICDateFormat.MMDDYY); combinedCodetext.getSecondaryAndAdditionalData().setQuantity(30); combinedCodetext.getSecondaryAndAdditionalData().setLotNumber("LOT123"); combinedCodetext.getSecondaryAndAdditionalData().setSerialNumber("SERIAL123"); combinedCodetext.getSecondaryAndAdditionalData().setDateOfManufacture(new Date()); ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(combinedCodetext); BufferedImage image = generator.generateBarCodeImage(); BarCodeReader reader = new BarCodeReader(image, DecodeType.HIBCQRLIC); reader.readBarCodes(); String codetext = reader.getFoundBarCodes()[0].getCodeText(); HIBCLICCombinedCodetext result = (HIBCLICCombinedCodetext)ComplexCodetextReader.tryDecodeHIBCLIC(codetext); System.out.println("Product or catalog number: " + result.getPrimaryData().getProductOrCatalogNumber()); System.out.println("Labeler identification code: " + result.getPrimaryData().getLabelerIdentificationCode()); System.out.println("Unit of measure ID: " + result.getPrimaryData().getUnitOfMeasureID()); System.out.println("Expiry date: " + result.getSecondaryAndAdditionalData().getExpiryDate()); System.out.println("Quantity: " + result.getSecondaryAndAdditionalData().getQuantity()); System.out.println("Lot number: " + result.getSecondaryAndAdditionalData().getLotNumber()); System.out.println("Serial number: " + result.getSecondaryAndAdditionalData().getSerialNumber()); System.out.println("Date of manufacture: " + result.getSecondaryAndAdditionalData().getDateOfManufacture());
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns a value indicating whether this instance is equal to a specifiedHIBCLICCombinedCodetextvalue.Constructs codetextIdentifies primary data.Identifies secondary and additional supplemental data.inthashCode()Returns the hash code for this instance.voidinitFromString(String constructedCodetext) Initializes instance from constructed codetext.voidsetPrimaryData(PrimaryData value) Identifies primary data.voidIdentifies secondary and additional supplemental data.Methods inherited from class com.aspose.barcode.complexbarcode.HIBCLICComplexCodetext
getBarcodeType, setBarcodeType
-
Constructor Details
-
HIBCLICCombinedCodetext
public HIBCLICCombinedCodetext()
-
-
Method Details
-
getPrimaryData
Identifies primary data.
-
setPrimaryData
Identifies primary data.
-
getSecondaryAndAdditionalData
Identifies secondary and additional supplemental data.
-
setSecondaryAndAdditionalData
Identifies secondary and additional supplemental data.
-
getConstructedCodetext
Constructs codetext
- Specified by:
getConstructedCodetextin interfaceIComplexCodetext- Specified by:
getConstructedCodetextin classHIBCLICComplexCodetext- Returns:
- Constructed codetext
-
initFromString
Initializes instance from constructed codetext.
- Specified by:
initFromStringin interfaceIComplexCodetext- Specified by:
initFromStringin classHIBCLICComplexCodetext- Parameters:
constructedCodetext- Constructed codetext.
-
equals
Returns a value indicating whether this instance is equal to a specified
HIBCLICCombinedCodetextvalue. -
hashCode
public int hashCode()Returns the hash code for this instance.
-