Differentiate between the Print Writer and Servlet Output Stream?

devquora
devquora

Posted On: Feb 22, 2018

 

    1 Answer Written

  •  devquora
    Answered by Tanu Singh

    PrintWriter is used to write text-based data to the response output stream and automatically handles character encoding, while ServletOutputStream is used to write binary data to the response output stream and does not perform any character encoding. Which one to use depends on the nature of the data that needs to be written to the output stream.

Related Questions

Please Login or Register to leave a response.

Related Questions

Java Servlet Interview Questions

What do you mean by Servlet?

It is designed by the Java software company. It is used to extend the ability of the server...

Java Servlet Interview Questions

Which HTTP method is said to be non-idempotent and idempotent?

If any HTTP brings the same result every time then it means it is idempotent...