[Htmlparser-user] parser termination callback
Brought to you by:
derrickoswald
From: Joe L. <gu...@ya...> - 2003-03-11 00:55:24
|
Hi, I wrote a visitor and register with the Parser. Basically I was paersing a web page and dump the result to a file. I close the FileOutputStream in my visitEndTag as such: public void visitEndTag(EndTag endTag) { if ( endTag.getTagName().equalsIgnoreCase("HTML") ) { //flus and close the file outputstream } } However, my program is getting the IOException saying that the outputstream is closed while I was still trying to write to it. I then realize that my "if" statement in the visitEndTagis not a correct signal for determining that the parser is done parsing. Can anyone please help me find out if there's any way that I can know the parser is finished parsing? Thanks. Joe __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ |