Class MessageConvertTools


  • public final class MessageConvertTools
    extends Object
    Supported conversions (from the JMS 1.1 StreamMessage spec.) (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 Detail

      • MessageConvertTools

        public MessageConvertTools()
    • Method Detail

      • asBoolean

        public static boolean asBoolean​(Object value)
                                 throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asByte

        public static byte asByte​(Object value)
                           throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asBytes

        public static byte[] asBytes​(Object value)
                              throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asShort

        public static short asShort​(Object value)
                             throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asInt

        public static int asInt​(Object value)
                         throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asLong

        public static long asLong​(Object value)
                           throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asFloat

        public static float asFloat​(Object value)
                             throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asDouble

        public static double asDouble​(Object value)
                               throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asChar

        public static char asChar​(Object value)
                           throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException
      • asString

        public static String asString​(Object value)
                               throws javax.jms.MessageFormatException
        Throws:
        javax.jms.MessageFormatException