public String createScancodePic(String ordernum) throws IOException { this.initPath(); try { BitmapCanvasProvider canvas = getCanvas(); // BitmapCanvasProvider canvas = new BitmapCanvasProvider(out, // "image/jpeg", dpi, BufferedImage.TYPE_4BYTE_ABGR, false, 0); // Generate the barcode code39Bean.generateBarcode(canvas, ordernum + ""); // Signal end of generation canvas.finish(); } catch (NullPointerException e) { throw e; } catch (FileNotFoundException e) { throw e; } catch (IOException e) { throw e; } finally { try { if (null != outputStream) { outputStream.close(); } } catch (IOException e) { throw e; } } // return picFullName; return abstractPicFullName; }