if (value instanceof Blob) {
Blob blob = (Blob) value;
try {
long length = blob.length();
if (length > Integer.MAX_VALUE) {
throw new TypeConversionException("Blob is too big.");
}
return blob.getBytes(1, (int) length);
} catch (SQLException sex) {
throw new TypeConversionException(value, sex);
}
}
if (value instanceof File) {
try {
return FileUtil.readBytes((File) value);
} catch (IOException ioex) {
throw new TypeConversionException(value, ioex);
}
}
if (value instanceof List) {
List list = (List) value;