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 HIBCLICPrimaryCodetext.HIBCLICPrimaryCodetext complexCodetext = new HIBCLICPrimaryCodetext(); 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(); String codetext = reader.getFoundBarCodes()[0].getCodeText(); 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 and Description |
---|
HIBCLICPrimaryDataCodetext() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns a value indicating whether this instance is equal to a specified
HIBCLICPrimaryDataCodetext value. |
java.lang.String |
getConstructedCodetext()
Constructs codetext
|
PrimaryData |
getData()
Identifies primary data.
|
int |
hashCode()
Returns the hash code for this instance.
|
void |
initFromString(java.lang.String constructedCodetext)
Initializes instance from constructed codetext.
|
void |
setData(PrimaryData value)
Identifies primary data.
|
getBarcodeType_Rename_Namesake, getBarcodeType, setBarcodeType
public PrimaryData getData()
Identifies primary data.
public void setData(PrimaryData value)
Identifies primary data.
public java.lang.String getConstructedCodetext()
Constructs codetext
getConstructedCodetext
in interface IComplexCodetext
getConstructedCodetext
in class HIBCLICComplexCodetext
public void initFromString(java.lang.String constructedCodetext)
Initializes instance from constructed codetext.
initFromString
in interface IComplexCodetext
initFromString
in class HIBCLICComplexCodetext
constructedCodetext
- Constructed codetext.public boolean equals(java.lang.Object obj)
Returns a value indicating whether this instance is equal to a specified HIBCLICPrimaryDataCodetext
value.
equals
in class java.lang.Object
obj
- An HIBCLICPrimaryDataCodetext
value to compare to this instance.<b>true</b>
if obj has the same value as this instance; otherwise, <b>false</b>
.public int hashCode()
Returns the hash code for this instance.
hashCode
in class java.lang.Object