QR Code Image Sample - pqScan.com
Java UPC-E Scanner SDK Building up perfect quality UPC-E barcode scanning in Java Download Trial Purchase Now

Read UPC-E in Java Application

back to home  >  Java Barcode Scanner SDK  >  How to Read Barcodes in Java  >  Java UPC-E Scanning Tutorial

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.

import com.pqscan.barcodereader.BarcodeResult;
import com.pqscan.barcodereader.BarcodeScanner;
import com.pqscan.barcodereader.BarCodeType;

public class ReadUPC-EDemo
{
    public static void main(String[] args)
    {
        try
        {
            // 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)
        {
            e.printStackTrace();
        }
    }
}
pqScan SDK
Barcode Decoder Library in Java
Online Guide
Read Barcode in Java Application
Barcode Type
Decode QR Code Using Java Decode Data Matrix Using Java Decode PDF-417 Using Java Decode Aztec Code Using Java Decode EAN-13 Using Java Decode EAN-8 Using Java Decode UPC-A Using Java Decode UPC-E Using Java Decode Code 128 Using Java Decode Code 39 Using Java Decode Code 93 Using Java Decode Codabar Using Java Decode ITF-14 Using Java View All Barcodes >>
Using your mature SDK, we reduce our development time to 65%. It's really easy to use and provides all bar code reading features that we need. Keep up the great work. Cathy Blizzard