|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jacoco.report.csv.DelimitedWriter
public class DelimitedWriter
Helper class for writing out CSV or tab delimited files.
Example Usage:
delimitedWriter.writeFields("header1", "header2", ...); for each line to be written { delimitedWriter.writeField(value1); delimitedWriter.writeField(value2); delimitedWriter.nextLine(); } delimitedWriter.close();
Constructor Summary | |
---|---|
DelimitedWriter(Writer delegate)
Creates a new Delimited writer using the default delimiter |
|
DelimitedWriter(Writer delegate,
char delimiter)
Creates a new Delimited writer using the default delimiter |
Method Summary | |
---|---|
void |
close()
Close the underlying writer object. |
void |
nextLine()
Output a new line and advance the writer to the next line. |
void |
write(int... values)
Write muliple integer values |
void |
write(int value)
Write a single integer value. |
void |
write(String... fields)
Write multiple fields at once. |
void |
write(String field)
Write a single value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelimitedWriter(Writer delegate)
delegate
- Writer to delegate all writes topublic DelimitedWriter(Writer delegate, char delimiter)
delegate
- Writer to delegate all writes todelimiter
- delimiter to use (usually a comma, tab or space)Method Detail |
---|
public void write(String... fields) throws IOException
fields
- Values to write
IOException
- Error writing to the underlying writer objectpublic void write(String field) throws IOException
field
- Value to write
IOException
- Error writing to the underlying writer objectpublic void write(int value) throws IOException
value
- Value to write
IOException
- Error writing to the underlying writer objectpublic void write(int... values) throws IOException
values
- values to write
IOException
- Error writing to the underlying writer objectpublic void nextLine() throws IOException
IOException
- Error writing to the underlying writer objectpublic void close() throws IOException
IOException
- Error closing the underlying writer object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |