Retrieving contents of a text file

RobinTibbs

Member
Joined
Nov 8, 2006
Messages
18
Programming Experience
Beginner
I'm fairly proficient at java but i am making a small app for my Warcraft guild and figured i'd start to learn vb.net. anyhow. What I want to do first is retrieve the contents of a text file from a URL. Below is an example of it in Java and hopefully you can understand :)

VB.NET:
import java.net.*;
import java.io.*;

public class BigWigsUpdater {
	public static void main(final String[] pArgs) throws Exception {
		URL bwlatest = new URL("http://wowace.com/files/BigWigs/latest.txt");
		
		BufferedReader in = new BufferedReader(new InputStreamReader(
							bwlatest.openStream()));
							
		String inputLine;
		
		while((inputLine = in.readLine()) != null)
			System.out.println(inputLine);
		in.close();
	}
}
 
Sorted, in the end it is very much like Java, anyhow, I've gotten the app to retrieve the version number from a txt file, now I need to download the file. ive gotten code to download it but I get an unautorized access exception, do i need to set permissions or is there a way to avoid it in code?
 
I think we've changed topics here? Sounds like you open one text file to get a URL, then you want to download a file that is found @ that URL ?

If so, start yourself a new topic with that question and paste your code your using so we can try to help. If you like, link to it from here and I'll follow the trail over to it.
 
Back
Top