Class CameraScanResult

java.lang.Object
com.ccc.barcode.CameraScanResult

public class CameraScanResult extends Object
This scan result is passed to the camera server scan callback.
  • Field Details

  • Constructor Details

  • Method Details

    • getBarcode

      public String getBarcode()
      This returns the barcode from the scan.
      Returns:
      The barcode caught by the scan.
    • getImage

      public BufferedImage getImage()
      This returns the image the barcode was collected from. The result can be written to a file with the following code:
       
       Path target = Files.createTempFile(targetDirectory, null, ".bmp");
       String writerName = "BMP";
       boolean isWriter = ImageIO.write(result.getImage(), writerName, target.toFile());
       
       
      Returns:
      The image caught by the scan.