二进制转换图片 OutputStream o = response.getOutputStream(); // 将图片转换成字符串 File f = new File("f:\\Vista.png"); FileInputStream fis = new FileInputStream( f ); byte[] bytes = new byte[fis.available()]; fis.read(bytes); fis.close(); // 生成字符串 String imgStr = byte2hex( bytes ); System.out