标签:
InputStream is = request.getSession().getServletContext().getResourceAsStream("/WEB-INF/swdjzbg.png"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); int len = 1024; byte tmp [] = new byte[len]; int i ; while((i=is.read(tmp, 0, len))>0){ baos.write(tmp, 0, i); } byte imgs[] = baos.toByteArray();
标签:
原文地址:http://www.cnblogs.com/yshyee/p/4391585.html