Class MaxiCodeStructuredCodetext
java.lang.Object
com.aspose.barcode.complexbarcode.MaxiCodeCodetext
com.aspose.barcode.complexbarcode.MaxiCodeStructuredCodetext
- All Implemented Interfaces:
IComplexCodetext
- Direct Known Subclasses:
MaxiCodeCodetextMode2,MaxiCodeCodetextMode3
Base class for encoding and decoding the text embedded in the MaxiCode code for modes 2 and 3.
This sample shows how to decode raw MaxiCode codetext to MaxiCodeStructuredCodetext instance.
BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.MAXI_CODE);
for (BarCodeResult result : reader.readBarCodes())
{
MaxiCodeCodetext resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText());
if (resultMaxiCodeCodetext instanceof MaxiCodeStructuredCodetext)
{
MaxiCodeStructuredCodetext maxiCodeStructuredCodetext = (MaxiCodeStructuredCodetext)resultMaxiCodeCodetext;
System.out.println("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode());
System.out.println("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode());
System.out.println("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory());
}
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns a value indicating whether this instance is equal to a specified MaxiCodeStructuredCodetext value.Constructs codetextintIdentifies 3 digit country code.Identifies the postal code.Identifies second message of the barcode.intIdentifies 3 digit service category.inthashCode()Returns the hash code for this instance.voidinitFromString(String constructedCodetext) Initializes instance from constructed codetext.voidsetCountryCode(int value) Identifies 3 digit country code.final voidsetPostalCode(String value) Identifies the postal code.voidIdentifies second message of the barcode.voidsetServiceCategory(int value) Identifies 3 digit service category.Methods inherited from class com.aspose.barcode.complexbarcode.MaxiCodeCodetext
getBarcodeType, getECIEncoding, getEncodeMode, getMaxiCodeEncodeMode, getMode, setECIEncoding, setEncodeMode, setMaxiCodeEncodeMode
-
Constructor Details
-
MaxiCodeStructuredCodetext
public MaxiCodeStructuredCodetext()
-
-
Method Details
-
getPostalCode
Identifies the postal code. Must be 9 digits in mode 2 or 6 alphanumeric symbols in mode 3. -
setPostalCode
Identifies the postal code. Must be 9 digits in mode 2 or 6 alphanumeric symbols in mode 3. -
getCountryCode
public int getCountryCode()Identifies 3 digit country code. -
setCountryCode
public void setCountryCode(int value) Identifies 3 digit country code. -
getServiceCategory
public int getServiceCategory()Identifies 3 digit service category. -
setServiceCategory
public void setServiceCategory(int value) Identifies 3 digit service category. -
getSecondMessage
Identifies second message of the barcode. -
setSecondMessage
Identifies second message of the barcode. -
getConstructedCodetext
Constructs codetext- Specified by:
getConstructedCodetextin interfaceIComplexCodetext- Specified by:
getConstructedCodetextin classMaxiCodeCodetext- Returns:
- Constructed codetext
-
initFromString
Initializes instance from constructed codetext.- Specified by:
initFromStringin interfaceIComplexCodetext- Specified by:
initFromStringin classMaxiCodeCodetext- Parameters:
constructedCodetext- Constructed codetext.
-
equals
Returns a value indicating whether this instance is equal to a specified MaxiCodeStructuredCodetext value. -
hashCode
public int hashCode()Returns the hash code for this instance.
-