ignore comment lines in CSV files
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.lucares.pdbui;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -18,9 +19,10 @@ public class CsvReaderSettings {
|
||||
|
||||
private String timeColumn;
|
||||
|
||||
private byte comment = '#';
|
||||
|
||||
public CsvReaderSettings() {
|
||||
separator = ',';
|
||||
timeColumn = "@timestamp";
|
||||
this("@timestamp", (byte) ',', Collections.emptyList());
|
||||
}
|
||||
|
||||
private CsvReaderSettings(final String timeColumn, final byte separator, final Collection<String> ignoreColumns) {
|
||||
@@ -65,6 +67,14 @@ public class CsvReaderSettings {
|
||||
this.separator = separator;
|
||||
}
|
||||
|
||||
public byte getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(final byte comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public Set<String> getIgnoreColumnNames() {
|
||||
return ignoreColumnNames;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user