stbyruby 发表于 2017-1-3 11:24:16

org.apache.commons.io.CopyUtils

该提供复制操作:
    都是静态函数,没啥亮点
    public static int copy(
Reader input,
Writer output)
throws IOException {
char[] buffer = new char;
int count = 0;
int n = 0;
while (-1 != (n = input.read(buffer))) {
output.write(buffer, 0, n);
count += n;
}
return count;
}

据说可以生成word文件~ JSP的
contentType="application/msword;charset=utf-8"
response.setHeader("Content-disposition",
"attachment; filename=MyCourse.doc");
页: [1]
查看完整版本: org.apache.commons.io.CopyUtils