我正在尝试附件文件以响应(API)。我找到了代码:response.setContentType("application/zip");response.setHeader("Content-disposition", "attachment; filename=\"" + fileZipName + "\"");OutputStream out = response.getOutputStream();byte[] buffer = new byte[4096];int length;while ((length = in.read(buffer)) > 0){ out.write(buffer, 0, length);}in.close();out.flush();看起来好像可以,但是我不知道byte [] buffer = new byte [4096],这是什么?和4096是什么意思?在这种情况下,您能帮我吗?
添加回答
举报
0/150
提交
取消