public class CSVFile extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected Writer |
out
The output writer
|
protected boolean |
quoteAll
quote all components
|
protected boolean |
quoteNever
never quote
|
protected String |
separator
Holds the separator
|
| Constructor and Description |
|---|
CSVFile(File f) |
CSVFile(File f,
boolean append) |
CSVFile(File f,
boolean append,
List<String> columns) |
CSVFile(File f,
boolean append,
String... columns) |
CSVFile(File f,
boolean append,
String separator,
List<String> columns) |
CSVFile(File f,
List<String> columns) |
CSVFile(File f,
String... columns) |
CSVFile(String f) |
CSVFile(String f,
boolean append) |
CSVFile(String f,
boolean append,
List<String> columns) |
CSVFile(String f,
boolean append,
String... columns) |
CSVFile(String f,
List<String> columns) |
CSVFile(String f,
String... columns) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the file
|
protected String |
column(Object c)
Formats an entry
|
static void |
main(String[] args)
Test method
|
void |
neverQuote(boolean q)
Sets quoting on/off (off by default)
|
void |
setQuoting(boolean q)
Sets optional quoting on/off (off by default)
|
void |
write(List<? extends Object> columns)
Writes the columns to the file
|
void |
write(Object... columns)
Writes the columns to the file
|
protected Writer out
protected String separator
protected boolean quoteAll
protected boolean quoteNever
public CSVFile(File f, boolean append, String separator, List<String> columns) throws IOException
IOExceptionpublic CSVFile(File f, boolean append, List<String> columns) throws IOException
IOExceptionpublic CSVFile(File f, boolean append, String... columns) throws IOException
IOExceptionpublic CSVFile(File f, boolean append) throws IOException
IOExceptionpublic CSVFile(String f, boolean append) throws IOException
IOExceptionpublic CSVFile(File f) throws IOException
IOExceptionpublic CSVFile(String f) throws IOException
IOExceptionpublic CSVFile(String f, boolean append, List<String> columns) throws IOException
IOExceptionpublic CSVFile(String f, boolean append, String... columns) throws IOException
IOExceptionpublic CSVFile(String f, List<String> columns) throws IOException
IOExceptionpublic CSVFile(String f, String... columns) throws IOException
IOExceptionpublic CSVFile(File f, List<String> columns) throws IOException
IOExceptionpublic CSVFile(File f, String... columns) throws IOException
IOExceptionpublic void setQuoting(boolean q)
public void neverQuote(boolean q)
public void write(List<? extends Object> columns) throws IOException
IOExceptionpublic void write(Object... columns) throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2018. All rights reserved.