URLConnection.setContentHandlerFactory(new TabFactory());
for (int i = 0; i < args.length; i++) {
try {
URL u = new URL(args[i]);
Object content = u.getContent();
Vector v = (Vector) content;
for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
String[] sa = (String[]) e.nextElement();
for (int j = 0; j < sa.length; j++) {
System.out.print(sa[j] + "\t");
}
System.out.println();
}
}
catch (MalformedURLException e) {
System.err.println(args[i] + " is not a good URL");
}
catch (Exception e) {
e.printStackTrace();
}
}