m0_37512611 2017-06-10 15:46 采纳率: 0%
浏览 8899

后台生成的二维码图片怎么传给前台?java

sevelet在后台生成了微信支付的二维码图片,怎么传给前台,我是一个新手,老师留的大作业,就差微信支付没做了,这是后台生成的二维码,怎么在前台调用,这是后台生成二维码的代码 try {

int width = 200;

int height = 200;

System.out.println("123");
String format = "png";

Hashtable hints = new Hashtable();

hints.put(EncodeHintType.CHARACTER_SET, "utf-8");

BitMatrix bitMatrix = new MultiFormatWriter().encode(code_url, BarcodeFormat.QR_CODE, width, height, hints);

OutputStream out = null;

out = response.getOutputStream();

MatrixToImageWriter.writeToStream(bitMatrix, format, out);

out.flush();

out.close();

  • 写回答

4条回答

  • devmiao 2017-06-10 15:53
    关注
    评论

报告相同问题?

悬赏问题

  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗