como fazer para reuisitar uma html no java?
preciso fazer isso e não encontro maneiras para isso.
valeu!!!
Requisitar html!
B
1 Resposta
A
import java.net.;
import java.io.;
public class URLReader {
public static void main(String[] args) throws Exception {
URL yahoo = new URL(“<a href="http://www.yahoo.com/">http://www.yahoo.com/</a>”);
BufferedReader in = new BufferedReader(
new InputStreamReader(
yahoo.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
Aconselho a voceh a ler o tutorial on-line do java para maiores informacoes. Ai esta o link do tutorial de onde eu copie o codigo acima.
http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
Criado 2 de junho de 2004
Ultima resposta 2 de jun. de 2004
Respostas 1
Participantes 2