org.apache.tapestry.markup
Class NestedMarkupWriterImpl

java.lang.Object
  extended byorg.apache.tapestry.markup.MarkupWriterImpl
      extended byorg.apache.tapestry.markup.NestedMarkupWriterImpl
All Implemented Interfaces:
IMarkupWriter, NestedMarkupWriter

public class NestedMarkupWriterImpl
extends MarkupWriterImpl
implements NestedMarkupWriter

Nested implementation of IMarkupWriter. Accumulates content in a CharArrayWriter, and prints the buffered content (raw) on close().

Since:
4.0
Author:
Howard M. Lewis Ship
See Also:
IMarkupWriter.getNestedWriter()

Constructor Summary
NestedMarkupWriterImpl(IMarkupWriter parent, MarkupFilter filter)
           
 
Method Summary
 void close()
          Closes the internal CharArrayWriter, then captures its content and invokes IMarkupWriter.printRaw(String) on the parent markup writer (the writer that created this writer).
 java.lang.String getBuffer()
          Returns any makrup so far accumulated by the nested markup writer.
 
Methods inherited from class org.apache.tapestry.markup.MarkupWriterImpl
attribute, attribute, attribute, attribute, attributeRaw, begin, beginEmpty, checkError, closeTag, comment, end, end, flush, getContentType, getNestedWriter, print, print, print, print, print, print, println, printRaw, printRaw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IMarkupWriter
attribute, attribute, attribute, attributeRaw, begin, beginEmpty, checkError, closeTag, comment, end, end, flush, getContentType, getNestedWriter, print, print, print, print, print, print, println, printRaw, printRaw
 

Constructor Detail

NestedMarkupWriterImpl

public NestedMarkupWriterImpl(IMarkupWriter parent,
                              MarkupFilter filter)
Method Detail

getBuffer

public java.lang.String getBuffer()
Description copied from interface: NestedMarkupWriter
Returns any makrup so far accumulated by the nested markup writer. When the nested markup writer is closed, it invokes IMarkupWriter.printRaw(String), with this content, on its parent markup writer.

Getting the buffer will close the writer.

Specified by:
getBuffer in interface NestedMarkupWriter

close

public void close()
Closes the internal CharArrayWriter, then captures its content and invokes IMarkupWriter.printRaw(String) on the parent markup writer (the writer that created this writer).

Specified by:
close in interface IMarkupWriter
Overrides:
close in class MarkupWriterImpl