Is there a simple “tee” filter for Java streams?
<p>For debugging purpouses I would like to dump the content of an output stream into a file while it is processed. The stream is parsed by <code>org.xml.sax.XMLReader</code> which will comsume the data.</p>

<p>I would gess one need a filter to archive this and before writing one my self I wanted to ask if there is a ready made version allready.</p>

<p><strong>UPDATE:</strong></p>

<p>Should habe mentioned that I work on Android.</p>

<p><strong>What Do I have:</strong></p>

<pre><code>        final org.apache.http.HttpEntity responseEntity = response.getEntity ();
        final java.io.InputStream content = responseEntity.getContent ();
        final java.io.InputStreamReader contentReader =
           new java.io.InputStreamReader (content, "UTF-8");
</code></pre>

<p>So I have an <code>java.io.InputStream</code> and an <code>InputStreamReader</code>.</p>
