public class PartialPageParser extends java.lang.Object implements PageParser
Modifier and Type | Class and Description |
---|---|
static class |
PartialPageParser.ContentTagSimpleMap |
static class |
PartialPageParser.HashSimpleMap |
static class |
PartialPageParser.MetaTagSimpleMap |
static interface |
PartialPageParser.SimpleMap |
Constructor and Description |
---|
PartialPageParser() |
Modifier and Type | Method and Description |
---|---|
private static boolean |
compareLowerCase(char[] data,
int dataEnd,
int position,
java.lang.String token) |
private static int |
findEndOf(char[] data,
int dataEnd,
int position,
java.lang.String token) |
private static int |
findStartOf(char[] data,
int dataEnd,
int position,
java.lang.String token) |
Page |
parse(char[] buffer)
Parse the given buffer into a Page object.
|
Page |
parse(SitemeshBuffer buffer)
Parse the given buffer into a page object.
|
private Page |
parseHtmlPage(SitemeshBuffer buffer,
int position) |
private static int |
parseProperties(char[] data,
int dataEnd,
int position,
PartialPageParser.SimpleMap map)
Parse the properties of the current tag
|
public Page parse(char[] buffer) throws java.io.IOException
PageParser
parse
in interface PageParser
buffer
- The buffer for the page.java.io.IOException
- if an error occurspublic Page parse(SitemeshBuffer buffer) throws java.io.IOException
PageParser
DefaultSitemeshBuffer
is the appropriate implementation of
this interface to pass in.parse
in interface PageParser
buffer
- The buffer for the page.java.io.IOException
- if an error occursprivate Page parseHtmlPage(SitemeshBuffer buffer, int position)
private static boolean compareLowerCase(char[] data, int dataEnd, int position, java.lang.String token)
private static int findEndOf(char[] data, int dataEnd, int position, java.lang.String token)
private static int findStartOf(char[] data, int dataEnd, int position, java.lang.String token)
private static int parseProperties(char[] data, int dataEnd, int position, PartialPageParser.SimpleMap map)
data
- the datadataEnd
- the end index of the dataposition
- our position in the data, this should be the first character after the tag namemap
- to the map to parse the properties into