Package org.apache.camel.converter
Class ObjectConverter
java.lang.Object
org.apache.camel.converter.ObjectConverter
Some core java.lang based Type Converters
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
fromCharArray
(char[] value) static Iterable
<?> Creates an iterable over the valuestatic Iterator
<?> Creates an iterator over the valuestatic BigInteger
toBigInteger
(Object value) Returns the converted value, or null if the value is nullstatic boolean
Converts the given value to a boolean, handling strings or Boolean objects; otherwise returning false if the value could not be converted to a booleanstatic Boolean
toBoolean
(byte[] value, org.apache.camel.Exchange exchange) static Boolean
Converts the given value to a Boolean, handling strings or Boolean objects; otherwise returning null if the value cannot be converted to a booleanstatic Boolean
static Byte
toByte
(byte[] value, org.apache.camel.Exchange exchange) static Byte
Returns the converted value, or null if the value is nullstatic Byte
static char
toChar
(byte[] value) static char
static Character
toCharacter
(byte[] value) static Character
toCharacter
(String value) static char[]
toCharArray
(byte[] value, org.apache.camel.Exchange exchange) static char[]
toCharArray
(String value) static Class
<?> Returns the converted value, or null if the value is nullstatic Double
toDouble
(byte[] value, org.apache.camel.Exchange exchange) static Double
Returns the converted value, or null if the value is nullstatic Double
static Float
toFloat
(byte[] value, org.apache.camel.Exchange exchange) static Float
Returns the converted value, or null if the value is nullstatic Float
static Integer
toInteger
(byte[] value, org.apache.camel.Exchange exchange) static Integer
Returns the converted value, or null if the value is nullstatic Integer
static Long
toLong
(byte[] value, org.apache.camel.Exchange exchange) static Long
Returns the converted value, or null if the value is nullstatic Long
static Number
toNumber
(byte[] value, org.apache.camel.Exchange exchange) static Number
static Short
toShort
(byte[] value, org.apache.camel.Exchange exchange) static Short
Returns the converted value, or null if the value is nullstatic Short
static String
static String
static String
static String
toString
(StringBuffer value) static String
toString
(StringBuilder value)
-
Method Details
-
toBool
Converts the given value to a boolean, handling strings or Boolean objects; otherwise returning false if the value could not be converted to a boolean -
toBoolean
Converts the given value to a Boolean, handling strings or Boolean objects; otherwise returning null if the value cannot be converted to a boolean -
iterator
Creates an iterator over the value -
iterable
Creates an iterable over the value -
toByte
Returns the converted value, or null if the value is null -
toByte
-
toByte
-
toCharArray
-
toCharArray
@Converter(order=9) public static char[] toCharArray(byte[] value, org.apache.camel.Exchange exchange) -
toCharacter
-
toCharacter
-
toChar
-
toChar
@Converter(order=13) public static char toChar(byte[] value) -
fromCharArray
-
toClass
@Converter(order=15) public static Class<?> toClass(String value, org.apache.camel.CamelContext camelContext) Returns the converted value, or null if the value is null -
toShort
Returns the converted value, or null if the value is null -
toShort
-
toShort
-
toInteger
Returns the converted value, or null if the value is null -
toInteger
-
toInteger
@Converter(order=21) public static Integer toInteger(byte[] value, org.apache.camel.Exchange exchange) -
toLong
Returns the converted value, or null if the value is null -
toLong
-
toLong
-
toBigInteger
Returns the converted value, or null if the value is null -
toFloat
Returns the converted value, or null if the value is null -
toFloat
-
toFloat
-
toDouble
Returns the converted value, or null if the value is null -
toDouble
-
toDouble
@Converter(order=31) public static Double toDouble(byte[] value, org.apache.camel.Exchange exchange) -
toString
-
toString
-
toString
-
toString
-
toString
-
toBoolean
-
toBoolean
@Converter(order=38) public static Boolean toBoolean(byte[] value, org.apache.camel.Exchange exchange) -
toNumber
-
toNumber
@Converter(order=40) public static Number toNumber(byte[] value, org.apache.camel.Exchange exchange)
-