|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.huihoo.jfox.ms.jms.message.FormatHelper
A simple format converter helper class in order to help convert an Objec t type as per the table listed below.
A value written as the row type can be read as the column type. | | boolean byte short char int long float double String byte[] |---------------------------------------------------------------------- |boolean | X X |byte | X X X X X |short | X X X X |char | X X |int | X X X |long | X X |float | X X X |double | X X |String | X X X X X X X X |byte[] | X |----------------------------------------------------------------------
| Constructor Summary | |
FormatHelper()
|
|
| Method Summary | |
static boolean |
getBoolean(java.lang.Object value)
Convert value to boolean |
static byte |
getByte(java.lang.Object value)
Convert value to byte |
static byte[] |
getBytes(java.lang.Object value)
Convert value to Bytes |
static char |
getChar(java.lang.Object value)
Convert value to char |
static double |
getDouble(java.lang.Object value)
Convert value to double |
static float |
getFloat(java.lang.Object value)
Convert value to float |
static int |
getInt(java.lang.Object value)
Convert value to int |
static long |
getLong(java.lang.Object value)
Convert value to long |
static short |
getShort(java.lang.Object value)
Convert value to short |
static java.lang.String |
getString(java.lang.Object value)
Convert value to String |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FormatHelper()
| Method Detail |
public static boolean getBoolean(java.lang.Object value)
throws javax.jms.MessageFormatException
value -
javax.jms.MessageFormatException - if the conversion is invalid
public static byte getByte(java.lang.Object value)
throws javax.jms.MessageFormatException
value -
javax.jms.MessageFormatException - if the conversion is invalid
public static short getShort(java.lang.Object value)
throws javax.jms.MessageFormatException
value -
javax.jms.MessageFormatException - if the conversion is invalid
public static char getChar(java.lang.Object value)
throws javax.jms.MessageFormatException
value - the object to convert from
javax.jms.MessageFormatException - if the conversion is invalid
java.lang.NullPointerException - if value is null
public static int getInt(java.lang.Object value)
throws javax.jms.MessageFormatException
value -
javax.jms.MessageFormatException - if the conversion is invalid
java.lang.NumberFormatException - if value is a String and the conversion
is invalid
public static long getLong(java.lang.Object value)
throws javax.jms.MessageFormatException
value -
javax.jms.MessageFormatException - if the conversion is invalid
java.lang.NumberFormatException - if value is a String and the conversion
is invalid
public static float getFloat(java.lang.Object value)
throws javax.jms.MessageFormatException
value -
javax.jms.MessageFormatException - if the conversion is invalid
java.lang.NumberFormatException - if value is a String and the conversion
is invalid
public static double getDouble(java.lang.Object value)
throws javax.jms.MessageFormatException
value - the object to convert from
javax.jms.MessageFormatException - if the conversion is invalid
java.lang.NumberFormatException - if value is a String and the conversion
is invalid
public static java.lang.String getString(java.lang.Object value)
throws javax.jms.MessageFormatException
value - the object to convert from
javax.jms.MessageFormatException - if the conversion is invalid
public static byte[] getBytes(java.lang.Object value)
throws javax.jms.MessageFormatException
value - the object to convert from
javax.jms.MessageFormatException - if the conversion invalid
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||