//
import java.io.IOException;
import java.net.*;
public class ContenuURL {  

  public static void afficheInfos(URLConnection u)
    {// affiche l'URL et les infos s'y rattachant
     System.out.println(u.getURL().toExternalForm() + ":");
     System.out.println("Contenu :"+ u.getContentType());
     System.out.println("Longueur :"+ u.getContentLength());
    } 

  static public void main(String[] args)
  throws MalformedURLException, IOException
   {if (args.length==0) return;
    URL url=new URL(args[0]);
    URLConnection connection=url.openConnection();
    afficheInfos(connection);
   }
}