org.apache.tapestry.wml
Class WMLWriter
java.lang.Object
|
+--org.apache.tapestry.AbstractMarkupWriter
|
+--org.apache.tapestry.wml.WMLWriter
- All Implemented Interfaces:
- IMarkupWriter
- Direct Known Subclasses:
- NestedWMLWriter
- public class WMLWriter
- extends AbstractMarkupWriter
This class is used to create WML output.
The WMLResponseWriter
handles the necessary escaping
of invalid characters.
Specifically, the '$', '<', '>' and '&' characters are properly
converted to their WML 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.
This class makes it easy to generate trivial and non-trivial WML pages.
It is also useful to generate WML snippets. It's ability to do simple
formatting is very useful. A JSP may create an instance of the class
and use it as an alternative to the simple-minded <%= ... %>
construct, espcially because it can handle null more cleanly.
- Since:
- 0.2.9
- Version:
- $Id: WMLWriter.java,v 1.3 2003/04/21 13:15:31 glongman Exp $
- Author:
- David Solis
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, setWriter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WMLWriter
public WMLWriter(OutputStream stream)
- Creates a response writer for content type "text/vnd.wap.wml".
WMLWriter
public WMLWriter(String contentType,
OutputStream stream)
WMLWriter
protected WMLWriter(String contentType)
getNestedWriter
public IMarkupWriter getNestedWriter()
- Description copied from interface:
IMarkupWriter
- Returns a nested writer, one that accumulates its changes in a
buffer. When the nested writer is closed, it writes its
buffer into its containing
IMarkupWriter
.
- Specified by:
getNestedWriter
in interface IMarkupWriter
- Specified by:
getNestedWriter
in class AbstractMarkupWriter