public abstract class AbstractTokenizer extends java.lang.Object implements ITokenizer
Tokenizer
, but want to define your own implementation of ITokenizer.readColumns(List)
.Constructor and Description |
---|
AbstractTokenizer(java.io.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 java.lang.String |
readLine()
Reads a line of text.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUntokenizedRow, readColumns
public AbstractTokenizer(java.io.Reader reader, CsvPreference preferences)
reader
- the readerpreferences
- the CSV preferencesjava.lang.NullPointerException
- if reader or preferences is nullpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public int getLineNumber()
ITokenizer.readColumns(List)
hasn't been called yetgetLineNumber
in interface ITokenizer
protected java.lang.String readLine() throws java.io.IOException
java.io.IOException
- If an I/O error occursprotected CsvPreference getPreferences()
Copyright © 2007-2014 Super CSV. All Rights Reserved.