Package nu.validator.htmlparser.impl
Class MetaScanner
- java.lang.Object
-
- nu.validator.htmlparser.impl.MetaScanner
-
- Direct Known Subclasses:
MetaSniffer
public abstract class MetaScanner extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ByteReadable
readable
The data source.protected int
stateSave
The tokenizer state.
-
Constructor Summary
Constructors Constructor Description MetaScanner()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
read()
Reads a byte from the data source.protected void
stateLoop(int state)
The runs the meta scanning algorithm.protected abstract boolean
tryCharset(java.lang.String encoding)
Tries to switch to an encoding.
-
-
-
Field Detail
-
readable
protected ByteReadable readable
The data source.
-
stateSave
protected int stateSave
The tokenizer state.
-
-
Method Detail
-
read
protected int read() throws java.io.IOException
Reads a byte from the data source. -1 means end.- Returns:
- Throws:
java.io.IOException
-
stateLoop
protected final void stateLoop(int state) throws org.xml.sax.SAXException, java.io.IOException
The runs the meta scanning algorithm.- Throws:
org.xml.sax.SAXException
java.io.IOException
-
tryCharset
protected abstract boolean tryCharset(java.lang.String encoding) throws org.xml.sax.SAXException
Tries to switch to an encoding.- Parameters:
encoding
-- Returns:
true
if successful- Throws:
org.xml.sax.SAXException
-
-