URl url new URL("http", "www.monsite.com","monchemin/mapage.html"); BufferedInputStream in=new BufferedInputStream(url.openStream()); // boucle de lecture du flux
url = new URL("http", "www.meteo.fr", "meteonet/vigilance/index.html"); BufferedInputStream in = new BufferedInputStream(url.openStream()); //taille du buffer. A changer pour trouver la meilleure performance byte[] bytes=new byte[512]; int nb=0; while((nb=in.read(bytes))!=-1){ System.out.println(new String(bytes, 0, nb)); } in.close();
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionJEditorPane editorPane = new JEditorPane(new URL("http", "intranet.mi", "/outils/index.htm"));