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, writeMainTitle
public 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
ExportWriter
write
in class ExportWriter
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
- if an IOException occurspublic void writeMainTitle(String text, WorkbookStyle textStyle) throws IOException
ExportWriter
writeMainTitle
in class ExportWriter
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
- if an IOException occurspublic void startNewSection(String sectionTitle, WorkbookStyle textStyle) throws IOException
ExportWriter
startNewSection
in class ExportWriter
sectionTitle
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
- if an IOException occurspublic void writeHeaderText(String text, WorkbookStyle textStyle) throws IOException
ExportWriter
writeHeaderText
in class ExportWriter
text
- the text to writetextStyle
- the style to use, overwrites any previous/defaultIOException
- if an IOException occurspublic void addSeparator(WorkbookStyle textStyle) throws IOException
ExportWriter
addSeparator
in class ExportWriter
textStyle
- the style to use, overwrites any previous/defaultIOException
- if an IOException occurspublic void newLine() throws IOException
ExportWriter
newLine
in class ExportWriter
IOException
- if an IOException occurspublic void close() throws IOException, FileNotFoundException
ExportWriter
close
in class ExportWriter
IOException
- if an IOException occursFileNotFoundException
- if a FileNotFoundException occurspublic void increaseDepth()
ExportWriter
increaseDepth
in class ExportWriter
public void decreseDepth()
ExportWriter
decreseDepth
in class ExportWriter
Copyright © 2016. All rights reserved.