且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JspWriter和PrintWriter有什么区别?

更新时间:2023-12-04 11:56:46

来自 javadoc


这个抽象类模拟了java.io.BufferedWriter和java.io.PrintWriter类中的一些功能,但它的不同之处在于它从print方法抛出java.io.IOException,而PrintWriter却没有。

This abstract class emulates some of the functionality found in the java.io.BufferedWriter and java.io.PrintWriter classes, however it differs in that it throws java.io.IOException from the print methods while PrintWriter does not.

tomcat的 JspWriterImpl 将写入委托给 PrintWriter 从回复中获得。

The JspWriterImpl of tomcat delegates the writing to the PrintWriter obtained from the response.