What's the diff PrintWriter vs. OutputStreamWriter ?

From: Lars Willich (LarsWill_at_email.com)
Date: 01/28/05


Date: Fri, 28 Jan 2005 23:16:34 +0100

What is the difference bertween the following three file writing declarations:
PrintWriter out = new PrintWriter(new FileOutputStream(....));
vs.
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(....));
vs.
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(....)));

Is one method deprecated?

Are all methods suitable for text files?

Lars



Relevant Pages

  • Whats the diff PrintWriter vs. OutputStreamWriter ?
    ... What is the difference bertween the following three file writing declarations: ... PrintWriter out = new PrintWriter); ... OutputStreamWriter out = new OutputStreamWriter); ... BufferedWriter out = new BufferedWriter)); ...
    (comp.lang.java.programmer)
  • Re: Whats the diff PrintWriter vs. OutputStreamWriter ?
    ... "Lars Willich" wrote in message ... > What is the difference bertween the following three file writing declarations: ... > BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new ... they all work with character ...
    (comp.lang.java.help)