|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.j2me.barcode.recognition.BarCodeReaderInterface
com.aspose.j2me.barcode.recognition.BarCodeReader
BarCodeReader encapsulates an image, it then perform
[Example]
FileConnection fc = (FileConnection)Connector.open("file://localhost/images/bar1.png");
java.io.InputStream inputstream = fc.openInputStream();
Image img = javax.microedition.lcdui.Image.createImage(inputstream);
inputstream.close();
fc.close();
BarCodeReader reader = new BarCodeReader(img, BarCodeReadType.Code39Standard);
if(reader.read())
{
System.out.println( reader.getCodeText());
}
Constructor Summary | |
BarCodeReader(javax.microedition.lcdui.Image image)
BarCodeReader constructor from an image |
|
BarCodeReader(javax.microedition.lcdui.Image image,
BarCodeReadType type)
initializes a new instance of the BarCodeReader class. |
Method Summary | |
void |
close()
Closes the barcode reader |
java.lang.String |
getCodeText()
Gets the code text. |
java.lang.String |
getMacroPdf417FileID()
Gets the file ID of the barcode, only available with MacroPdf417 |
boolean |
getMacroPdf417LastSegment()
Gets the last segment flag,only available with MacroPdf417. |
int |
getMacroPdf417SegmentID()
Gets the segment ID of the barcode,only available with MacroPdf417. |
BarCodeReadType |
getReadType()
Gets the barcode type. |
long |
getTimeout()
Gets the timeout value in millisecond. |
boolean |
read()
Detect barcodes |
void |
SetHints(RecognitionHints hints)
Sets the Hints for reading |
void |
setTimeout(int value)
Sets the timeout value in millisecond. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BarCodeReader(javax.microedition.lcdui.Image image)
image
- public BarCodeReader(javax.microedition.lcdui.Image image, BarCodeReadType type)
image
- The Imagetype
- The BarCodeReadType.Method Detail |
public void close()
public boolean read()
Detect barcodes
[Example] BarCodeReader rd = new BarCodeReader(Toolkit.getDefaultToolkit().getImage("testcode39.png"),BarCodeReadType.Code39Standard); if(rd.read()) { System.out.println("Found " + rd.getCodeText()); }
public long getTimeout()
public void setTimeout(int value)
value
- public void SetHints(RecognitionHints hints)
hints
- public java.lang.String getCodeText()
public java.lang.String getMacroPdf417FileID()
public boolean getMacroPdf417LastSegment()
public int getMacroPdf417SegmentID()
public BarCodeReadType getReadType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |