Closeable
, AutoCloseable
, CharSequence
CsvScanner
public abstract class AbstractCsvScanner<T> extends Scanner<T>
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractCsvScanner(Reader r) |
Creates a "standard" CSV reader (separator is comma and quoted mode active)
|
protected |
AbstractCsvScanner(Reader r,
char sep,
boolean quoted) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
atEndOfRow() |
Returns `true` when the most recent field has been terminated by a newline (not a separator).
|
int |
column() |
Returns current column (first column is 1).
|
protected void |
init(Reader r) |
|
int |
lineno() |
Returns current line number
|
protected abstract T |
newToken(char[] data,
int start,
int end) |
|
void |
reset(Reader r) |
Reuse this scanner with a new content.
|
char |
setCommentMarker(char comment) |
Sets the character marking the start of a line comment.
|
void |
setSkipEmptyLines(boolean skipEmptyLines) |
|
void |
setTrim(boolean trim) |
Trims spaces (only on not-quoted fields).
|
void |
skipRows(int n) |
Skips `n` rows
|
chars, codePoints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
advance, atEndOfFile, charAt, close, length, peek, position, scan, setSplitFunc, subSequence, token, toString
protected AbstractCsvScanner(@WillCloseWhenClosed @Nonnull Reader r)
protected AbstractCsvScanner(@WillCloseWhenClosed @Nonnull Reader r, char sep, boolean quoted)
public final void reset(@WillCloseWhenClosed @Nonnull Reader r) throws IOException
Scanner
reset
in class Scanner<T>
IOException
protected abstract T newToken(@Nonnull char[] data, @Nonnegative int start, @Nonnegative int end)
@Nonnegative public int lineno()
@Nonnegative public int column()
public boolean atEndOfRow()
public void skipRows(@Nonnegative int n) throws IOException
IOException
public char setCommentMarker(char comment)
public void setTrim(boolean trim)
public void setSkipEmptyLines(boolean skipEmptyLines)
Copyright © 2018. All rights reserved.