public final class CSVUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static Function<String,String[]> |
CSV_HEADER_PARSER |
static Function<String,String[]> |
CSV_HEADER_PARSER_BY_SPLITTER |
static BiConsumer<String[],String> |
CSV_LINE_PARSER |
static BiConsumer<String[],String> |
CSV_LINE_PARSER_BY_SPLITTER |
| Constructor and Description |
|---|
CSVUtil() |
| Modifier and Type | Method and Description |
|---|---|
static DataSet |
loadCSV(Class<?> entityClass,
File csvFile) |
static DataSet |
loadCSV(Class<?> entityClass,
File csvFile,
Collection<String> selectColumnNames) |
static DataSet |
loadCSV(Class<?> entityClass,
File csvFile,
Collection<String> selectColumnNames,
long offset,
long count) |
static <E extends Exception> |
loadCSV(Class<?> entityClass,
File csvFile,
Collection<String> selectColumnNames,
long offset,
long count,
Throwables.Predicate<String[],E> filter)
Load the data from CSV.
|
static DataSet |
loadCSV(Class<?> entityClass,
InputStream csvInputStream) |
static DataSet |
loadCSV(Class<?> entityClass,
InputStream csvInputStream,
Collection<String> selectColumnNames) |
static DataSet |
loadCSV(Class<?> entityClass,
InputStream csvInputStream,
Collection<String> selectColumnNames,
long offset,
long count) |
static <E extends Exception> |
loadCSV(Class<?> entityClass,
InputStream csvInputStream,
Collection<String> selectColumnNames,
long offset,
long count,
Throwables.Predicate<String[],E> filter)
Load the data from CSV.
|
static DataSet |
loadCSV(Class<?> entityClass,
Reader csvReader) |
static DataSet |
loadCSV(Class<?> entityClass,
Reader csvReader,
Collection<String> selectColumnNames) |
static DataSet |
loadCSV(Class<?> entityClass,
Reader csvReader,
Collection<String> selectColumnNames,
long offset,
long count) |
static <E extends Exception> |
loadCSV(Class<?> entityClass,
Reader csvReader,
Collection<String> selectColumnNames,
long offset,
long count,
Throwables.Predicate<String[],E> filter)
Load the data from CSV.
|
static DataSet |
loadCSV(File csvFile) |
static DataSet |
loadCSV(File csvFile,
Collection<String> selectColumnNames) |
static DataSet |
loadCSV(File csvFile,
Collection<String> selectColumnNames,
long offset,
long count) |
static <E extends Exception> |
loadCSV(File csvFile,
Collection<String> selectColumnNames,
long offset,
long count,
Throwables.Predicate<String[],E> filter)
Load the data from CSV.
|
static DataSet |
loadCSV(File csvFile,
List<? extends com.landawn.abacus.type.Type> columnTypeList) |
static DataSet |
loadCSV(File csvFile,
long offset,
long count,
List<? extends com.landawn.abacus.type.Type> columnTypeList) |
static DataSet |
loadCSV(File csvFile,
long offset,
long count,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) |
static <E extends Exception> |
loadCSV(File csvFile,
long offset,
long count,
Throwables.Predicate<String[],E> filter,
List<? extends com.landawn.abacus.type.Type> columnTypeList)
Load the data from CSV.
|
static <E extends Exception> |
loadCSV(File csvFile,
long offset,
long count,
Throwables.Predicate<String[],E> filter,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap)
Load the data from CSV.
|
static DataSet |
loadCSV(File csvFile,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) |
static DataSet |
loadCSV(InputStream csvInputStream) |
static DataSet |
loadCSV(InputStream csvInputStream,
Collection<String> selectColumnNames) |
static DataSet |
loadCSV(InputStream csvInputStream,
Collection<String> selectColumnNames,
long offset,
long count) |
static <E extends Exception> |
loadCSV(InputStream csvInputStream,
Collection<String> selectColumnNames,
long offset,
long count,
Throwables.Predicate<String[],E> filter)
Load the data from CSV.
|
static DataSet |
loadCSV(InputStream csvInputStream,
List<? extends com.landawn.abacus.type.Type> columnTypeList) |
static DataSet |
loadCSV(InputStream csvInputStream,
long offset,
long count,
List<? extends com.landawn.abacus.type.Type> columnTypeList) |
static DataSet |
loadCSV(InputStream csvInputStream,
long offset,
long count,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) |
static <E extends Exception> |
loadCSV(InputStream csvInputStream,
long offset,
long count,
Throwables.Predicate<String[],E> filter,
List<? extends com.landawn.abacus.type.Type> columnTypeList)
Load the data from CSV.
|
static <E extends Exception> |
loadCSV(InputStream csvInputStream,
long offset,
long count,
Throwables.Predicate<String[],E> filter,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap)
Load the data from CSV.
|
static DataSet |
loadCSV(InputStream csvInputStream,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) |
static DataSet |
loadCSV(Reader csvReader) |
static DataSet |
loadCSV(Reader csvReader,
Collection<String> selectColumnNames) |
static DataSet |
loadCSV(Reader csvReader,
Collection<String> selectColumnNames,
long offset,
long count) |
static <E extends Exception> |
loadCSV(Reader csvReader,
Collection<String> selectColumnNames,
long offset,
long count,
Throwables.Predicate<String[],E> filter)
Load the data from CSV.
|
static DataSet |
loadCSV(Reader csvReader,
List<? extends com.landawn.abacus.type.Type> columnTypeList) |
static DataSet |
loadCSV(Reader csvReader,
long offset,
long count,
List<? extends com.landawn.abacus.type.Type> columnTypeList) |
static DataSet |
loadCSV(Reader csvReader,
long offset,
long count,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) |
static <E extends Exception> |
loadCSV(Reader csvReader,
long offset,
long count,
Throwables.Predicate<String[],E> filter,
List<? extends com.landawn.abacus.type.Type> columnTypeList)
Load the data from CSV.
|
static <E extends Exception> |
loadCSV(Reader csvReader,
long offset,
long count,
Throwables.Predicate<String[],E> filter,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap)
Load the data from CSV.
|
static DataSet |
loadCSV(Reader csvReader,
Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) |
static void |
resetCSVHeaderParser() |
static void |
resetCSVLineParser() |
static void |
setCSVHeaderParser(Function<String,String[]> parser) |
static void |
setCSVLineParser(BiConsumer<String[],String> parser) |
public static final Function<String,String[]> CSV_HEADER_PARSER_BY_SPLITTER
public static final BiConsumer<String[],String> CSV_LINE_PARSER_BY_SPLITTER
public static final BiConsumer<String[],String> CSV_LINE_PARSER
public static void setCSVLineParser(BiConsumer<String[],String> parser)
public static void resetCSVHeaderParser()
public static void resetCSVLineParser()
public static DataSet loadCSV(File csvFile) throws UncheckedIOException
csvFile - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(File csvFile, Collection<String> selectColumnNames) throws UncheckedIOException
csvFile - selectColumnNames - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(File csvFile, Collection<String> selectColumnNames, long offset, long count) throws UncheckedIOException
csvFile - selectColumnNames - offset - count - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(File csvFile, Collection<String> selectColumnNames, long offset, long count, Throwables.Predicate<String[],E> filter) throws UncheckedIOException, E extends Exception
E - csvFile - selectColumnNames - offset - count - filter - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(InputStream csvInputStream) throws UncheckedIOException
csvInputStream - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(InputStream csvInputStream, Collection<String> selectColumnNames) throws UncheckedIOException
csvInputStream - selectColumnNames - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(InputStream csvInputStream, Collection<String> selectColumnNames, long offset, long count) throws UncheckedIOException
csvInputStream - selectColumnNames - offset - count - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(InputStream csvInputStream, Collection<String> selectColumnNames, long offset, long count, Throwables.Predicate<String[],E> filter) throws UncheckedIOException, E extends Exception
E - csvInputStream - selectColumnNames - offset - count - filter - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(Reader csvReader) throws UncheckedIOException
csvReader - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Reader csvReader, Collection<String> selectColumnNames) throws UncheckedIOException
csvReader - selectColumnNames - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Reader csvReader, Collection<String> selectColumnNames, long offset, long count) throws UncheckedIOException
csvReader - selectColumnNames - offset - count - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(Reader csvReader, Collection<String> selectColumnNames, long offset, long count, Throwables.Predicate<String[],E> filter) throws UncheckedIOException, E extends Exception
E - csvReader - selectColumnNames - offset - count - filter - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(Class<?> entityClass, File csvFile) throws UncheckedIOException
entityClass - csvFile - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Class<?> entityClass, File csvFile, Collection<String> selectColumnNames) throws UncheckedIOException
entityClass - csvFile - selectColumnNames - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Class<?> entityClass, File csvFile, Collection<String> selectColumnNames, long offset, long count) throws UncheckedIOException
entityClass - csvFile - selectColumnNames - offset - count - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(Class<?> entityClass, File csvFile, Collection<String> selectColumnNames, long offset, long count, Throwables.Predicate<String[],E> filter) throws UncheckedIOException, E extends Exception
E - entityClass - csvFile - selectColumnNames - offset - count - filter - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(Class<?> entityClass, InputStream csvInputStream) throws UncheckedIOException
entityClass - csvInputStream - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Class<?> entityClass, InputStream csvInputStream, Collection<String> selectColumnNames) throws UncheckedIOException
entityClass - csvInputStream - selectColumnNames - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Class<?> entityClass, InputStream csvInputStream, Collection<String> selectColumnNames, long offset, long count) throws UncheckedIOException
entityClass - csvInputStream - selectColumnNames - offset - count - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(Class<?> entityClass, InputStream csvInputStream, Collection<String> selectColumnNames, long offset, long count, Throwables.Predicate<String[],E> filter) throws UncheckedIOException, E extends Exception
E - entityClass - csvInputStream - selectColumnNames - offset - count - filter - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(Class<?> entityClass, Reader csvReader) throws UncheckedIOException
entityClass - csvReader - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Class<?> entityClass, Reader csvReader, Collection<String> selectColumnNames) throws UncheckedIOException
entityClass - csvReader - selectColumnNames - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Class<?> entityClass, Reader csvReader, Collection<String> selectColumnNames, long offset, long count) throws UncheckedIOException
entityClass - csvReader - selectColumnNames - offset - count - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(Class<?> entityClass, Reader csvReader, Collection<String> selectColumnNames, long offset, long count, Throwables.Predicate<String[],E> filter) throws UncheckedIOException, E extends Exception
E - entityClass - csvReader - selectColumnNames - offset - count - filter - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(File csvFile, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException
csvFile - columnTypeMap - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(File csvFile, long offset, long count, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException
csvFile - offset - count - columnTypeMap - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(File csvFile, long offset, long count, Throwables.Predicate<String[],E> filter, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException, E extends Exception
E - csvFile - offset - count - filter - columnTypeMap - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(InputStream csvInputStream, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException
csvInputStream - columnTypeMap - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(InputStream csvInputStream, long offset, long count, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException
csvInputStream - offset - count - columnTypeMap - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(InputStream csvInputStream, long offset, long count, Throwables.Predicate<String[],E> filter, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException, E extends Exception
E - csvInputStream - offset - count - filter - columnTypeMap - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(Reader csvReader, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException
csvReader - columnTypeMap - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(Reader csvReader, long offset, long count, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException
csvReader - offset - count - columnTypeMap - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(Reader csvReader, long offset, long count, Throwables.Predicate<String[],E> filter, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws UncheckedIOException, E extends Exception
E - csvReader - offset - count - filter - columnTypeMap - UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(File csvFile, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws UncheckedIOException
csvFile - columnTypeList - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(File csvFile, long offset, long count, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws UncheckedIOException
csvFile - offset - count - columnTypeList - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(File csvFile, long offset, long count, Throwables.Predicate<String[],E> filter, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws UncheckedIOException, E extends Exception
E - csvFile - offset - count - filter - columnTypeList - set the column type to null to skip the column in CSV.UncheckedIOException - the unchecked IO exceptionE - the eE extends Exceptionpublic static DataSet loadCSV(InputStream csvInputStream, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws UncheckedIOException
csvInputStream - columnTypeList - UncheckedIOException - the unchecked IO exceptionpublic static DataSet loadCSV(InputStream csvInputStream, long offset, long count, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws UncheckedIOException
csvInputStream - offset - count - columnTypeList - UncheckedIOException - the unchecked IO exceptionpublic static <E extends Exception> DataSet loadCSV(InputStream csvInputStream, long offset, long count, Throwables.Predicate<String[],E> filter, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws E extends Exception
E - csvInputStream - offset - count - filter - columnTypeList - set the column type to null to skip the column in CSV.E - the eE extends Exceptionpublic static DataSet loadCSV(Reader csvReader, List<? extends com.landawn.abacus.type.Type> columnTypeList)
csvReader - columnTypeList - public static DataSet loadCSV(Reader csvReader, long offset, long count, List<? extends com.landawn.abacus.type.Type> columnTypeList)
csvReader - offset - count - columnTypeList - public static <E extends Exception> DataSet loadCSV(Reader csvReader, long offset, long count, Throwables.Predicate<String[],E> filter, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws UncheckedIOException, E extends Exception
E - csvReader - offset - count - filter - columnTypeList - set the column type to null to skip the column in CSV.UncheckedIOException - the unchecked IO exceptionE - the eE extends ExceptionCopyright © 2021. All rights reserved.