public class ImpExCSVExportWriter extends ImpExExportWriter
CSVWriter for exporting items.| Constructor and Description |
|---|
ImpExCSVExportWriter(CSVWriter writer)
Instantiates a new exporter with given writer.
|
ImpExCSVExportWriter(CSVWriter writer,
SessionContext ctx)
Instantiates a new exporter with given writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close CSVWriter Stream.
|
void |
comment(java.lang.String text)
Writes a comment.
|
java.lang.Object |
getExportWriter()
Returns the general writer which is used for this export.
|
void |
newLine()
Write a newline.
|
void |
writeComment(java.lang.String scrline)
Writes the String
comment to the writer as a line comment. |
void |
writeCurrentHeader(boolean asComment)
Writes the the current header either as a comment, if
asComment is set to true, or as a
normal row if asComment is false. |
void |
writeLine(Item item)
Exports the Item into the underlying Writer using current header.
|
void |
writeSrcLine(java.lang.String scrline)
Writes the String
srcLine to the writer as a normal line. |
getAllAttributeValues, getAttributeValue, getColumnOffset, getCurrentHeader, getLanguage, setColumnOffset, setCurrentHeader, setCurrentHeader, setCurrentHeader, setCurrentHeaderpublic ImpExCSVExportWriter(CSVWriter writer)
writer - writer where the items will be exported topublic ImpExCSVExportWriter(CSVWriter writer, SessionContext ctx)
writer - writer where the items will be exported toctx - session context used for exportpublic void comment(java.lang.String text)
ImpExExportWritercomment in class ImpExExportWritertext - comment to writepublic void close()
close in class ImpExExportWriterpublic java.lang.Object getExportWriter()
ImpExExportWritergetExportWriter in class ImpExExportWriterpublic void newLine()
ImpExExportWriternewLine in class ImpExExportWriterpublic void writeCurrentHeader(boolean asComment)
throws ImpExException
ImpExExportWriterasComment is set to true, or as a
normal row if asComment is false. The columns are shifted according to the set column offset.writeCurrentHeader in class ImpExExportWriterImpExException - error while writingImpExExportWriter.setColumnOffset(int),
ImpExExportWriter.getColumnOffset()public void writeLine(Item item) throws ImpExException
ImpExExportWriterwriteLine in class ImpExExportWriteritem - Item to export.ImpExException - error while translating item to textpublic void writeComment(java.lang.String scrline)
throws java.io.IOException
ImpExExportWritercomment to the writer as a line comment.writeComment in class ImpExExportWriterscrline - the line to be written to the writerjava.io.IOException - if an error occurs while writingpublic void writeSrcLine(java.lang.String scrline)
throws java.io.IOException
ImpExExportWritersrcLine to the writer as a normal line.writeSrcLine in class ImpExExportWriterscrline - the line to be written to the writerjava.io.IOException - if an error occurs while writingCopyright © 2018 SAP SE. All Rights Reserved.