FileDocCategorySizeDatePackage
TSVContentTester.javaAPI DocExample1233Sun Dec 12 10:55:52 GMT 2004None

TSVContentTester

public class TSVContentTester extends Object

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

  
    
    // If you uncomment these lines, then you don't have to 
    // set the java.content.handler.pkgs property from the
    // command line or your properties files.

/*    String pkgs = System.getProperty("java.content.handler.pkgs", "");
    if (!pkgs.equals("")) {
      pkgs = pkgs + "|";
    }
    pkgs += "com.macfaq.net.www.content";      
    System.setProperty("java.content.handler.pkgs", pkgs);  */  

    for (int i = 0; i < args.length; i++) {
      try {
        URL u = new URL(args[i]);
        test(u);
      }
      catch (MalformedURLException ex) {
        System.err.println(args[i] + " is not a good URL"); 
      }
      catch (Exception ex) {
        ex.printStackTrace();
      }
    }
  
private static voidtest(java.net.URL u)

  
    Object content = u.getContent();
    Vector v = (Vector) content;
    for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
      String[] sa = (String[]) e.nextElement();
      for (int i = 0; i < sa.length; i++) {
        System.out.print(sa[i] + "\t");
      }
      System.out.println();
    }