| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Pattern | Returns: A compiled pattern, ornull if the input was null or
emptyThe regular expression to be compiled. May be regex, int null
or an empty string, in which case null is returned.Flags for compiling the regular expression, as in
regexFlags, Class<?> java..The class from which this method is being called.
Used for generating helpful exceptions. callingClass, Locale The locale to be used for error messages. If
errorLocale)null, the default locale is used.Compiles a regular expression into a |
| public static Pattern | Returns: A compiled pattern, ornull if the input was null or
emptyThe regular expression to be compiled. May be regex, int null
or an empty string, in which case null is returned.
Must have at least one capturing group if not null
or empty.Flags for compiling the regular expression, as in
regexFlags, Class<?> java..The class from which this method is being called.
Used for generating helpful exceptions. callingClass, Locale The locale to be used for error messages. If
errorLocale)null, the default locale is used.Compiles a regular expression into a |
| public static < The type of the bean for which the mapping strategy is sought T> MappingStrategy | Returns: A functional mapping strategy for the bean in questionThe class of the bean for which the mapping strategy is sought type, Locale The locale to use for all error messages. If null, the
default locale is used. errorLocale, String The profile to use when configuring bean fields profile)Determines which mapping strategy is appropriate for this bean. |
| public static synchronized void | handleException(CsvException
The exception originally thrown e, long The line or record number that caused the exception lineNumber, CsvExceptionHandler The exception handler exceptionHandler, BlockingQueue<OrderedObject<CsvException>> The queue for captured exceptions queue)A function to consolidate code common to handling exceptions thrown during reading or writing of CSV files. |
| public static < The type of the object to be queued E> void | queueRefuseToAcceptDefeat(BlockingQueue<E>
The queue the object should be added to queue, E The object to be queued object)I find it annoying that when I want to queue something in a blocking queue, the thread might be interrupted and I have to try again; this method fixes that. |
| public static void | verifyFormatString(String
A format string for format, Class<?> java.The class from which this method is being called.
Used for generating helpful exceptions. callingClass, Locale The locale to be used for error messages. If
errorLocale)null, the default locale is used.Verifies that the given format string works with one string parameter. |
| OpencsvUtils | back to summary |
|---|---|
| private OpencsvUtils() This class can't be instantiated. | |
| compilePattern | back to summary |
|---|---|
| public static Pattern compilePattern(String regex, int regexFlags, Class<?> callingClass, Locale errorLocale) throws CsvBadConverterException Compiles a regular expression into a
| |
| compilePatternAtLeastOneGroup | back to summary |
|---|---|
| public static Pattern compilePatternAtLeastOneGroup(String regex, int regexFlags, Class<?> callingClass, Locale errorLocale) throws CsvBadConverterException Compiles a regular expression into a
| |
| determineMappingStrategy | back to summary |
|---|---|
| public static <T> MappingStrategy Determines which mapping strategy is appropriate for this bean. The algorithm is:
| |
| handleException | back to summary |
|---|---|
| public static synchronized void handleException(CsvException e, long lineNumber, CsvExceptionHandler exceptionHandler, BlockingQueue<OrderedObject<CsvException>> queue) A function to consolidate code common to handling exceptions thrown during reading or writing of CSV files. The proper line number is set for the exception, the exception handler is run, and the exception is queued or thrown as necessary.
| |
| queueRefuseToAcceptDefeat | back to summary |
|---|---|
| public static <E> void queueRefuseToAcceptDefeat(BlockingQueue<E> queue, E object) I find it annoying that when I want to queue something in a blocking queue, the thread might be interrupted and I have to try again; this method fixes that.
| |
| verifyFormatString | back to summary |
|---|---|
| public static void verifyFormatString(String format, Class<?> callingClass, Locale errorLocale) Verifies that the given format string works with one string parameter.
| |