×

Loading...

Let me try

jabber (jabber)
java.io.Writer is at a "higher" level than java.io.OutputStream. Outputstream writes bytes, while Writer write characters.
All the tasks that Writer can take care can also be handled OutputStream.

However, if you are not outputing the characters, you probably are forced to use Outputstream. For instance, if you want your servlet to output an image, you have to use response.getServletOutput(). On the other hand, if you are just creating some HTML pages, you use either the former or response.getWriter().

Hope it helps.
(#120295@0)
2001-7-4 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 请问java中,write 和 OutputStream 的区别和联系,谢谢

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论