nu.validator.htmlparser.io
Class MetaSniffer
java.lang.Object
nu.validator.htmlparser.impl.MetaScanner
nu.validator.htmlparser.io.MetaSniffer
- All Implemented Interfaces:
- Locator
public class MetaSniffer
- extends MetaScanner
- implements Locator
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
characterEncoding
private Encoding characterEncoding
errorHandler
private final ErrorHandler errorHandler
locator
private final Locator locator
line
private int line
col
private int col
prevWasCR
private boolean prevWasCR
MetaSniffer
public MetaSniffer(ErrorHandler eh,
Locator locator)
read
protected int read()
throws IOException
- -1 means end.
- Overrides:
read in class MetaScanner
- Returns:
-
- Throws:
IOException
sniff
public Encoding sniff(ByteReadable readable)
throws SAXException,
IOException
- Main loop.
- Returns:
-
- Throws:
SAXException
IOException
err
private void err(String message)
throws SAXException
- Parameters:
string -
- Throws:
SAXException
warn
private void warn(String message)
throws SAXException
- Parameters:
string -
- Throws:
SAXException
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber in interface Locator
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber in interface Locator
getPublicId
public String getPublicId()
- Specified by:
getPublicId in interface Locator
getSystemId
public String getSystemId()
- Specified by:
getSystemId in interface Locator
tryCharset
protected boolean tryCharset(String encoding)
throws SAXException
- Specified by:
tryCharset in class MetaScanner
- Throws:
SAXException