com.opensymphony.module.sitemesh.parser
Class TokenizedHTMLPage

java.lang.Object
  extended by com.opensymphony.module.sitemesh.parser.AbstractPage
      extended by com.opensymphony.module.sitemesh.parser.AbstractHTMLPage
          extended by com.opensymphony.module.sitemesh.parser.TokenizedHTMLPage
All Implemented Interfaces:
PageBuilder, HTMLPage, Page

public class TokenizedHTMLPage
extends AbstractHTMLPage
implements PageBuilder

HTMLPage implementation that builds itself based on the incoming 'tag' and 'text' tokens fed to it from the HTMLTagTokenizer.

Author:
Joe Walnes
See Also:
HTMLPageParser, TagTokenizer

Field Summary
private  CharArray body
           
private  CharArray head
           
 
Fields inherited from class com.opensymphony.module.sitemesh.parser.AbstractPage
pageData
 
Constructor Summary
TokenizedHTMLPage(char[] original, CharArray body, CharArray head)
           
 
Method Summary
 java.lang.String getBody()
          Convenience method to return the contents of the <body> tag.
 java.lang.String getHead()
          Convenience method to return the contents of the <head> tag as a String.
 java.lang.String getPage()
          Convenience method to return the contents of the Page in its original format.
 void writeBody(java.io.Writer out)
          Write data of html <body> tag.
 void writeHead(java.io.Writer out)
          Write data of html <head> tag.
 
Methods inherited from class com.opensymphony.module.sitemesh.parser.AbstractHTMLPage
isFrameSet, setFrameSet
 
Methods inherited from class com.opensymphony.module.sitemesh.parser.AbstractPage
addProperty, getBooleanProperty, getContentLength, getIntProperty, getLongProperty, getProperties, getProperty, getPropertyKeys, getRequest, getTitle, isPropertySet, noNull, setRequest, writePage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.opensymphony.module.sitemesh.html.rules.PageBuilder
addProperty
 
Methods inherited from interface com.opensymphony.module.sitemesh.Page
addProperty, getBooleanProperty, getContentLength, getIntProperty, getLongProperty, getProperties, getProperty, getPropertyKeys, getRequest, getTitle, isPropertySet, setRequest, writePage
 

Field Detail

body

private CharArray body

head

private CharArray head
Constructor Detail

TokenizedHTMLPage

public TokenizedHTMLPage(char[] original,
                         CharArray body,
                         CharArray head)
Method Detail

writeHead

public void writeHead(java.io.Writer out)
               throws java.io.IOException
Description copied from class: AbstractHTMLPage
Write data of html <head> tag.

Must be implemented. Data written should not actually contain the head tags, but all the data in between.

Specified by:
writeHead in interface HTMLPage
Specified by:
writeHead in class AbstractHTMLPage
Throws:
java.io.IOException

writeBody

public void writeBody(java.io.Writer out)
               throws java.io.IOException
Description copied from class: AbstractPage
Write data of html <body> tag.

Must be implemented. Data written should not actually contain the body tags, but all the data in between.

Specified by:
writeBody in interface Page
Specified by:
writeBody in class AbstractPage
Throws:
java.io.IOException

getHead

public java.lang.String getHead()
Description copied from interface: HTMLPage
Convenience method to return the contents of the <head> tag as a String.

Specified by:
getHead in interface HTMLPage
See Also:
HTMLPage.writeHead(java.io.Writer)

getBody

public java.lang.String getBody()
Description copied from interface: Page
Convenience method to return the contents of the <body> tag.

Specified by:
getBody in interface Page
Overrides:
getBody in class AbstractPage
See Also:
Page.writeBody(java.io.Writer)

getPage

public java.lang.String getPage()
Description copied from interface: Page
Convenience method to return the contents of the Page in its original format.

Specified by:
getPage in interface Page
Overrides:
getPage in class AbstractPage
See Also:
Page.writePage(java.io.Writer)

www.opensymphony.com/sitemesh/