com.quiotix.html.example
Class DumpLinks

java.lang.Object
  extended by com.quiotix.html.parser.HtmlVisitor
      extended by com.quiotix.html.example.DumpLinks

public class DumpLinks
extends HtmlVisitor

Example visitor to dump out the links from an HTML document.

Author:
Brian Goetz, Quiotix

Field Summary
protected  PrintWriter out
           
 
Constructor Summary
DumpLinks(OutputStream os)
          Constructor.
DumpLinks(OutputStream os, String encoding)
          Constructor.
 
Method Summary
 void finish()
          Finish.
static void main(String[] args)
          Runnable.
 void visit(HtmlDocument.Tag t)
          Visit a Tag.
 
Methods inherited from class com.quiotix.html.parser.HtmlVisitor
start, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected PrintWriter out
Constructor Detail

DumpLinks

public DumpLinks(OutputStream os)
Constructor.

Parameters:
os - OutputStream to dump to

DumpLinks

public DumpLinks(OutputStream os,
                 String encoding)
          throws UnsupportedEncodingException
Constructor.

Parameters:
os - OutputStream to dump to
Throws:
UnsupportedEncodingException
Method Detail

finish

public void finish()
Description copied from class: HtmlVisitor
Finish.

Overrides:
finish in class HtmlVisitor

visit

public void visit(HtmlDocument.Tag t)
Description copied from class: HtmlVisitor
Visit a Tag.

Overrides:
visit in class HtmlVisitor

main

public static void main(String[] args)
                 throws ParseException,
                        IOException
Runnable.

Throws:
ParseException
IOException


Copyright © 1999-2011 Quiotix. All Rights Reserved.