Printwriter vs OutputStream vs PrintStream

OutputStreams are meant for binary data. Writers (including PrintWriter) are meant for text data.

All characters printed by a PrintStream are converted into bytes using the platform's default character encoding. The PrintWriter class should be used in situations that require writing characters rather than bytes.

PrintStream and Printwriter never throw an IOException. OutputStream can throw an IOException.


Popular posts from this blog

How to get Active Transactions and Locks from MySQL

Example of a PAC file