nu.validator.htmlparser.io
Class MetaSniffer
java.lang.Object
nu.validator.htmlparser.impl.MetaScanner
nu.validator.htmlparser.io.MetaSniffer
- All Implemented Interfaces:
- org.xml.sax.Locator
public class MetaSniffer
- extends MetaScanner
- implements org.xml.sax.Locator
|
Constructor Summary |
MetaSniffer(org.xml.sax.ErrorHandler eh,
org.xml.sax.Locator locator)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetaSniffer
public MetaSniffer(org.xml.sax.ErrorHandler eh,
org.xml.sax.Locator locator)
read
protected int read()
throws java.io.IOException
- -1 means end.
- Overrides:
read in class MetaScanner
- Returns:
-
- Throws:
java.io.IOException
sniff
public Encoding sniff(ByteReadable readable)
throws org.xml.sax.SAXException,
java.io.IOException
- Main loop.
- Returns:
-
- Throws:
org.xml.sax.SAXException
java.io.IOException
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber in interface org.xml.sax.Locator
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber in interface org.xml.sax.Locator
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId in interface org.xml.sax.Locator
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId in interface org.xml.sax.Locator
tryCharset
protected boolean tryCharset(java.lang.String encoding)
throws org.xml.sax.SAXException
- Description copied from class:
MetaScanner
- Tries to switch to an encoding.
- Specified by:
tryCharset in class MetaScanner
- Returns:
true if successful
- Throws:
org.xml.sax.SAXException