public class DataWriter extends Object
| 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.
|
boolean |
isPrettyPrinting()
Determines whether the output shall be pretty-printed.
|
void |
setPrettyPrinting(boolean prettyPrinting)
Specifies whether the output shall be pretty-printed.
|
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, i.e.
|
void |
writeDocumentStart()
Writes the start of the XML document, i.e.
|
public 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 writerDataWriterExceptionpublic boolean isPrettyPrinting()
true if the output is pretty-printedpublic void setPrettyPrinting(boolean prettyPrinting)
prettyPrinting - true if the output is pretty-printedpublic ConverterConfiguration getConverterConfiguration()
public void writeDocumentStart()
throws DataWriterException
DataWriterExceptionpublic void writeDocumentEnd()
throws DataWriterException
DataWriterExceptionpublic 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 © 2005-2013 Apache Software Foundation. All Rights Reserved.