Read binary file as byte[] and send from servlet as char[]
<p>I have a servlet which reads BINARY file and sends it to a client.</p>

<pre><code>byte[] binaryData = FileUtils.readFileToByteArray(path);
response.getWriter().print(new String(binaryData));
</code></pre>

<p>It works for NON BINARY files. When I have a BINARY file, I get <code>receive file length bigger than origin or received file not the same</code>. How I can read and send binary data?</p>

<p>Thanks.</p>
