fi.iki.hsivonen.htmlparser
Class CharacterEncodingDeclarationFilter

java.lang.Object
  extended by fi.iki.hsivonen.xml.ContentHandlerFilter
      extended by fi.iki.hsivonen.htmlparser.CharacterEncodingDeclarationFilter
All Implemented Interfaces:
ContentHandler

public final class CharacterEncodingDeclarationFilter
extends ContentHandlerFilter

Version:
$Id: CharacterEncodingDeclarationFilter.java,v 1.5 2006/11/14 22:32:44 hsivonen Exp $
Author:
hsivonen

Field Summary
private static Pattern CONTENT_PATTERN
           
private static Pattern CONTENT_TYPE_PATTERN
           
private static int DOC_STARTED
           
private static int HEAD_OPEN
           
private static int HTML_OPEN
           
private  HtmlParser parser
           
private static int SITUATION_OVER
           
private  int state
           
private  boolean swallowEnd
           
private static String XHTML_NS
           
 
Fields inherited from class fi.iki.hsivonen.xml.ContentHandlerFilter
contentHandler, errorHandler, locator
 
Constructor Summary
CharacterEncodingDeclarationFilter(HtmlParser parser)
           
 
Method Summary
 void endElement(String uri, String local, String qName)
           
 void startDocument()
           
 void startElement(String uri, String local, String qName, Attributes attrs)
           
 
Methods inherited from class fi.iki.hsivonen.xml.ContentHandlerFilter
characters, endDocument, endPrefixMapping, err, fatal, getContentHandler, getErrorHandler, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, setErrorHandler, skippedEntity, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XHTML_NS

private static final String XHTML_NS
See Also:
Constant Field Values

DOC_STARTED

private static final int DOC_STARTED
See Also:
Constant Field Values

HTML_OPEN

private static final int HTML_OPEN
See Also:
Constant Field Values

HEAD_OPEN

private static final int HEAD_OPEN
See Also:
Constant Field Values

SITUATION_OVER

private static final int SITUATION_OVER
See Also:
Constant Field Values

CONTENT_TYPE_PATTERN

private static final Pattern CONTENT_TYPE_PATTERN

CONTENT_PATTERN

private static final Pattern CONTENT_PATTERN

state

private int state

parser

private HtmlParser parser

swallowEnd

private boolean swallowEnd
Constructor Detail

CharacterEncodingDeclarationFilter

public CharacterEncodingDeclarationFilter(HtmlParser parser)
Parameters:
parser -
Method Detail

endElement

public void endElement(String uri,
                       String local,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class ContentHandlerFilter
Throws:
SAXException
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class ContentHandlerFilter
Throws:
SAXException
See Also:
ContentHandler.startDocument()

startElement

public void startElement(String uri,
                         String local,
                         String qName,
                         Attributes attrs)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class ContentHandlerFilter
Throws:
SAXException
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)