Netwars

Javaaa

[#1]
22.05.2008 00:55

Jak sie nazywa funkcja za pomoca ktorej moge pobrac w Javie plik z neta /// kod strony www ? thx za helpa

[#2]
22.05.2008 01:10

Pewnie jest lepszy sposób, ale ja to robiłem tak:

URL url= new URL( "http://adresstrony.pl" );
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
BufferedReader input = new BufferedReader( new InputStreamReader( connection.getInputStream() ) );
String inputLine;
StringBuffer buffer= new StringBuffer();
while ( ( inputLine = input.readLine() ) != null ) { buffer.append( inputLine ); }
String content= buffer.toString();

[#3]
22.05.2008 01:42

kazdy sposob jest dobry - thx :)

[#4]
22.05.2008 01:56

tym bardziej ze ten dziala :)

[#5]
22.05.2008 02:37

lepszego sposobu raczej nie ma ;)

[#7]
22.05.2008 03:00

dobra poradze sobie :)

Zaloguj się, żeby odpowiedzieć.