java.lang.Object
org.litebridgedb.convert.converter.ByteArrayConverter
- All Implemented Interfaces:
Converter<byte[]>,ConverterFunction<byte[]>,SqlConverter<byte[]>
A converter for
byte[] values.
Handles Types.BINARY, Types.VARBINARY, and Types.LONGVARBINARY.
-
Constructor Details
-
ByteArrayConverter
public ByteArrayConverter()
-
-
Method Details
-
convert
Converts the given value to abyte[].Supports
byte[]and arrays ofNumberinstances.- Specified by:
convertin interfaceConverterFunction<byte[]>- Parameters:
value- the value to convert, may benull- Returns:
- the converted
byte[], ornull - Throws:
IllegalArgumentException- if the value cannot be converted tobyte[]
-
type
Returns the target Java class this converter handles. -
sqlTypes
public int[] sqlTypes()Returns the SQL types associated with this converter.- Specified by:
sqlTypesin interfaceSqlConverter<byte[]>- Returns:
- an array containing
Types.BINARY,Types.VARBINARY, andTypes.LONGVARBINARY
-