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 |
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
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
- Description copied from class:
MetaScanner
- Tries to switch to an encoding.
- Specified by:
tryCharset in class MetaScanner
- Returns:
true if successful
- Throws:
SAXException
Copyright © 2012. All Rights Reserved.