|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.org.ogsadai.converters.csv.resultset.types.TypeStrategy
uk.org.ogsadai.converters.csv.resultset.types.StringToAllStrategy
Converts a string into other types.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
Constructor Summary | |
StringToAllStrategy()
|
Method Summary | |
java.io.InputStream |
getAsciiStream(java.lang.String data)
Returns an input stream that reads characters from the input string. |
java.math.BigDecimal |
getBigDecimal(java.lang.String data)
Returns the BigDecimal value of the input string. |
java.math.BigInteger |
getBigInteger(java.lang.String data)
|
java.io.InputStream |
getBinaryStream(java.lang.String data)
Returns an input stream that reads the input string as binary data. |
java.sql.Blob |
getBlob(java.lang.String data)
Returns the input string as a Blob . |
boolean |
getBoolean(java.lang.String data)
Returns the boolean value of the input string. |
byte[] |
getBytes(java.lang.String data)
Returns the input string as a byte array. |
byte[] |
getBytes64(java.lang.String data)
Returns the decoded byte array of the Base64 encoded input string. |
java.io.Reader |
getCharacterStream(java.lang.String data)
Returns a Reader that reads from the input string. |
java.sql.Clob |
getClob(java.lang.String data)
Returns the input string as a Clob . |
java.sql.Date |
getDate(java.lang.String data)
Returns the input string as a Date object. |
double |
getDouble(java.lang.String data)
Returns the double value of the input string. |
float |
getFloat(java.lang.String data)
Returns the float value of the input string. |
int |
getInt(java.lang.String data)
Returns the integer value of the input string. |
long |
getLong(java.lang.String data)
Returns the long value of the input string. |
java.lang.Object |
getObject(java.lang.String data)
Returns the input string as an object. |
short |
getShort(java.lang.String data)
Returns the short value of the input string. |
java.lang.String |
getString(java.lang.String data)
Returns the input string. |
java.sql.Time |
getTime(java.lang.String data)
Returns the input string as a Time object. |
java.sql.Timestamp |
getTimestamp(java.lang.String data)
Returns the input string as a Timestamp object. |
Methods inherited from class uk.org.ogsadai.converters.csv.resultset.types.TypeStrategy |
getArray, getBigDecimal, getByte, getDate, getRef, getTime, getTimestamp, getUnicodeStream, getURL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
Constructor Detail |
public StringToAllStrategy()
Method Detail |
public java.lang.String getString(java.lang.String data)
TypeStrategy
getString
in class TypeStrategy
data
- Input data.
public java.io.InputStream getAsciiStream(java.lang.String data)
TypeStrategy
getAsciiStream
in class TypeStrategy
data
- Input data.
public java.math.BigDecimal getBigDecimal(java.lang.String data) throws java.sql.SQLException
TypeStrategy
BigDecimal
value of the input string.
getBigDecimal
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public java.io.InputStream getBinaryStream(java.lang.String data)
TypeStrategy
getBinaryStream
in class TypeStrategy
data
- Input data.
public java.math.BigInteger getBigInteger(java.lang.String data) throws java.sql.SQLException
java.sql.SQLException
public boolean getBoolean(java.lang.String data) throws java.sql.SQLException
TypeStrategy
true
if the input is equal to "true"
or "1"
and false
otherwise.
getBoolean
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public byte[] getBytes(java.lang.String data)
TypeStrategy
getBytes
in class TypeStrategy
data
- Input data.
public byte[] getBytes64(java.lang.String data)
TypeStrategy
getBytes64
in class TypeStrategy
data
- Base64 encoded input data.
public java.io.Reader getCharacterStream(java.lang.String data) throws java.sql.SQLException
TypeStrategy
Reader
that reads from the input string.
getCharacterStream
in class TypeStrategy
data
- Input data.
Reader
accessing the input value.
java.sql.SQLException
- if there was a problem with the conversion.public java.sql.Date getDate(java.lang.String data) throws java.sql.SQLException
TypeStrategy
Date
object.
getDate
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public short getShort(java.lang.String data) throws java.sql.SQLException
TypeStrategy
getShort
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public int getInt(java.lang.String data) throws java.sql.SQLException
TypeStrategy
getInt
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public long getLong(java.lang.String data) throws java.sql.SQLException
TypeStrategy
getLong
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public double getDouble(java.lang.String data) throws java.sql.SQLException
TypeStrategy
getDouble
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public float getFloat(java.lang.String data) throws java.sql.SQLException
TypeStrategy
getFloat
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public java.sql.Timestamp getTimestamp(java.lang.String data) throws java.sql.SQLException
TypeStrategy
Timestamp
object.
getTimestamp
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public java.sql.Time getTime(java.lang.String data) throws java.sql.SQLException
TypeStrategy
Time
object.
getTime
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public java.lang.Object getObject(java.lang.String data)
TypeStrategy
getObject
in class TypeStrategy
data
- Input data.
public java.sql.Blob getBlob(java.lang.String data) throws java.sql.SQLException
TypeStrategy
Blob
.
getBlob
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.public java.sql.Clob getClob(java.lang.String data) throws java.sql.SQLException
TypeStrategy
Clob
.
getClob
in class TypeStrategy
data
- Input data.
java.sql.SQLException
- if there was a problem with the conversion.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |