Clover Coverage Report
Coverage timestamp: Fri May 9 2008 10:54:27 EST
../../../../../img/srcFileCovDistChart0.png 86% of files have more coverage
496   736   193   12.1
196   668   0.39   10.25
41     4.71  
4    
 
  HTMLParser       Line # 7 493 190 0% 0.0
  HTMLParser.MyPipedInputStream       Line # 28 3 3 0% 0.0
  HTMLParser.LookaheadSuccess       Line # 571 0 0 - -1.0
  HTMLParser.JJCalls       Line # 721 0 0 - -1.0
 
No Tests
 
1    /* Generated By:JavaCC: Do not edit this line. HTMLParser.java */
2    package org.apache.lucene.demo.html;
3   
4    import java.io.*;
5    import java.util.Properties;
6   
 
7    public class HTMLParser implements HTMLParserConstants {
8    public static int SUMMARY_LENGTH = 200;
9   
10    StringBuffer title = new StringBuffer(SUMMARY_LENGTH);
11    StringBuffer summary = new StringBuffer(SUMMARY_LENGTH * 2);
12    Properties metaTags=new Properties();
13    String currentMetaTag=null;
14    String currentMetaContent=null;
15    int length = 0;
16    boolean titleComplete = false;
17    boolean inTitle = false;
18    boolean inMetaTag = false;
19    boolean inStyle = false;
20    boolean afterTag = false;
21    boolean afterSpace = false;
22    String eol = System.getProperty("line.separator");
23    Reader pipeIn = null;
24    Writer pipeOut;
25    private MyPipedInputStream pipeInStream = null;
26    private PipedOutputStream pipeOutStream = null;
27   
 
28    private class MyPipedInputStream extends PipedInputStream{
29   
 
30  0 toggle public MyPipedInputStream(){
31  0 super();
32    }
33   
 
34  0 toggle public MyPipedInputStream(PipedOutputStream src) throws IOException{
35  0 super(src);
36    }
37   
 
38  0 toggle public boolean full() throws IOException{
39  0 return this.available() >= PipedInputStream.PIPE_SIZE;
40    }
41    }
42   
43    /**
44    * @deprecated Use HTMLParser(FileInputStream) instead
45    */
 
46  0 toggle public HTMLParser(File file) throws FileNotFoundException {
47  0 this(new FileInputStream(file));
48    }
49   
 
50  0 toggle public String getTitle() throws IOException, InterruptedException {
51  0 if (pipeIn == null)
52  0 getReader(); // spawn parsing thread
53  0 while (true) {
54  0 synchronized(this) {
55  0 if (titleComplete || pipeInStream.full())
56  0 break;
57  0 wait(10);
58    }
59    }
60  0 return title.toString().trim();
61    }
62   
 
63  0 toggle public Properties getMetaTags() throws IOException,
64    InterruptedException {
65  0 if (pipeIn == null)
66  0 getReader(); // spawn parsing thread
67  0 while (true) {
68  0 synchronized(this) {
69  0 if (titleComplete || pipeInStream.full())
70  0 break;
71  0 wait(10);
72    }
73    }
74  0 return metaTags;
75    }
76   
77   
 
78  0 toggle public String getSummary() throws IOException, InterruptedException {
79  0 if (pipeIn == null)
80  0 getReader(); // spawn parsing thread
81  0 while (true) {
82  0 synchronized(this) {
83  0 if (summary.length() >= SUMMARY_LENGTH || pipeInStream.full())
84  0 break;
85  0 wait(10);
86    }