Barcode Xpress for Java detects all barcodes in an image and gives you complete details about them.
Supported Barcodes for Recognition
Barcodes supported for recognition are listed in the Supported Barcode Types.
Once the barcode type has been determined, use the following method and parameters to recognize the barcode.
BarcodeXpress barcodeXpress = new BarcodeXpress();
BarcodeReader barcodeReader = barcodeXpress.getReader();
barcodeReader.setBarcodeTypes(new BarcodeType[] { BarcodeType.ALL });
File inputFile = new File(inputFilePath);
BufferedImage bufferedImage = ImageIO.read(inputFile);
Result[] results = barcodeReader.analyze(bufferedImage);
System.out.println(results.length + " barcodes found. \n");
for (int i = 0; i < results.length; i++)
{
System.out.println("#" + i);
System.out.println("Barcode value = " + results[i].getValue());
System.out.println("Barcode type = " + results[i].getType() + "\n");
}