URLGetObject.java

import java.net.*;
import java.io.*;
public class URLGetObject {
  public static void main(String[] args) {
    try {
      URL urlHttp = new URL("http://www.univ-mlv.fr/images/ens.jpg");
      System.out.println("Création de l'URL : " + urlHttp);
      System.out.println(urlHttp.getContent());
    } catch (IOException e) { e.printStackTrace(); }
  }
}