Package com.iizix.barcode
Class BarcodeReader
java.lang.Object
com.iizix.barcode.BarcodeReader
Barcode reader implementation that will scan an image for a barcode.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionstatic BarcodeDatareadBarcode(BufferedImage image) Scans a BufferedImage and attempts to detect a single barcode.static BarcodeDatareadBarcode(File file) Reads a file and attempts to detect a single barcode.static BarcodeDataReads an input stream as an image of PNG or JPEG type and attempts to detect a single barcode.static BarcodeDatareadBarcode(String fileName) Reads a file and attempts to detect a single barcode.
Constructor Details
BarcodeReader
public BarcodeReader()
Method Details
readBarcode
Reads a file and attempts to detect a single barcode.- Parameters:
fileName- The file name to read.- Returns:
- The barcode data.
- Throws:
IOException- For file I/O errors.NotFoundException- If a barcode is not found.
readBarcode
Reads a file and attempts to detect a single barcode.- Parameters:
file- The file to read.- Returns:
- The barcode data.
- Throws:
IOException- For file I/O errors.NotFoundException- If a barcode is not found.
readBarcode
Reads an input stream as an image of PNG or JPEG type and attempts to detect a single barcode.- Parameters:
in- The input stream to read.Note: it is up to the caller to close the input stream.
- Returns:
- The barcode data.
- Throws:
IOException- For I/O errors.NotFoundException- If a barcode is not found.
readBarcode
Scans a BufferedImage and attempts to detect a single barcode.- Parameters:
image- The image.- Returns:
- The barcode data.
- Throws:
NotFoundException- If a barcode is not found.