UPC-E barcode, the short version of UPC-A barcode gains wide popularity in retail for extremely small products. If you need a library for reading UPC-E barcode type in Java applications, then here is the right place for help. pqScan Barcode Scanner Library for Java is a competitive barcode scanning software on the market. It provides various recognition functions to fulfill all your requirements for Java UPC-E barcode decoding.
On this tutorial, you may know what and how you can do with this reliable Java barcode reader library. High performance APIs are provided as well. Now, let's firstly look at how to install pqScan Java Barcode Scanner SDK into your Java project.
How to Install Java SDK
It's very easy to install UPC-E Barcode Reader SDK into your Java program and only two steps can achieve this. Are you ready to test the free trial of our barcode reader software for Java? Now, download free package online and you can find pqScan.BarcodeReader.jar. Then, you may:
- Copy this toolkit to your Java application library folder.
- Then, add it to your Java classpath.
In the following part, you will see available APIs and free Java class demo for UPC-E barcode scanning.
How to Read UPC-E with Java APIs
In all, you can use six well-developed APIs to implement UPC-E barcode reading from Bmp, Gif, Jpeg/Jpg, Tiff/Tif, Png image files and Java AWT image objects in Java applications. Among them, three are used for reading all barcode types including UPC-E from image source. And the others are for setting UPC-E as target barcode type and read it only.
Java APIs: Read UPC-E Barcode Type Only
// Java APIs for decoding UPC-E barcode from local image file.
public static BarcodeResult Scan(String filename, BarCodeType barType);
// Java APIs for decoding UPC-E barcode from BufferedImage object.
public static BarcodeResult Scan(BufferedImage image, BarCodeType barType);
// Java APIs for decoding UPC-E barcode from InputStream object.
public static BarcodeResult Scan(InputStream imageStream, BarCodeType barType);
Java APIs: Read All Types, UPC-E Included
// Java APIs for recognizing all barcode types (UPC-E included) from local image file.
public static BarcodeResult Scan(String filename);
// Java APIs for recognizing all barcode types (UPC-E included) from BufferedImage object.
public static BarcodeResult Scan(BufferedImage image);
// Java APIs for recognizing all barcode types (UPC-E included) from InputStream object.
public static BarcodeResult Scan(InputStream imageStream);
How to Read UPC-E with Java Demo
The following Java class demo is a clear example of how to use specific Java API to define UPC-E as target barcode type and read all UPC-E barcodes from sample Jpg image source.
public class ReadUPC-EDemo
public static void main(String args)
// Recognize UPC-E from image file.
BarcodeResult results = BarcodeScanner.Scan("C:/sample.jpg", BarCodeType.UPCE);
for(int i = 0; i < results.length; i++)
// Display all recognized UPC-E barcode data information.
System.out.println(results[i].getData() + "--" + results[i].getBarType());
catch (Exception e)