How to get a binary file from a remote php script response?
<p>I'm calling a script that gives me a binary file (12345.cl), with binary data. The script is done, and it's working, if i paste it on the nagivator i get the binary file.</p>

<p>Now i have a problem: How i transform the response of the script into a binary resource to use it in my app?</p>

<p>For the moment, i have this code:</p>

<pre><code> public void decodeStream( String mURL ){  
        BufferedInputStream bis = new BufferedInputStream(new URL(mURL).openStream(), BUFFER_IO_SIZE);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        BufferedOutputStream bos = new BufferedOutputStream(baos, BUFFER_IO_SIZE);
        copy(bis, bos);
        bos.flush();
</code></pre>

<p>Then, i have a BufferedOutputStream with the response, but i dont know how to transform it into a binary resource to use it</p>

<p><strong>i need to obtain a datainputstream with the file</strong> but i dont know how to achieve it</p>

<p>thanks</p>
