3条回答 默认 最新
Z. ZHANG 2017-02-08 04:07关注你这样试试
FileInputStream fis = new FileInputStream(absolutePath); OutputStream os = response.getOutputStream(); try { int count = 0; byte[] buffer = new byte[1024 * 1024]; while ((count = fis.read(buffer)) != -1) os.write(buffer, 0, count); os.flush(); } catch (IOException e) { e.printStackTrace(); } finally { if (os != null) os.close(); if (fis != null) fis.close(); } }解决 无用评论 打赏 举报



