|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnu.validator.htmlparser.impl.MetaSniffer
public final class MetaSniffer
Nested Class Summary | |
---|---|
private static class |
MetaSniffer.MetaState
|
private class |
MetaSniffer.StopSniffingException
|
Field Summary | |
---|---|
private StringBuilder |
attributeName
|
private StringBuilder |
attributeValue
|
private CharsetDecoder |
charsetDecoder
|
private int |
col
|
private static Pattern |
CONTENT
|
private ErrorHandler |
errorHandler
|
private int |
line
|
private Locator |
locator
|
private MetaSniffer.MetaState |
metaState
|
private boolean |
prevWasCR
|
private ByteReadable |
source
|
private int |
unread
|
Constructor Summary | |
---|---|
MetaSniffer(ByteReadable source,
ErrorHandler eh,
Locator locator)
|
Method Summary | |
---|---|
private boolean |
attribute()
The "get an attribute" subalgorithm. |
private void |
checkAttribute()
|
private void |
comment()
Seen < , ! , - |
private void |
consumeUntilAndIncludingGt()
|
private void |
endTag()
Seen < , / |
private void |
err(String message)
|
int |
getColumnNumber()
|
int |
getLineNumber()
|
String |
getPublicId()
|
String |
getSystemId()
|
private void |
markup()
< |
private void |
markupDecl()
Seen < , ! |
private void |
quotedAttribute(int delim)
|
private int |
read()
|
CharsetDecoder |
sniff()
Main loop. |
private void |
tag()
< , x |
private void |
tryCharset(String encoding)
|
private boolean |
unquotedAttribute()
|
private void |
unread(int b)
|
private void |
warn(String message)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Pattern CONTENT
private final ByteReadable source
private final ErrorHandler errorHandler
private CharsetDecoder charsetDecoder
private StringBuilder attributeName
private StringBuilder attributeValue
private MetaSniffer.MetaState metaState
private int unread
private int line
private int col
private boolean prevWasCR
private final Locator locator
Constructor Detail |
---|
public MetaSniffer(ByteReadable source, ErrorHandler eh, Locator locator)
source
- errorHandler
- publicId
- systemId
- Method Detail |
---|
private int read() throws IOException, MetaSniffer.StopSniffingException
IOException
MetaSniffer.StopSniffingException
private void unread(int b)
public CharsetDecoder sniff() throws SAXException, IOException
SAXException
IOException
private void markup() throws SAXException, MetaSniffer.StopSniffingException, IOException
SAXException
MetaSniffer.StopSniffingException
IOException
private void tag() throws SAXException, MetaSniffer.StopSniffingException, IOException
SAXException
MetaSniffer.StopSniffingException
IOException
private boolean attribute() throws SAXException, MetaSniffer.StopSniffingException, IOException
false
when to stop
SAXException
MetaSniffer.StopSniffingException
IOException
private boolean unquotedAttribute() throws SAXException, MetaSniffer.StopSniffingException, IOException
SAXException
MetaSniffer.StopSniffingException
IOException
private void checkAttribute() throws SAXException, MetaSniffer.StopSniffingException
SAXException
MetaSniffer.StopSniffingException
private void tryCharset(String encoding) throws SAXException, MetaSniffer.StopSniffingException
SAXException
MetaSniffer.StopSniffingException
private void err(String message) throws SAXException
string
-
SAXException
private void warn(String message) throws SAXException
string
-
SAXException
private void quotedAttribute(int delim) throws SAXException, MetaSniffer.StopSniffingException, IOException
SAXException
MetaSniffer.StopSniffingException
IOException
private void consumeUntilAndIncludingGt() throws IOException, MetaSniffer.StopSniffingException
IOException
MetaSniffer.StopSniffingException
private void endTag() throws SAXException, MetaSniffer.StopSniffingException, IOException
SAXException
MetaSniffer.StopSniffingException
IOException
private void markupDecl() throws IOException, MetaSniffer.StopSniffingException
IOException
MetaSniffer.StopSniffingException
private void comment() throws IOException, MetaSniffer.StopSniffingException
IOException
MetaSniffer.StopSniffingException
public int getColumnNumber()
getColumnNumber
in interface Locator
public int getLineNumber()
getLineNumber
in interface Locator
public String getPublicId()
getPublicId
in interface Locator
public String getSystemId()
getSystemId
in interface Locator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |