Package org.relique.jdbc.csv
Class StringConverter
- java.lang.Object
-
- org.relique.jdbc.csv.StringConverter
-
public class StringConverter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLUMN_NAME
-
Constructor Summary
Constructors Constructor Description StringConverter(String dateformat, String timeformat, String timestampformat, String timeZoneName, boolean useDateTimeFormatter)
StringConverter(String dateformat, String timeformat, String timestampformat, String timeZoneName, Locale locale, boolean useDateTimeFormatter)
-
Method Summary
-
-
-
Field Detail
-
COLUMN_NAME
public static final String COLUMN_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseBytes
public byte[] parseBytes(String str)
-
parseBigDecimal
public BigDecimal parseBigDecimal(String str)
-
formatDate
public String formatDate(Date d)
Create date string in format accepted by methodparseDate
.- Parameters:
d
- date to format.- Returns:
- formatted date.
-
formatTime
public String formatTime(Time t)
Create time string in format accepted by methodparseTime
.- Parameters:
t
- time to format.- Returns:
- formatted time.
-
formatTimestamp
public String formatTimestamp(Timestamp timestamp)
Create timestamp string in format accepted by methodparseTimestamp
.- Parameters:
timestamp
- timestamp to format.- Returns:
- formatted timestamp.
-
parseAsciiStream
public InputStream parseAsciiStream(String str)
-
getLiteralForTypeName
public static Object getLiteralForTypeName(String sqlTypeName)
Get a value that has the type of an SQL data type.- Parameters:
sqlTypeName
- name of SQL data type.- Returns:
- a constant value with this data type.
-
getTypeNameForLiteral
public static String getTypeNameForLiteral(Object literal)
Get SQL data type of an object.- Parameters:
literal
- object to get SQL data type for.- Returns:
- SQL data type name.
-
-