Package com.sforce.ws.parser
Class XmlOutputStream
- java.lang.Object
-
- com.sforce.ws.parser.XmlOutputStream
-
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
AsyncXmlOutputStream
public class XmlOutputStream extends Object implements AutoCloseable
This 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(OutputStream out, boolean prettyPrint)XmlOutputStream(OutputStream out, String prettyPrintIndentation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidendDocument()voidflush()StringgetPrefix(String namespace)WritergetWriter()voidsetPrefix(String prefix, String namespace)voidstartDocument()voidwriteAttribute(String namespace, String name, String value)voidwriteComment(String text)voidwriteEndTag(String namespace, String name)voidwriteStartTag(String namespace, String name)voidwriteStringElement(String namespace, String name, String content)voidwriteText(String text)
-
-
-
Constructor Detail
-
XmlOutputStream
public XmlOutputStream(OutputStream out, boolean prettyPrint) throws IOException
- Throws:
IOException
-
XmlOutputStream
public XmlOutputStream(OutputStream out, String prettyPrintIndentation) throws IOException
- Throws:
IOException
-
-
Method Detail
-
startDocument
public void startDocument() throws IOException- Throws:
IOException
-
endDocument
public void endDocument() throws IOException- Throws:
IOException
-
setPrefix
public void setPrefix(String prefix, String namespace) throws IOException
- Throws:
IOException
-
writeStartTag
public void writeStartTag(String namespace, String name) throws IOException
- Throws:
IOException
-
writeEndTag
public void writeEndTag(String namespace, String name) throws IOException
- Throws:
IOException
-
writeStringElement
public void writeStringElement(String namespace, String name, String content) throws IOException
- Throws:
IOException
-
writeAttribute
public void writeAttribute(String namespace, String name, String value) throws IOException
- Throws:
IOException
-
writeText
public void writeText(String text) throws IOException
- Throws:
IOException
-
writeComment
public void writeComment(String text) throws IOException
- Throws:
IOException
-
getWriter
public Writer getWriter()
-
flush
public void flush() throws IOException- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
-