public class DataWriter extends PrettyPrintingXmlWriter
| Constructor and Description |
|---|
DataWriter(OutputStream output)
Creates a data writer instance using UTF-8 encoding.
|
DataWriter(OutputStream output,
String encoding)
Creates a data writer instance.
|
DataWriter(Writer output,
String encoding)
Creates a data writer instance using the specified writer.
|
| Modifier and Type | Method and Description |
|---|---|
ConverterConfiguration |
getConverterConfiguration()
Returns the converter configuration of this data reader.
|
protected void |
throwException(Exception baseEx)
Rethrows the given exception, wrapped in a
DdlUtilsXMLException. |
void |
write(Collection beans)
Writes the beans contained in the given collection.
|
void |
write(Iterator beans)
Writes the beans contained in the given iterator.
|
void |
write(SqlDynaBean bean)
Writes the given bean.
|
void |
writeDocumentEnd()
Writes the end of the XML document, including the end of the outermost
XML element (
data). |
void |
writeDocumentStart()
Writes the start of the XML document, including the start of the outermost
XML element (
data). |
getEncoding, indentIfPrettyPrinting, isPrettyPrinting, printlnIfPrettyPrinting, setDefaultNamespace, setPrettyPrinting, writeAttribute, writeCData, writeCharacters, writeElementEnd, writeElementStart, writeNamespacepublic DataWriter(OutputStream output) throws DataWriterException
output - The target to write the data XML toDataWriterExceptionpublic DataWriter(OutputStream output, String encoding) throws DataWriterException
output - The target to write the data XML toencoding - The encoding of the XML fileDataWriterExceptionpublic DataWriter(Writer output, String encoding) throws DataWriterException
output - The target to write the data XML toencoding - The encoding of the writerDataWriterExceptionprotected void throwException(Exception baseEx) throws DdlUtilsXMLException
DdlUtilsXMLException. This
method allows subclasses to throw their own subclasses of this exception.throwException in class PrettyPrintingXmlWriterbaseEx - The original exceptionDdlUtilsXMLException - The wrapped exceptionpublic ConverterConfiguration getConverterConfiguration()
public void writeDocumentStart()
throws DdlUtilsXMLException
data).writeDocumentStart in class PrettyPrintingXmlWriterDdlUtilsXMLExceptionpublic void writeDocumentEnd()
throws DdlUtilsXMLException
data).writeDocumentEnd in class PrettyPrintingXmlWriterDdlUtilsXMLExceptionpublic void write(SqlDynaBean bean) throws DataWriterException
bean - The bean to writeDataWriterExceptionpublic void write(Iterator beans) throws DataWriterException
beans - The beans iteratorDataWriterExceptionpublic void write(Collection beans) throws DataWriterException
beans - The beansDataWriterExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.