Package nu.validator.htmlparser.io
Class MetaSniffer
java.lang.Object
nu.validator.htmlparser.impl.MetaScanner
nu.validator.htmlparser.io.MetaSniffer
- All Implemented Interfaces:
Locator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Encodingprivate intprivate final ErrorHandlerprivate intprivate final Locatorprivate booleanFields inherited from class nu.validator.htmlparser.impl.MetaScanner
readable, stateSave -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidintintprotected intread()-1 means end.sniff(ByteReadable readable) Main loop.protected booleantryCharset(String encoding) Tries to switch to an encoding.private voidMethods inherited from class nu.validator.htmlparser.impl.MetaScanner
stateLoop
-
Field Details
-
characterEncoding
-
errorHandler
-
locator
-
line
private int line -
col
private int col -
prevWasCR
private boolean prevWasCR
-
-
Constructor Details
-
MetaSniffer
-
-
Method Details
-
read
-1 means end.- Overrides:
readin classMetaScanner- Returns:
- Throws:
IOException
-
sniff
Main loop.- Returns:
- Throws:
SAXExceptionIOException
-
err
- Parameters:
string-- Throws:
SAXException
-
warn
- Parameters:
string-- Throws:
SAXException
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumberin interfaceLocator
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceLocator
-
getPublicId
- Specified by:
getPublicIdin interfaceLocator
-
getSystemId
- Specified by:
getSystemIdin interfaceLocator
-
tryCharset
Description copied from class:MetaScannerTries to switch to an encoding.- Specified by:
tryCharsetin classMetaScanner- Parameters:
encoding-- Returns:
trueif successful- Throws:
SAXException
-