|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.module.sitemesh.parser.FastPageParser
public final class FastPageParser
Very fast PageParser implementation for parsing HTML.
Produces FastPage.
Nested Class Summary | |
---|---|
private class |
FastPageParser.Tag
Deprecated. |
Field Summary | |
---|---|
private static int |
BODY_HASH
Deprecated. |
private static int |
CONTENT_HASH
Deprecated. |
private static int |
FRAME_HASH
Deprecated. |
private static int |
FRAMESET_HASH
Deprecated. |
private static int |
HEAD_HASH
Deprecated. |
private static int |
HTML_HASH
Deprecated. |
private static int |
META_HASH
Deprecated. |
private static int |
PARAMETER_HASH
Deprecated. |
private static int |
SLASH_BODY_HASH
Deprecated. |
private static int |
SLASH_HEAD_HASH
Deprecated. |
private static int |
SLASH_HTML_HASH
Deprecated. |
private static int |
SLASH_TITLE_HASH
Deprecated. |
private static int |
SLASH_XML_HASH
Deprecated. |
private static int |
SLASH_XMP_HASH
Deprecated. |
private static int |
STATE_CDATA
Deprecated. |
private static int |
STATE_COMMENT
Deprecated. |
private static int |
STATE_DOCTYPE
Deprecated. |
private static int |
STATE_EOF
Deprecated. |
private static int |
STATE_SCRIPT
Deprecated. |
private static int |
STATE_TAG
Deprecated. |
private static int |
STATE_TAG_QUOTE
Deprecated. |
private static int |
STATE_TEXT
Deprecated. |
private static int |
TAG_STATE_BODY
Deprecated. |
private static int |
TAG_STATE_HEAD
Deprecated. |
private static int |
TAG_STATE_HTML
Deprecated. |
private static int |
TAG_STATE_NONE
Deprecated. |
private static int |
TAG_STATE_TITLE
Deprecated. |
private static int |
TAG_STATE_XML
Deprecated. |
private static int |
TAG_STATE_XMP
Deprecated. |
private static int |
TITLE_HASH
Deprecated. |
private static int |
TOKEN_CDATA
Deprecated. |
private static int |
TOKEN_COMMENT
Deprecated. |
private static int |
TOKEN_DOCTYPE
Deprecated. |
private static int |
TOKEN_EMPTYTAG
Deprecated. |
private static int |
TOKEN_EOF
Deprecated. |
private static int |
TOKEN_NONE
Deprecated. |
private static int |
TOKEN_SCRIPT
Deprecated. |
private static int |
TOKEN_TAG
Deprecated. |
private static int |
TOKEN_TEXT
Deprecated. |
private static int |
XML_HASH
Deprecated. |
private static int |
XMP_HASH
Deprecated. |
Constructor Summary | |
---|---|
FastPageParser()
Deprecated. |
Method Summary | |
---|---|
private FastPage |
internalParse(Reader reader)
Deprecated. |
Page |
parse(char[] data)
Deprecated. This builds a Page. |
Page |
parse(Reader reader)
Deprecated. |
private static FastPageParser.Tag |
parseProperties(FastPageParser.Tag tag,
CharArray buffer)
Deprecated. This is called when we need to extract the properties for the tag from the tag's HTML. |
private FastPageParser.Tag |
parseTag(FastPageParser.Tag tag,
CharArray buf)
Deprecated. Populates a FastPageParser.Tag object using data from the supplied CharArray . |
private static boolean |
shouldWriteToHead(int state,
int laststate)
Deprecated. |
private static void |
writeTag(int state,
int laststate,
boolean hide,
CharArray _head,
CharArray _buffer,
CharArray _body)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int TOKEN_NONE
private static final int TOKEN_EOF
private static final int TOKEN_TEXT
private static final int TOKEN_TAG
private static final int TOKEN_COMMENT
private static final int TOKEN_CDATA
private static final int TOKEN_SCRIPT
private static final int TOKEN_DOCTYPE
private static final int TOKEN_EMPTYTAG
private static final int STATE_EOF
private static final int STATE_TEXT
private static final int STATE_TAG
private static final int STATE_COMMENT
private static final int STATE_TAG_QUOTE
private static final int STATE_CDATA
private static final int STATE_SCRIPT
private static final int STATE_DOCTYPE
private static final int TAG_STATE_NONE
private static final int TAG_STATE_HTML
private static final int TAG_STATE_HEAD
private static final int TAG_STATE_TITLE
private static final int TAG_STATE_BODY
private static final int TAG_STATE_XML
private static final int TAG_STATE_XMP
private static final int SLASH_XML_HASH
private static final int XML_HASH
private static final int SLASH_XMP_HASH
private static final int XMP_HASH
private static final int HTML_HASH
private static final int SLASH_HTML_HASH
private static final int HEAD_HASH
private static final int TITLE_HASH
private static final int SLASH_TITLE_HASH
private static final int PARAMETER_HASH
private static final int META_HASH
private static final int SLASH_HEAD_HASH
private static final int FRAMESET_HASH
private static final int FRAME_HASH
private static final int BODY_HASH
private static final int SLASH_BODY_HASH
private static final int CONTENT_HASH
Constructor Detail |
---|
public FastPageParser()
Method Detail |
---|
public Page parse(char[] data) throws IOException
PageParser
parse
in interface PageParser
IOException
public Page parse(Reader reader)
private FastPage internalParse(Reader reader)
private static void writeTag(int state, int laststate, boolean hide, CharArray _head, CharArray _buffer, CharArray _body)
private static boolean shouldWriteToHead(int state, int laststate)
private FastPageParser.Tag parseTag(FastPageParser.Tag tag, CharArray buf)
FastPageParser.Tag
object using data from the supplied CharArray
.
The supplied tag parameter is reset and reused - this avoids excess object
creation which hwlps performance.
private static FastPageParser.Tag parseProperties(FastPageParser.Tag tag, CharArray buffer)
tag
- the tag that is currently being processed. This should be the
tag that was returned as a result of a call to parseTag(FastPageParser.Tag, CharArray)
(ie, it has the name and nameEndIdx fields set correctly for the
tag in question. The properties field can be in an undefined state - it
will get replaced regardless).buffer
- a CharArray containing the entire tag that is being parsed.
|
www.opensymphony.com/sitemesh/ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |