This is how you can do it. Take a look on the example below.
Code:
try
{
java.net.URL url = new java.net.URL("http://www.mywebsite.com/someplace/test.txt");
InputStreamReader inStream = new InputStreamReader(url.openStream());
BufferedReader in = new BufferedReader(inStream);
String line = in.readLine();
while(line!=null)
{
System.out.println(line);
line = in.readLine();
}
inStream.close();
}
catch(Exception e)
{
e.printStackTrace();
}
I think this is what you were asking for. If not, please do post back.
Bookmarks