@Status(stage=DEVELOPMENT, unitTests=PARTIAL) @Review(by="Kees Schotanus",at="2009-09-28") @Review(by="Kees Schotanus",at="2010-10-22",reason="Totally rewrote csv classes") public abstract class AbstractCsv extends Object
Modifier | Constructor and Description |
---|---|
protected |
AbstractCsv()
Default constructor that will use a comma as the column separator and the
platform's line.separator as a row separator.
|
|
AbstractCsv(Character columnSeparator)
Constructs this AbstractCsv that will use the supplied columnSeparator as
a column separator and the platform's line.separator as a row separator.
|
|
AbstractCsv(Character columnSeparator,
String rowSeparator)
Constructs this AbstractCsv that will use the supplied columnSeparator as
a column separator and the supplied rowSeparator as a row separator.
|
Modifier and Type | Method and Description |
---|---|
Character |
getColumnSeparator()
Gets the column separator.
|
abstract String[] |
getNextRow()
Gets the next row of columns.
|
String |
getRowSeparator()
Gets the row separator.
|
void |
setColumnSeparator(Character columnSeparator)
Sets the separator that will be used to separate the individual columns.
|
void |
setRowSeparator(String rowSeparator)
Sets the separator that will be used to separate the individual rows.
|
protected AbstractCsv()
public AbstractCsv(Character columnSeparator)
columnSeparator
- The separator that separates the different
columns.NullPointerException
- When the supplied columnSeparator is null.public AbstractCsv(Character columnSeparator, String rowSeparator)
columnSeparator
- The separator that separates the different
columns.rowSeparator
- The separator that separates the different rows.NullPointerException
- When either the supplied columnSeparator or
rowSeparator is null.public Character getColumnSeparator()
public void setColumnSeparator(Character columnSeparator)
columnSeparator
- The separator that will be used to separate the
individual columns.NullPointerException
- When the supplied columnSeparator is null.public String getRowSeparator()
public void setRowSeparator(String rowSeparator)
rowSeparator
- The separator that will be used to separate the rows.
NullPointerException
- When the supplied rowSeparator is null.public abstract String[] getNextRow()
CsvException
- When the next row could not be read or when this
method is called after it has returned null.Copyright © 2008–2018. All rights reserved.