|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object olg.csv.base.IgnoreNullWriter
public class IgnoreNullWriter
A "Proxy" writer which Provides a mecanism to skip empty row.
Field Summary | |
---|---|
private static org.slf4j.Logger |
LOGGER
the class logger. |
private int |
nextRowNum
num of the next row to write. |
private IWriter |
writer
the original writer. |
Constructor Summary | |
---|---|
IgnoreNullWriter(IWriter writer)
|
Method Summary | |
---|---|
void |
addLine(String[] values)
Write a row only if not empty. |
void |
addRow(Row row)
writes a row only if not empty. |
void |
close()
Close the original writer. |
private boolean |
isValid(Row row)
Check if a row is not null and not empty. |
private boolean |
isValid(String[] values)
Check if a row is not null and not empty. |
boolean |
isWithHeaders()
Indicates if the file has a headers line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.slf4j.Logger LOGGER
private final IWriter writer
private int nextRowNum
Constructor Detail |
---|
public IgnoreNullWriter(IWriter writer)
writer
- a concret readerMethod Detail |
---|
public void close()
close
in interface Closeable
public void addRow(Row row)
addRow
in interface IWriter
row
- the row.public void addLine(String[] values)
addLine
in interface IWriter
values
- the row.public boolean isWithHeaders()
IWriter
isWithHeaders
in interface IWriter
private boolean isValid(Row row)
row
- the row
private boolean isValid(String[] values)
values
- the row
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |