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 StringfromCharArray(char[] value) static Iterable<?> Creates an iterable over the valuestatic Iterator<?> Creates an iterator over the valuestatic BigIntegertoBigInteger(Object value) Returns the converted value, or null if the value is nullstatic booleanConverts the given value to a boolean, handling strings or Boolean objects; otherwise returning false if the value could not be converted to a booleanstatic BooleantoBoolean(byte[] value, org.apache.camel.Exchange exchange) static BooleanConverts the given value to a Boolean, handling strings or Boolean objects; otherwise returning null if the value cannot be converted to a booleanstatic Booleanstatic BytetoByte(byte[] value, org.apache.camel.Exchange exchange) static ByteReturns the converted value, or null if the value is nullstatic Bytestatic chartoChar(byte[] value) static charstatic CharactertoCharacter(byte[] value) static CharactertoCharacter(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 DoubletoDouble(byte[] value, org.apache.camel.Exchange exchange) static DoubleReturns the converted value, or null if the value is nullstatic Doublestatic FloattoFloat(byte[] value, org.apache.camel.Exchange exchange) static FloatReturns the converted value, or null if the value is nullstatic Floatstatic IntegertoInteger(byte[] value, org.apache.camel.Exchange exchange) static IntegerReturns the converted value, or null if the value is nullstatic Integerstatic LongtoLong(byte[] value, org.apache.camel.Exchange exchange) static LongReturns the converted value, or null if the value is nullstatic Longstatic NumbertoNumber(byte[] value, org.apache.camel.Exchange exchange) static Numberstatic ShorttoShort(byte[] value, org.apache.camel.Exchange exchange) static ShortReturns the converted value, or null if the value is nullstatic Shortstatic Stringstatic Stringstatic Stringstatic StringtoString(StringBuffer value) static StringtoString(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)
-