public static class CsvReadOptions.Builder extends Object
Constructor and Description |
---|
Builder(File file) |
Builder(InputStream stream)
This method may cause tablesaw to buffer the entire InputStream.
|
Builder(Reader reader)
This method may cause tablesaw to buffer the entire InputStream.
|
Modifier and Type | Method and Description |
---|---|
CsvReadOptions |
build() |
CsvReadOptions.Builder |
columnTypes(ColumnType[] columnTypes) |
CsvReadOptions.Builder |
dateFormat(String dateFormat) |
CsvReadOptions.Builder |
dateTimeFormat(String dateTimeFormat) |
CsvReadOptions.Builder |
header(boolean header) |
CsvReadOptions.Builder |
lineEnding(String lineEnding) |
CsvReadOptions.Builder |
locale(Locale locale) |
CsvReadOptions.Builder |
maxNumberOfColumns(Integer maxNumberOfColumns)
Defines maximal value of columns in csv file.
|
CsvReadOptions.Builder |
missingValueIndicator(String missingValueIndicator) |
CsvReadOptions.Builder |
sample(boolean sample) |
CsvReadOptions.Builder |
separator(char separator) |
CsvReadOptions.Builder |
tableName(String tableName) |
CsvReadOptions.Builder |
timeFormat(String timeFormat) |
public Builder(File file)
public Builder(Reader reader)
If you have a large amount of data, you can do one of the following: 1. Use the method taking a File instead of a reader, or 2. Provide the array of column types as an option. If you provide the columnType array, we skip type detection and can avoid reading the entire file
public Builder(InputStream stream)
If you have a large amount of data, you can do one of the following: 1. Use the method taking a File instead of a stream, or 2. Provide the array of column types as an option. If you provide the columnType array, we skip type detection and can avoid reading the entire file
public CsvReadOptions.Builder tableName(String tableName)
public CsvReadOptions.Builder dateFormat(String dateFormat)
public CsvReadOptions.Builder timeFormat(String timeFormat)
public CsvReadOptions.Builder dateTimeFormat(String dateTimeFormat)
public CsvReadOptions.Builder header(boolean header)
public CsvReadOptions.Builder missingValueIndicator(String missingValueIndicator)
public CsvReadOptions.Builder separator(char separator)
public CsvReadOptions.Builder lineEnding(String lineEnding)
public CsvReadOptions.Builder sample(boolean sample)
public CsvReadOptions.Builder locale(Locale locale)
public CsvReadOptions.Builder columnTypes(ColumnType[] columnTypes)
public CsvReadOptions.Builder maxNumberOfColumns(Integer maxNumberOfColumns)
maxNumberOfColumns
- - must be positive integer. Default is 512. *public CsvReadOptions build()
Copyright © 2018. All rights reserved.