FileDocCategorySizeDatePackage
ReportTags.javaAPI DocExample1198Sun Dec 12 10:52:46 GMT 2004None

ReportTags

public class ReportTags extends HTMLEditorKit$ParserCallback

Fields Summary
int
count
Constructors Summary
Methods Summary
public voidflush()

    System.out.println(count); 
  
public voidhandleEndTag(javax.swing.text.html.HTML$Tag tag, int position)

    System.out.println(tag);
    count--;
    
  
public voidhandleSimpleTag(javax.swing.text.html.HTML$Tag tag, javax.swing.text.MutableAttributeSet attributes, int position)

    
    System.out.println(tag);
 
  
public voidhandleStartTag(javax.swing.text.html.HTML$Tag tag, javax.swing.text.MutableAttributeSet attributes, int position)


       
     
    System.out.println(tag);
    count++;
  
public static voidmain(java.lang.String[] args)

    
    ParserGetter kit = new ParserGetter();
    HTMLEditorKit.Parser parser = kit.getParser();
    HTMLEditorKit.ParserCallback callback 
     = new ReportTags();
    
    try {
      URL u = new URL(args[0]);
      InputStream in = u.openStream();
      InputStreamReader r = new InputStreamReader(in);
      parser.parse(r, callback, false);
    }
    catch (IOException e) {
      System.err.println(e); 
    }