|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ofx4j.io.DefaultStringConversion
public class DefaultStringConversion
Utility class for conversion to/from OFX strings.
Field Summary | |
---|---|
static int |
DATE_FORMAT_LENGTH
|
static java.util.TimeZone |
GMT_TIME_ZONE
|
static int |
TIME_FORMAT_LENGTH
|
Constructor Summary | |
---|---|
DefaultStringConversion()
|
Method Summary | ||
---|---|---|
protected java.lang.String |
formatDate(java.util.Date date)
Format the date according to the OFX spec. |
|
protected java.lang.String |
formatTime(java.sql.Time time)
Format the time according to the OFX spec. |
|
|
fromString(java.lang.Class<E> clazz,
java.lang.String value)
Convert the specified value to an object of the specified type. |
|
protected java.util.Date |
parseDate(java.lang.String value)
Parses a date according to OFX. |
|
protected java.sql.Time |
parseTime(java.lang.String value)
Parses a time according to OFX. |
|
protected java.util.TimeZone |
parseTimeZone(java.lang.String tzoffset)
Parse the timezone offset of the form [HOURS_OFF_GMT:TZ_ID] |
|
java.lang.String |
toString(java.lang.Object value)
Convert the specified object to a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.TimeZone GMT_TIME_ZONE
public static final int DATE_FORMAT_LENGTH
public static final int TIME_FORMAT_LENGTH
Constructor Detail |
---|
public DefaultStringConversion()
Method Detail |
---|
public java.lang.String toString(java.lang.Object value)
StringConversion
toString
in interface StringConversion
value
- The value to convert to a string.
public <E> E fromString(java.lang.Class<E> clazz, java.lang.String value) throws OFXSyntaxException
StringConversion
fromString
in interface StringConversion
clazz
- The class.value
- The value.
OFXSyntaxException
- If there was something wrong with the syntax of the string.protected java.util.Date parseDate(java.lang.String value)
value
- The value of the date.
protected java.lang.String formatDate(java.util.Date date)
date
- The date.
protected java.sql.Time parseTime(java.lang.String value)
value
- The value of the date.
protected java.lang.String formatTime(java.sql.Time time)
time
- The time to format.
protected java.util.TimeZone parseTimeZone(java.lang.String tzoffset)
tzoffset
- The offset pattern.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |