| Constructor and Description |
|---|
DelimitedWriter(char delimiter,
Writer writer)
Creates the writer with a column delimiter and the
Writer to
which to write. |
DelimitedWriter(char delimiter,
Writer writer,
String lineSeparator)
Creates the writer with a column delimiter, the
Writer to which
to write, and a line separator string. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the
Writer. |
void |
flush()
Calls the provided
Writer's Writer.flush() method. |
void |
newLine()
Writes the provided line separator string (or the default).
|
void |
write(String column)
Writes a column, inserting a delimiter as needed.
|
public DelimitedWriter(char delimiter,
Writer writer)
Writer to
which to write. Uses the system line separator string.delimiter - a delimiter character.writer - a Writer.public DelimitedWriter(char delimiter,
Writer writer,
String lineSeparator)
Writer to which
to write, and a line separator string.delimiter - a delimiter character.writer - a Writer. Should not be null.lineSeparator - a line separator string. If null, the
system line separator string is used.public void write(String column) throws IOException
column - the column contents.IOException - if an error occurs writing to the Writer.public void newLine()
throws IOException
IOException - if an error occurs writing to the Writer.public void close()
throws IOException
Writer.close in interface Closeableclose in interface AutoCloseableIOException - if an error occurs closing the Writer.public void flush()
throws IOException
Writer's Writer.flush() method.flush in interface FlushableIOException - if an error occurs flushing the Writer.Copyright © 2012–2016 Emory University. All rights reserved.