I’m creating an application for Android and would like it to be able to read a text file via anonymous FTP.
I've tried URLConnection, but it doesn't seem to be working. After some Google searching it appears that URLConnection doesn't always work with some FTP servers.
All Java FTP connection libraries I've found require you to download the file to a local location before reading it.
However, I would like to have the same functionality as URLConnection in that I can just use the following similar code:
String urlString = "ftp://ftp.domain.com/testing.txt";
URL url = new URL(urlString);
FTPConnection conn = url.openConnection();
BufferedReader reader = new BufferedReader(new InputStreamReader(
conn.getInputStream()));