BarcodeSettings
Inheritance: java.lang.Object
public class BarcodeSettings
The main BarCode decoding parameters. Contains parameters which make influence on recognized data.
Methods
Method | Description |
---|---|
equals(Object arg0) | |
getAustraliaPost() | Gets AustraliaPost decoding parameters |
getChecksumValidation() | Enable checksum validation during recognition for 1D and Postal barcodes. |
getClass() | |
getDetectEncoding() | The flag which force engine to detect codetext encoding for Unicode codesets. |
getStripFNC() | Strip FNC1, FNC2, FNC3 characters from codetext. |
hashCode() | |
notify() | |
notifyAll() | |
setChecksumValidation(ChecksumValidation value) | Enable checksum validation during recognition for 1D and Postal barcodes. |
setDetectEncoding(boolean value) | The flag which force engine to detect codetext encoding for Unicode codesets. |
setStripFNC(boolean value) | Strip FNC1, FNC2, FNC3 characters from codetext. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getAustraliaPost()
public AustraliaPostSettings getAustraliaPost()
Gets AustraliaPost decoding parameters
Returns: AustraliaPostSettings - The AustraliaPost decoding parameters which make influence on recognized data of AustraliaPost symbology
getChecksumValidation()
public ChecksumValidation getChecksumValidation()
Enable checksum validation during recognition for 1D and Postal barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5 Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies Example BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.EAN_13, “1234567890128”); generator.save(“c:/test.png”); BarCodeReader reader = new BarCodeReader(“c:/test.png”, DecodeType.EAN_13); //checksum disabled reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.OFF); for(BarCodeResult result : reader.readBarCodes()) { System.out.println(“BarCode CodeText: " + result.getCodeText()); System.out.println(“BarCode Value: " + result.getExtended().getOneD().getValue()); System.out.println(“BarCode Checksum: " + result.getExtended().getOneD().getCheckSum()); } BarCodeReader reader = new BarCodeReader(@“c:\test.png”, DecodeType.EAN_13); //checksum enabled reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON); for (BarCodeResult result : reader.readBarCodes()) { System.out.println(“BarCode CodeText: " + result.CodeText); System.out.println(“BarCode Value: " + result.getExtended().getOneD().getValue()); System.out.println(“BarCode Checksum: " + result.getExtended().getOneD().getCheckSum()); }
Returns: ChecksumValidation - Enable checksum validation during recognition for 1D and Postal barcodes.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getDetectEncoding()
public boolean getDetectEncoding()
The flag which force engine to detect codetext encoding for Unicode codesets. Default value is true. Example BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR); generator.setCodeText(”\u0421\u043b\u043e\u0432\u043e”, Charset.forName(“UTF-8”)); Bitmap im = generator.generateBarcodeImage(); //detects encoding for Unicode codesets is enabled BarCodeReader reader = new BarCodeReader(im, DecodeType.QR); reader.getBarcodeSettings().setDetectEncoding(true); for(BarCodeResult result : reader.readBarCodes()) System.out.println(“BarCode CodeText: " + result.getCodeText()); //detect encoding is disabled BarCodeReader reader = new BarCodeReader(im, DecodeType.QR); reader.getBarcodeSettings().setDetectEncoding(false); for(BarCodeResult result : reader.readBarCodes()) System.out.println(“BarCode CodeText: " + result.getCodeText());
Returns: boolean - The flag which force engine to detect codetext encoding for Unicode codesets
getStripFNC()
public boolean getStripFNC()
Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false. Example BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, “(02)04006664241007(37)1(400)7019590754”); generator.save(“c:/test.png”); BarCodeReader reader = new BarCodeReader(“c:/test.png”, DecodeType.CODE_128); //StripFNC disabled reader.getBarcodeSettings().setStripFNC(false); for(BarCodeResult result : reader.readBarCodes()) { System.our.println(“BarCode CodeText: " + result.getCodeText()); } BarCodeReader reader = new BarCodeReader(“c:/test.png”, DecodeType.CODE_128); //StripFNC enabled reader.getBarcodeSettings().setStripFNC(true); for(BarCodeResult result : reader.readBarCodes()) { System.our.println(“BarCode CodeText: " + result.getCodeText()); }
Returns: boolean - Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setChecksumValidation(ChecksumValidation value)
public void setChecksumValidation(ChecksumValidation value)
Enable checksum validation during recognition for 1D and Postal barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5 Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies Example BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.EAN_13, “1234567890128”); generator.save(“c:/test.png”); BarCodeReader reader = new BarCodeReader(“c:/test.png”, DecodeType.EAN_13); //checksum disabled reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.OFF); for(BarCodeResult result : reader.readBarCodes()) { System.out.println(“BarCode CodeText: " + result.getCodeText()); System.out.println(“BarCode Value: " + result.getExtended().getOneD().getValue()); System.out.println(“BarCode Checksum: " + result.getExtended().getOneD().getCheckSum()); } BarCodeReader reader = new BarCodeReader(@“c:\test.png”, DecodeType.EAN_13); //checksum enabled reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON); for (BarCodeResult result : reader.readBarCodes()) { System.out.println(“BarCode CodeText: " + result.CodeText); System.out.println(“BarCode Value: " + result.getExtended().getOneD().getValue()); System.out.println(“BarCode Checksum: " + result.getExtended().getOneD().getCheckSum()); }
Parameters:
Parameter | Type | Description |
---|---|---|
value | ChecksumValidation | Enable checksum validation during recognition for 1D and Postal barcodes. |
setDetectEncoding(boolean value)
public void setDetectEncoding(boolean value)
The flag which force engine to detect codetext encoding for Unicode codesets. Default value is true. Example BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR, “\u0421\u043b\u043e\u0432\u043e”)) generator.getParameters().getBarcode().getQR().setCodeTextEncoding(Charset.forName(“UTF-8”)); Bitmap im = generator.generateBarcodeImage(); //detects encoding for Unicode codesets is enabled BarCodeReader reader = new BarCodeReader(im, DecodeType.QR); reader.getBarcodeSettings().setDetectEncoding(true); for(BarCodeResult result : reader.readBarCodes()) System.out.println(“BarCode CodeText: " + result.getCodeText()); //detect encoding is disabled BarCodeReader reader = new BarCodeReader(im, DecodeType.QR); reader.getBarcodeSettings().setDetectEncoding(false); for(BarCodeResult result : reader.readBarCodes()) System.out.println(“BarCode CodeText: " + result.getCodeText());
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setStripFNC(boolean value)
public void setStripFNC(boolean value)
Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false. Example BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, “(02)04006664241007(37)1(400)7019590754”); generator.save(“c:/test.png”); BarCodeReader reader = new BarCodeReader(“c:/test.png”, DecodeType.CODE_128); //StripFNC disabled reader.getBarcodeSettings().setStripFNC(false); for(BarCodeResult result : reader.readBarCodes()) { System.our.println(“BarCode CodeText: " + result.getCodeText()); } BarCodeReader reader = new BarCodeReader(“c:/test.png”, DecodeType.CODE_128); //StripFNC enabled reader.getBarcodeSettings().setStripFNC(true); for(BarCodeResult result : reader.readBarCodes()) { System.our.println(“BarCode CodeText: " + result.getCodeText()); }
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false. |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |