Package nu.validator.htmlparser.impl
Class MetaScanner
java.lang.Object
nu.validator.htmlparser.impl.MetaScanner
- Direct Known Subclasses:
MetaSniffer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteReadable
The data source.protected int
The tokenizer state. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
read()
Reads a byte from the data source.protected final void
stateLoop
(int state) The runs the meta scanning algorithm.protected abstract boolean
tryCharset
(String encoding) Tries to switch to an encoding.
-
Field Details
-
readable
The data source. -
stateSave
protected int stateSaveThe tokenizer state.
-
-
Constructor Details
-
MetaScanner
public MetaScanner()
-
-
Method Details
-
read
Reads a byte from the data source. -1 means end.- Returns:
- Throws:
IOException
-
stateLoop
The runs the meta scanning algorithm.- Throws:
SAXException
IOException
-
tryCharset
Tries to switch to an encoding.- Parameters:
encoding
-- Returns:
true
if successful- Throws:
SAXException
-