Package com.iizix.barcode
Class BarcodeData
java.lang.Object
com.iizix.barcode.BarcodeData
Class containing the barcode that has been read from an image.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- asURN()Gets the URN representation of this barcode if it is encodable.- asURN- (int width, int height) Gets the URN representation of this barcode if it is encodable, in the requested size.Creates a barcode builder with the barcode type and text.- booleanChecks if this barcode data is equal to another object.Gets the string representation of the barcode format.- getText()Gets the barcode text.- longGets the timestamp when the barcode was decoded.- getType()Gets the IIZI barcode type if it is encodable.Gets the barcode Zxing format enum.- int- hashCode()Returns the hashcode of the barcode data.- toString()Gets a String representation of the barcode data.
- Method Details- getTextGets the barcode text.- Returns:
- The text.
 
- getTypeGets the IIZI barcode type if it is encodable.- Returns:
- The barcode type, or nullif it cannot be re-encoded.
 
- asURNGets the URN representation of this barcode if it is encodable.- Please note that you need to assign a size to the barcode to encoded it. - Use the - BarcodeURN.createBuilder()to do so, or use the method- asURN(int, int).- Returns:
- The barcode URN without size (smallest size possible), or nullif it cannot be encoded.
- Throws:
- BarcodeException- If the text cannot be encoded in the barcode type or format.
 
- asURNGets the URN representation of this barcode if it is encodable, in the requested size.- Use the - BarcodeURN.createBuilder()if you wish to add more parameters for encoding and place that information in a BarcodeURN.- Note that the values can be enlarged if the barcode bitmap does not fit inside the requested dimension. - Parameters:
- width- The width.
- height- The height.
- Returns:
- The barcode with the specified size, or nullif it cannot be encoded.
- Throws:
- IllegalArgumentException- If the- sizeis negative.
- BarcodeException
 
- createBuilderCreates a barcode builder with the barcode type and text.- The builder is in non-validating mode, if one is created. - Returns:
- The barcode builder initialized with the type and text, or nullif the barcode is not encodable.
 
- getFormatStringGets the string representation of the barcode format.- Returns:
- A string of the barcode format.
 
- getZxingFormatGets the barcode Zxing format enum.- Returns:
- The Zxing barcode format.
 
- getTimeStamppublic long getTimeStamp()Gets the timestamp when the barcode was decoded.- Returns:
- A timestamp in milliseconds since the Epoch.
 
- hashCodepublic int hashCode()Returns the hashcode of the barcode data.
- equalsChecks if this barcode data is equal to another object.
- toStringGets a String representation of the barcode data.