Java: checkError() for PrintWriter(OutputStreamWriter(System.out))
<p>Trying to change the encoding of System.out, I created a PrintWriter with
      <pre>PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out, ENCODING));</pre>
so</p>

<pre>out.format("some text");</pre>

<p>worked fine as for the encoding. But <pre>out.checkError()</pre> didn't return true
when the output stream was closed, e.g. by Unix 'head' command.</p>

<p>I've found that PrintStream offers a constructor with encoding</p>

<pre>PrintStream out = new PrintStream(System.out, true, ENCODING);</pre>

<p>and the checkError()
worked fine for this class.</p>

<p>I doubt the PrintWriter case is a bug, or am I missing something?</p>
