public class CSVConfigGuesser extends Object
Modifier and Type | Field and Description |
---|---|
protected CSVConfig |
config
The found config
|
Constructor and Description |
---|
CSVConfigGuesser() |
CSVConfigGuesser(InputStream in) |
Modifier and Type | Method and Description |
---|---|
protected void |
analyseLines(String[] lines) |
protected InputStream |
getInputStream()
Allow override.
|
CSVConfig |
guess()
Guess the config based on the first 10 (or less when less available)
records of a CSV file.
|
protected void |
guessFieldSeperator(String[] lines) |
protected void |
guessFixedWidth(String[] lines)
Guess if this file is fixedwidth.
|
protected void |
guessFixedWidthSeperator(String[] lines) |
boolean |
hasFieldHeader() |
void |
setHasFieldHeader(boolean hasFieldHeader)
Specify if the CSV file has a field header
|
void |
setInputStream(InputStream in) |
protected CSVConfig config
public CSVConfigGuesser()
public CSVConfigGuesser(InputStream in)
in
- the inputstream to guess frompublic void setInputStream(InputStream in)
protected InputStream getInputStream()
public CSVConfig guess()
protected void analyseLines(String[] lines)
protected void guessFixedWidth(String[] lines)
lines
- protected void guessFieldSeperator(String[] lines)
protected void guessFixedWidthSeperator(String[] lines)
public boolean hasFieldHeader()
public void setHasFieldHeader(boolean hasFieldHeader)
hasFieldHeader
- true or false