public abstract class AbstractTokenizer extends Object implements ITokenizer
Tokenizer
, but want to define your own implementation of ITokenizer.readColumns(List)
.Constructor and Description |
---|
AbstractTokenizer(Reader reader,
CsvPreference preferences)
Constructs a new AbstractTokenizer, which reads the CSV file, line by line.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying reader.
|
int |
getLineNumber()
Gets the line number currently being tokenized (the first line is line 1).
|
protected CsvPreference |
getPreferences()
Gets the CSV preferences.
|
protected String |
readLine()
Reads a line of text.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUntokenizedRow, readColumns
public AbstractTokenizer(Reader reader, CsvPreference preferences)
reader
- the readerpreferences
- the CSV preferencesNullPointerException
- if reader or preferences is nullpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public int getLineNumber()
ITokenizer.readColumns(List)
hasn't been called yetgetLineNumber
in interface ITokenizer
protected String readLine() throws IOException
IOException
- If an I/O error occursprotected CsvPreference getPreferences()
Copyright © 2007–2015 Super CSV. All rights reserved.