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
public 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
public 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
public 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
public 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
public void addSeparator(WorkbookStyle textStyle) throws IOException
ExportWriter
addSeparator
in class ExportWriter
textStyle
- the style to use, overwrites any previous/defaultIOException
public void newLine() throws IOException
ExportWriter
newLine
in class ExportWriter
IOException
public void close() throws IOException, FileNotFoundException
ExportWriter
close
in class ExportWriter
IOException
FileNotFoundException
public void increaseDepth()
ExportWriter
increaseDepth
in class ExportWriter
public void decreseDepth()
ExportWriter
decreseDepth
in class ExportWriter
Copyright © 2014. All rights reserved.