Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Tuesday, 10 January 2017

What is difference between PrintWriter and ServletOutputStream ?

Here we will list all the differences between PrintWriter and ServletOutputStream:

It’s a character stream (useful for text data).
It’s a byte stream (useful for graphical data).
It provide getWriter() method.
It provide getOutputStream() method.
It does character encoding for ASCII / Unicode characters.
It does not perform any character encoding because it if meant for binary data.
It’s a Concrete class.
It’s Abstract class.
Its performance is little slow because of character conversion.
Its performance is fast because no data conversion takes place.
Example :
PrintWriter out = response.getWriter();
out.println("Welcome User");                    
Example :
ServletOutputStream out = resonse.getOutputStream();

Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.

This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.

Share this Blog with yours Friends !!

No comments:

Post a Comment