public class TextWriter extends ExportWriter
exportFormat, lastFolderKey| Constructor and Description |
|---|
TextWriter(File destinationFile,
String separator,
int nSeparationLines)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSeparator(WorkbookStyle textStyle)
Adds a separator.
|
void |
close()
Writes the content in cache and closes the connection to the file.
|
void |
decreseDepth()
Notifies the writer that data of a lower hierarchical depth will be
written, e.g.
|
void |
increaseDepth()
Notifies the writer that data of a higher hierarchical depth will be
written, e.g.
|
void |
newLine()
Adds a separator.
|
void |
startNewSection(String sectionTitle,
WorkbookStyle textStyle)
Starts a new section.
|
void |
write(String text,
WorkbookStyle textStyle)
Writes text to the export.
|
void |
writeHeaderText(String text,
WorkbookStyle textStyle)
Writes header text to the export.
|
void |
writeMainTitle(String text,
WorkbookStyle textStyle)
Writes the main title.
|
addSeparator, getExportFormat, getExportWriter, startNewSection, startNewSection, write, writeHeaderText, writeMainTitlepublic TextWriter(File destinationFile, String separator, int nSeparationLines) throws IOException
destinationFile - the file where to write the reportseparator - separator between two valuesnSeparationLines - the number of lines to include between two
sectionsIOException - if an IOException occurspublic void write(String text, WorkbookStyle textStyle) throws IOException
ExportWriterwrite in class ExportWritertext - the text to writetextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void writeMainTitle(String text, WorkbookStyle textStyle) throws IOException
ExportWriterwriteMainTitle in class ExportWritertext - the text to writetextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void startNewSection(String sectionTitle, WorkbookStyle textStyle) throws IOException
ExportWriterstartNewSection in class ExportWritersectionTitle - the text to writetextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void writeHeaderText(String text, WorkbookStyle textStyle) throws IOException
ExportWriterwriteHeaderText in class ExportWritertext - the text to writetextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void addSeparator(WorkbookStyle textStyle) throws IOException
ExportWriteraddSeparator in class ExportWritertextStyle - the style to use, overwrites any previous/defaultIOException - if an IOException occurspublic void newLine()
throws IOException
ExportWriternewLine in class ExportWriterIOException - if an IOException occurspublic void close()
throws IOException,
FileNotFoundException
ExportWriterclose in class ExportWriterIOException - if an IOException occursFileNotFoundException - if a FileNotFoundException occurspublic void increaseDepth()
ExportWriterincreaseDepth in class ExportWriterpublic void decreseDepth()
ExportWriterdecreseDepth in class ExportWriterCopyright © 2016. All rights reserved.