FileDocCategorySizeDatePackage
printMIMEHeader.javaAPI DocExample766Thu Apr 03 15:26:42 BST 1997None

printMIMEHeader

public class printMIMEHeader extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


    URL u;
    URLConnection uc;
    String header;

    for (int i=0; i < args.length; i++) {
      try {
        u = new URL(args[i]);
        uc = u.openConnection();
        for (int j = 1; ; j++) {
          header = uc.getHeaderField(j);
          if (header == null) break;
          System.out.println(uc.getHeaderFieldKey(j) + " " + header);
        }  // end for
      }  // end try
      catch (MalformedURLException e) {
        System.err.println(args[i] + " is not a URL I understand.");
      }
      catch (IOException e) {
        System.err.println(e);
      }
    }  // end for