Package nu.validator.htmlparser.impl
Class MetaScanner
java.lang.Object
nu.validator.htmlparser.impl.MetaScanner
- Direct Known Subclasses:
MetaSniffer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteReadableThe data source.protected intThe tokenizer state. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intread()Reads a byte from the data source.protected final voidstateLoop(int state) The runs the meta scanning algorithm.protected abstract booleantryCharset(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:
SAXExceptionIOException
-
tryCharset
Tries to switch to an encoding.- Parameters:
encoding-- Returns:
trueif successful- Throws:
SAXException
-