BarCodeResult

Inheritance: java.lang.Object

public final class BarCodeResult

Stores recognized barcode data like SingleDecodeType type, string codetext, BarCodeRegionParameters region and other parameters


This sample shows how to obtain BarCodeResult.
 
 BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128, "12345");
 generator.save("test.png");
 BarCodeReader reader = new BarCodeReader("test.png", DecodeType.CODE_39_STANDARD, DecodeType.CODE_128);
 for(BarCodeResult result : reader.readBarCodes())
 {
     System.out.println("BarCode Type: " + result.getCodeTypeName());
     System.out.println("BarCode CodeText: " + result.getCodeText());
     System.out.println("BarCode Confidence: " + result.getConfidence());
     System.out.println("BarCode ReadingQuality: " + result.getReadingQuality());
     System.out.println("BarCode Angle: " + result.getRegion().getAngle());
 }

Constructors

ConstructorDescription
BarCodeResult(BarCodeResult result)Creates a a copy of the BarCodeResult class.

Methods

MethodDescription
deepClone()Creates a copy of BarCodeResult class.
equals(Object obj)Returns a value indicating whether this instance is equal to a specified BarCodeResult value.
getClass()
getCodeBytes()Gets the encoded code bytes
getCodeText()Gets the code text
getCodeText(Charset encoding)Gets the code text with encoding.
getCodeType()Gets the barcode type
getCodeTypeName()Gets the name of the barcode type
getConfidence()Gets recognition confidence level of the recognized barcode
getExtended()Gets extended parameters of recognized barcode
getReadingQuality()Gets the reading quality.
getRegion()Gets the barcode region
hashCode()Returns the hash code for this instance.
notify()
notifyAll()
toString()Returns a human-readable string representation of this BarCodeResult .
wait()
wait(long arg0)
wait(long arg0, int arg1)

BarCodeResult(BarCodeResult result)

public BarCodeResult(BarCodeResult result)

Creates a a copy of the BarCodeResult class.

Parameters:

ParameterTypeDescription
resultBarCodeResultAn copy BarCodeResult instance.

deepClone()

public Object deepClone()

Creates a copy of BarCodeResult class.

Returns: java.lang.Object - Returns copy of BarCodeResult class.

equals(Object obj)

public boolean equals(Object obj)

Returns a value indicating whether this instance is equal to a specified BarCodeResult value.

Parameters:

ParameterTypeDescription
objjava.lang.ObjectAn BarCodeResult value to compare to this instance.

Returns: boolean - true if obj has the same value as this instance; otherwise, false .

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCodeBytes()

public byte[] getCodeBytes()

Gets the encoded code bytes

Value: The code bytes of the barcode

Returns: byte[]

getCodeText()

public String getCodeText()

Gets the code text

Value: The code text of the barcode

Returns: java.lang.String

getCodeText(Charset encoding)

public String getCodeText(Charset encoding)

Gets the code text with encoding.

Parameters:

ParameterTypeDescription
encodingjava.nio.charset.CharsetThe encoding for codetext.

Returns: java.lang.String - A string containing recognized code text.

getCodeType()

public SingleDecodeType getCodeType()

Gets the barcode type

Value: The type information of the recognized barcode

Returns: SingleDecodeType

getCodeTypeName()

public String getCodeTypeName()

Gets the name of the barcode type

Value: The type name of the recognized barcode

Returns: java.lang.String

getConfidence()

public int getConfidence()

Gets recognition confidence level of the recognized barcode

Value: BarCodeConfidence.Strong does not have fakes or misrecognitions, BarCodeConfidence.Moderate could sometimes have fakes or incorrect codetext because this confidence level for barcodews with weak cheksum or even without it, BarCodeConfidence.None always has incorrect codetext and could be fake recognitions

Returns: int

getExtended()

public BarCodeExtendedParameters getExtended()

Gets extended parameters of recognized barcode

Value: The extended parameters of recognized barcode

Returns: BarCodeExtendedParameters

getReadingQuality()

public double getReadingQuality()

Gets the reading quality. Works for 1D and postal barcodes.

Value: The reading quality percent

Returns: double

getRegion()

public BarCodeRegionParameters getRegion()

Gets the barcode region

Value: The region of the recognized barcode

Returns: BarCodeRegionParameters

hashCode()

public int hashCode()

Returns the hash code for this instance.

Returns: int - A 32-bit signed integer hash code.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

Returns a human-readable string representation of this BarCodeResult .

Returns: java.lang.String - A string that represents this BarCodeResult .

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int