|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.generationjava.io.xml.DelegatingXmlWriter
com.generationjava.io.xml.FormattingXmlWriter
public class FormattingXmlWriter
Formats Numbers and Dates on the fly.
| Constructor Summary | |
|---|---|
FormattingXmlWriter(XmlWriter writer)
|
|
| Method Summary | |
|---|---|
protected String |
format(Object unknown)
|
FormattingXmlWriter |
setDateFormat(DateFormat format)
When a java.util.Date object is written, it will use this to format it. |
FormattingXmlWriter |
setNumberFormat(NumberFormat format)
When a Number object is written, it will use this to format it. |
XmlWriter |
writeAttribute(String name,
Object value)
Write an attribute out for the current entity. |
XmlWriter |
writeEntityWithText(String name,
Object text)
A helper method. |
XmlWriter |
writeText(Object text)
Output body text. |
| Methods inherited from class com.generationjava.io.xml.DelegatingXmlWriter |
|---|
close, endEntity, getWriter, writeCData, writeComment, writeEmptyEntity, writeEntity, writeXmlVersion, writeXmlVersion, writeXmlVersion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormattingXmlWriter(XmlWriter writer)
| Method Detail |
|---|
public FormattingXmlWriter setNumberFormat(NumberFormat format)
public FormattingXmlWriter setDateFormat(DateFormat format)
public XmlWriter writeEntityWithText(String name,
Object text)
throws IOException
DelegatingXmlWriter
writeEntityWithText in interface XmlWriterwriteEntityWithText in class DelegatingXmlWritername - String name of tagtext - String of text to go inside the tag
IOException
public XmlWriter writeText(Object text)
throws IOException
DelegatingXmlWriter
writeText in interface XmlWriterwriteText in class DelegatingXmlWriterIOException
public XmlWriter writeAttribute(String name,
Object value)
throws IOException
DelegatingXmlWriter
writeAttribute in interface XmlWriterwriteAttribute in class DelegatingXmlWriterIOExceptionprotected String format(Object unknown)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||