org.apache.commons.io.CopyUtils

该提供复制操作:
    都是静态函数,没啥亮点
    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;
    }

据说可以生成word文件~ JSP的
contentType="application/msword;charset=utf-8"
response.setHeader("Content-disposition",
			"attachment; filename=MyCourse.doc");

你可能感兴趣的:(java,apache,jsp)