Package com.sforce.ws.parser
Class XmlOutputStream
- java.lang.Object
-
- com.sforce.ws.parser.XmlOutputStream
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
AsyncXmlOutputStream
public class XmlOutputStream extends java.lang.Object implements java.lang.AutoCloseableThis is a minimal XML output stream, that can be used to write XML.- Since:
- 1.0 Nov 30, 2005
- Version:
- 1.0
- Author:
- http://cheenath.com
-
-
Constructor Summary
Constructors Constructor Description XmlOutputStream(java.io.OutputStream out, boolean prettyPrint)XmlOutputStream(java.io.OutputStream out, java.lang.String prettyPrintIndentation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidendDocument()voidflush()java.lang.StringgetPrefix(java.lang.String namespace)java.io.WritergetWriter()voidsetPrefix(java.lang.String prefix, java.lang.String namespace)voidstartDocument()voidwriteAttribute(java.lang.String namespace, java.lang.String name, java.lang.String value)voidwriteComment(java.lang.String text)voidwriteEndTag(java.lang.String namespace, java.lang.String name)voidwriteStartTag(java.lang.String namespace, java.lang.String name)voidwriteStringElement(java.lang.String namespace, java.lang.String name, java.lang.String content)voidwriteText(java.lang.String text)
-
-
-
Constructor Detail
-
XmlOutputStream
public XmlOutputStream(java.io.OutputStream out, boolean prettyPrint) throws java.io.IOException- Throws:
java.io.IOException
-
XmlOutputStream
public XmlOutputStream(java.io.OutputStream out, java.lang.String prettyPrintIndentation) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
getPrefix
public java.lang.String getPrefix(java.lang.String namespace)
-
startDocument
public void startDocument() throws java.io.IOException- Throws:
java.io.IOException
-
endDocument
public void endDocument() throws java.io.IOException- Throws:
java.io.IOException
-
setPrefix
public void setPrefix(java.lang.String prefix, java.lang.String namespace) throws java.io.IOException- Throws:
java.io.IOException
-
writeStartTag
public void writeStartTag(java.lang.String namespace, java.lang.String name) throws java.io.IOException- Throws:
java.io.IOException
-
writeEndTag
public void writeEndTag(java.lang.String namespace, java.lang.String name) throws java.io.IOException- Throws:
java.io.IOException
-
writeStringElement
public void writeStringElement(java.lang.String namespace, java.lang.String name, java.lang.String content) throws java.io.IOException- Throws:
java.io.IOException
-
writeAttribute
public void writeAttribute(java.lang.String namespace, java.lang.String name, java.lang.String value) throws java.io.IOException- Throws:
java.io.IOException
-
writeText
public void writeText(java.lang.String text) throws java.io.IOException- Throws:
java.io.IOException
-
writeComment
public void writeComment(java.lang.String text) throws java.io.IOException- Throws:
java.io.IOException
-
getWriter
public java.io.Writer getWriter()
-
flush
public void flush() throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException
-
-