Class CsvParsingUtils
- java.lang.Object
-
- io.testomat.junit.extractor.strategy.handlers.util.CsvParsingUtils
-
public final class CsvParsingUtils extends java.lang.ObjectUtility class for parsing CSV-formatted strings with support for custom delimiters, quote characters, and null value handling. This class provides methods for parsing CSV data with proper quote handling, delimiter customization, and automatic type conversion.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object[]parseCommaSeparatedValues(java.lang.String content)Parses comma-separated values with simple splitting and type conversion.static java.lang.Object[]parseCsvString(java.lang.String csvString, java.lang.String delimiter, char quoteCharacter, java.lang.String[] nullValuesArray)Parses a CSV string into an array of objects with automatic type conversion.
-
-
-
Method Detail
-
parseCsvString
public static java.lang.Object[] parseCsvString(java.lang.String csvString, java.lang.String delimiter, char quoteCharacter, java.lang.String[] nullValuesArray)Parses a CSV string into an array of objects with automatic type conversion.- Parameters:
csvString- the CSV string to parsedelimiter- the delimiter character (default: comma)quoteCharacter- the quote character (default: double quote)nullValuesArray- array of strings that should be treated as null- Returns:
- array of parsed and typed objects
-
parseCommaSeparatedValues
public static java.lang.Object[] parseCommaSeparatedValues(java.lang.String content)
Parses comma-separated values with simple splitting and type conversion.- Parameters:
content- the content to parse- Returns:
- array of parsed and typed objects
-
-