org.jvoicexml.xml
Class XmlStringWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.jvoicexml.xml.XmlWriter
          extended by org.jvoicexml.xml.XmlStringWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public final class XmlStringWriter
extends XmlWriter

XmlWriter that uses a string writer to write output.

Title: JVoceXML

Version:
$Revision: 1.3 $

Copyright © 2005 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Dirk Schnelle

Field Summary
 
Fields inherited from class org.jvoicexml.xml.XmlWriter
DEFAULT_BLOCK_INDENT, EOL
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
XmlStringWriter()
          Constructs an xml writer using a java.io.StringWriter that doesn't pretty-print output.
XmlStringWriter(int blockSpaces)
          Constructs an xml writer using a java.io.StringWriter that supports pretty-printing output with the given number of spaces for block indentation.
 
Method Summary
 String toString()
          Returns the string writer's buffer current value as a string.
 
Methods inherited from class org.jvoicexml.xml.XmlWriter
close, decIndentLevel, flush, getBlockSpaces, getIndentLevel, getWriter, incIndentLevel, isEntityDeclared, isPrettyOutput, printIndent, setBlockSpaces, setIndentLevel, write, write, write, write, write, writeAttribute, writeHeader
 
Methods inherited from class java.io.Writer
append, append, append
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlStringWriter

public XmlStringWriter()
Constructs an xml writer using a java.io.StringWriter that doesn't pretty-print output.

See Also:
StringWriter

XmlStringWriter

public XmlStringWriter(int blockSpaces)
Constructs an xml writer using a java.io.StringWriter that supports pretty-printing output with the given number of spaces for block indentation.

Parameters:
blockSpaces - Number of spaces for blocks, for use in pretty printing XML text.
See Also:
StringWriter
Method Detail

toString

public String toString()
Returns the string writer's buffer current value as a string. This is in general the current XML document.

Overrides:
toString in class Object
Returns:
a string representation of the object.


Copyright © 2005 JVoiceXML group.