I am browsing a ftp directory in a html-address and I want to list all the files without getting the html code also. This is my code now
new Thread(new Runnable() {
public void run() {
URL oracle = null;
try {
oracle = new URL("http://mopedshowcase.com/Comments/Cross/1/");
} catch (MalformedURLException e) {
e.printStackTrace();
}
BufferedReader in = null;
try {
in = new BufferedReader(
new InputStreamReader(oracle.openStream()));
} catch (IOException e) {
e.printStackTrace();
}
String inputLine;
try {
while ((inputLine = in.readLine()) != null) {
final String ass = inputLine;
runOnUiThread(new Runnable() {
@Override
public void run() {
Log.e("My : ",""+ass);
}
});
}
} catch (IOException e) {
e.printStackTrace();
}
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}}).start();
}
but this is the output
08-10 14:01:05.007 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
08-10 14:01:05.007 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ <html>
08-10 14:01:05.007 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ <head>
08-10 14:01:05.008 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ <title>Index of /Comments/Cross/1</title>
08-10 14:01:05.008 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ </head>
08-10 14:01:05.008 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ <body>
08-10 14:01:05.008 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ <h1>Index of /Comments/Cross/1</h1>
08-10 14:01:05.008 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ <ul><li><a href="/Comments/Cross/"> Parent Directory</a></li>
08-10 14:01:05.008 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ <li><a href="%25!Emilio%25Gaines!%25466376720196163289492.txt"> %!Emilio%Gaines!%466376720196163289492.txt</a></li>
08-10 14:01:05.008 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ </ul>
08-10 14:01:05.008 5655-5655/com.emiliogaines.mopedshowcase E/My :﹕ </body></html>
how can I get the site content and not the html code also? Thanks