Class ByteArrayConverter
- java.lang.Object
-
- org.apache.commons.beanutils.converters.AbstractArrayConverter
-
- org.apache.commons.beanutils.converters.ByteArrayConverter
-
- All Implemented Interfaces:
Converter
@Deprecated public final class ByteArrayConverter extends AbstractArrayConverter
Deprecated.Replaced by the newArrayConverter
implementationStandard
Converter
implementation that converts an incoming String into a primitive array of byte. On a conversion failure, returns a specified default value or throws aConversionException
depending on how this instance is constructed.- Since:
- 1.4
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]
MODEL
Deprecated.Model object for type comparisons.-
Fields inherited from class org.apache.commons.beanutils.converters.AbstractArrayConverter
defaultValue, NO_DEFAULT, strings, useDefault
-
-
Constructor Summary
Constructors Constructor Description ByteArrayConverter()
Deprecated.Create aConverter
that will throw aConversionException
if a conversion error occurs.ByteArrayConverter(java.lang.Object defaultValue)
Deprecated.Create aConverter
that will return the specified default value if a conversion error occurs.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
convert(java.lang.Class type, java.lang.Object value)
Deprecated.Convert the specified input object into an output object of the specified type.-
Methods inherited from class org.apache.commons.beanutils.converters.AbstractArrayConverter
parseElements
-
-
-
-
Constructor Detail
-
ByteArrayConverter
public ByteArrayConverter()
Deprecated.Create aConverter
that will throw aConversionException
if a conversion error occurs.
-
ByteArrayConverter
public ByteArrayConverter(java.lang.Object defaultValue)
Deprecated.Create aConverter
that will return the specified default value if a conversion error occurs.- Parameters:
defaultValue
- The default value to be returned
-
-
Method Detail
-
convert
public java.lang.Object convert(java.lang.Class type, java.lang.Object value)
Deprecated.Convert the specified input object into an output object of the specified type.- Specified by:
convert
in interfaceConverter
- Specified by:
convert
in classAbstractArrayConverter
- Parameters:
type
- Data type to which this value should be convertedvalue
- The input value to be converted- Returns:
- the converted value
- Throws:
ConversionException
- if conversion cannot be performed successfully
-
-