Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.aspose.barcoderecognition
Class BarCodeReader

    java.lang.Object
      com.aspose.barcoderecognition.BarCodeReader

    public class BarCodeReader

extends java.lang.Object

BarCodeReader encapsulates an image, it then perform Read operation to detect one or more barcodes on this image. Example

     [Example]
     BarCodeReader rd = new BarCodeReader(Toolkit.getDefaultToolkit().getImage("testcode39.png"),BarCodeReadType.Code39Extended);
     if(rd.read( ))
     {
            System.out.println("Found " + rd.getCodeText());
     }

Constructor Summary
`BarCodeReader(java.awt.Image image)` BarCodeReader constructor from an image
`BarCodeReader(java.awt.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.
`BarCodeRegion` | `getRegion()` Gets the barcode region.
`int` | `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

### BarCodeReader

    public BarCodeReader(java.awt.Image image)

  BarCodeReader constructor from an image

  Parameters:
    `image` -

### BarCodeReader

    public BarCodeReader(java.awt.Image image,
                         BarCodeReadType type)

  initializes a new instance of the BarCodeReader class.

  Parameters:
    `image` - The Image
    `type` - The BarCodeReadType.

Method Detail

### close

    public void close()

  Closes the barcode reader

### read

    public boolean read()

  Detect barcodes

  Example

       [Example]
       BarCodeReader rd = new BarCodeReader(Toolkit.getDefaultToolkit().getImage("testcode39.png"),BarCodeReadType.Code39Standard);
       if(rd.read())
       {
              System.out.println("Found " + rd.getCodeText());
       }

  Returns:
    True if the next barcode was read successfully; false if there are no more to read.

### getTimeout

    public int getTimeout()

  Gets the timeout value in millisecond.

  Returns:
    The timeout value in millisecond.

### setTimeout

    public void setTimeout(int value)

  Sets the timeout value in millisecond.

  Parameters:
    `value` -

### SetHints

    public void SetHints(RecognitionHints hints)

  Sets the Hints for reading

  Parameters:
    `hints` -

### getCodeText

    public java.lang.String getCodeText()

  Gets the code text.

  Returns:
    The code text of the barcode.

### getMacroPdf417FileID

    public java.lang.String getMacroPdf417FileID()

  Gets the file ID of the barcode, only available with MacroPdf417

  Returns:
    file ID of the MacroPdf417 barcode

### getMacroPdf417LastSegment

    public boolean getMacroPdf417LastSegment()

  Gets the last segment flag,only available with MacroPdf417.

  Returns:
    True if this barcode is the last segment.

### getMacroPdf417SegmentID

    public int getMacroPdf417SegmentID()

  Gets the segment ID of the barcode,only available with MacroPdf417.

  Returns:
    the segment ID of the MacroPdf417 barcode

### getReadType

    public BarCodeReadType getReadType()

  Gets the barcode type.

  Returns:
    The type information of the recognized barcode.

### getRegion

    public BarCodeRegion getRegion()

  Gets the barcode region.

  Returns:
    The region of the recognized barcode.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD