public class SimpleFileWriter extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
static String |
SEPARATOR
The separator for exported files.
|
Constructor and Description |
---|
SimpleFileWriter(File file,
boolean gz)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(String text,
boolean newLine)
Writes some text.
|
void |
write(String text,
boolean newLine,
boolean secondNewLine)
Writes some text.
|
void |
writeLine(String... elements)
Writes a new line using the give elements.
|
void |
writeLine(String line)
Writes a new line.
|
public static final String SEPARATOR
public SimpleFileWriter(File file, boolean gz)
file
- the file to write togz
- boolean indicating whether the output should be gzippedpublic void writeLine(String... elements)
elements
- line elementspublic void writeLine(String line)
line
- the line to writepublic void write(String text, boolean newLine)
text
- the text to writenewLine
- boolean indicating whether an end of line should be
appendedpublic void write(String text, boolean newLine, boolean secondNewLine)
text
- the text to writenewLine
- boolean indicating whether an end of line should be
appendedsecondNewLine
- boolean indicating whether a second new line should
be appendedpublic void close()
close
in interface AutoCloseable
Copyright © 2019. All rights reserved.