How to retrieve InputStream from FTPFile using FTPClient?
<p>I'm making application which needs to read strings from file on FTP Server. I use apache.commons.net.FTPClient for it. I have following code:</p>

<pre><code>        Log.e("sizzeee", String.valueOf(mClient.listFiles().length));
        InputStream stream=mClient.retrieveFileStream(f.getName());
        DataInputStream in=new DataInputStream(stream);
        BufferedReader buf=new BufferedReader(new InputStreamReader(in));

        List&lt;String&gt; tasks=new ArrayList&lt;String&gt;();
        String s;
        while ((s=buf.readLine())!=null) {
            tasks.add(s.trim());
        }

        stream.close();
        in.close();
        buf.close();

        Log.e("sizzeee", String.valueOf(mClient.listFiles().length));
</code></pre>

<p>That works correctly, but I have some problems: last Log instruction shows "0" files in current directory! But first Log instruction shows "6" files. Therefore I think that I don't close file stream or something else. Please, inform me about my mistake. Thank you</p>
