|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.AbstractMarkupWriter org.apache.tapestry.html.HTMLWriter
public class HTMLWriter
This class is used to create HTML output.
The HTMLWriter
handles the necessary escaping
of invalid characters.
Specifically, the '<', '>' and '&' characters are properly
converted to their HTML entities by the print()
methods.
Similar measures are taken by the AbstractMarkupWriter.attribute(String, String)
method.
Other invalid characters are converted to their numeric entity equivalent.
Constructor Summary | |
---|---|
|
HTMLWriter(OutputStream outputStream)
Creates a default writer for content type "text/html; charset=utf-8". |
|
HTMLWriter(OutputStream outputStream,
String encoding)
|
|
HTMLWriter(PrintWriter writer)
Creates a new markup writer around the PrintWriter . |
protected |
HTMLWriter(String contentType)
|
|
HTMLWriter(String contentType,
OutputStream outputStream)
|
|
HTMLWriter(String contentType,
String encoding,
OutputStream outputStream)
|
Method Summary | |
---|---|
IMarkupWriter |
getNestedWriter()
Returns a nested writer, one that accumulates its changes in a buffer. |
Methods inherited from class org.apache.tapestry.AbstractMarkupWriter |
---|
attribute, attribute, attribute, attributeRaw, begin, beginEmpty, checkError, close, closeTag, comment, end, end, flush, getContentType, pop, print, print, print, print, println, printRaw, printRaw, push, setOutputStream, setWriter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HTMLWriter(PrintWriter writer)
PrintWriter
.
The writer will not be closed when the markup writer closes.
The content type is currently hard-wired to
text/html
.
public HTMLWriter(String contentType, OutputStream outputStream)
public HTMLWriter(String contentType, String encoding, OutputStream outputStream)
protected HTMLWriter(String contentType)
public HTMLWriter(OutputStream outputStream)
public HTMLWriter(OutputStream outputStream, String encoding)
Method Detail |
---|
public IMarkupWriter getNestedWriter()
IMarkupWriter
IMarkupWriter
.
getNestedWriter
in interface IMarkupWriter
getNestedWriter
in class AbstractMarkupWriter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |