fw.close();
tmpfile.deleteOnExit();
Reader barcodeReader = new MultiFormatReader();
BufferedImage image = ImageIO.read(tmpfile);
MonochromeBitmapSource source = new BufferedImageMonochromeBitmapSource(image);
try
{
Result result = barcodeReader.decode(source);
System.out.println(result.getText());