该提供复制操作:
都是静态函数,没啥亮点
Java代码
public static int copy(
Reader input,
Writer output)
throws IOException {
char[] buffer = new char[DEFAULT_BUFFER_SIZE];
int count = 0;
int n = 0;
while (-1 != (n = input.read(buffer))) {
output.write(buffer, 0, n);
count += n;
}
return count;
}
Java代码
据说可以生成word文件~ JSP的
contentType="application/msword;charset=utf-8"
response.setHeader("Content-disposition",
"attachment; filename=MyCourse.doc");
org.apache.commons.io.CopyUtils
最新推荐文章于 2021-03-08 16:05:33 发布