public class MetaSniffer extends MetaScanner implements org.xml.sax.Locator
readable, stateSave| Constructor and Description |
|---|
MetaSniffer(org.xml.sax.ErrorHandler eh,
org.xml.sax.Locator locator) |
| Modifier and Type | Method and Description |
|---|---|
int |
getColumnNumber() |
int |
getLineNumber() |
java.lang.String |
getPublicId() |
java.lang.String |
getSystemId() |
protected int |
read()
-1 means end.
|
Encoding |
sniff(ByteReadable readable)
Main loop.
|
protected boolean |
tryCharset(java.lang.String encoding)
Tries to switch to an encoding.
|
stateLooppublic MetaSniffer(org.xml.sax.ErrorHandler eh,
org.xml.sax.Locator locator)
protected int read()
throws java.io.IOException
read in class MetaScannerjava.io.IOExceptionpublic Encoding sniff(ByteReadable readable) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOExceptionpublic int getColumnNumber()
getColumnNumber in interface org.xml.sax.Locatorpublic int getLineNumber()
getLineNumber in interface org.xml.sax.Locatorpublic java.lang.String getPublicId()
getPublicId in interface org.xml.sax.Locatorpublic java.lang.String getSystemId()
getSystemId in interface org.xml.sax.Locatorprotected boolean tryCharset(java.lang.String encoding)
throws org.xml.sax.SAXException
MetaScannertryCharset in class MetaScannertrue if successfulorg.xml.sax.SAXException