Class CsvTools
java.lang.Object
com.illumon.iris.db.tables.utils.csv.CsvTools
public class CsvTools extends Object
-
Constructor Summary
Constructors Constructor Description CsvTools()
-
Method Summary
Modifier and Type Method Description static Table
readCsv(InputStream stream, String format, boolean v2, StatusCallback progress, boolean noHeader, Collection<String> header)
Creates an in-memory table fromstream
by importing CSV data according to thespecs
.
-
Constructor Details
-
CsvTools
public CsvTools()
-
-
Method Details
-
readCsv
public static Table readCsv(InputStream stream, String format, boolean v2, StatusCallback progress, boolean noHeader, @Nullable Collection<String> header) throws IOExceptionCreates an in-memory table fromstream
by importing CSV data according to thespecs
. Thestream
will be closed upon return.- Parameters:
stream
- an InputStream providing access to the CSV data.format
- can be null a delimiter or one of DEFAULT, TDF, EXCEL, MYSQL, RFC4180 and TRIMv2
- whether the process imports using the older QueryTable processing (v2 = true) or the newer InMemoryTable processing (v2 = false).progress
- a StatusCallback object that can be used to log progress details or update a progress bar. If passed explicitly as null, a StatusCallback instance will be created to log progress to the current logger.noHeader
- boolean indicates if data contains headerheader
- Column names to use as, or instead of, the header row for the CSV.- Returns:
- a Deephaven Table object
- Throws:
IOException
-