public class BytesDataType extends AbstractDataType
BIGINT, BIGINT_AUX_LONG, BINARY, BIT, BLOB, BOOLEAN, CHAR, CLOB, DATE, DECIMAL, DOUBLE, FLOAT, INTEGER, LONGNVARCHAR, LONGVARBINARY, LONGVARCHAR, NCHAR, NUMERIC, NVARCHAR, REAL, SMALLINT, TIME, TIMESTAMP, TINYINT, UNKNOWN, VARBINARY, VARCHAR| Modifier and Type | Method and Description |
|---|---|
int |
compare(byte[] v1,
byte[] v2) |
protected int |
compareNonNulls(Object value1,
Object value2)
Compares non-null values to each other.
|
Object |
getSqlValue(int column,
ResultSet resultSet)
Returns the specified column value from the specified resultset object.
|
byte[] |
loadFile(String filename) |
byte[] |
loadURL(String urlAsString) |
void |
setSqlValue(Object value,
int column,
PreparedStatement statement)
Set the specified value to the specified prepared statement object.
|
Object |
typeCast(Object value)
Casts the given value into a byte[] using different strategies.
|
areObjectsEqual, compare, getSqlType, getTypeClass, isDateTime, isNumber, loadClass, loadClass, toStringasString, forObject, forSqlType, forSqlTypeName, getSqlTypeNamepublic byte[] loadFile(String filename) throws IOException
IOExceptionpublic byte[] loadURL(String urlAsString) throws IOException
IOExceptionpublic Object typeCast(Object value) throws TypeCastException
typeCast in class DataTypeTypeCastExceptionDataType.typeCast(java.lang.Object)protected int compareNonNulls(Object value1, Object value2) throws TypeCastException
AbstractDataTypeComparable. The two given objects
are the results of the DataType.typeCast(Object) method call which is usually
implemented by a specialized DataType implementation.compareNonNulls in class AbstractDataTypevalue1 - First value resulting from the DataType.typeCast(Object) method callvalue2 - Second value resulting from the DataType.typeCast(Object) method callComparable.compareTo(Object) invocation.TypeCastExceptionpublic int compare(byte[] v1,
byte[] v2)
throws TypeCastException
TypeCastExceptionpublic Object getSqlValue(int column, ResultSet resultSet) throws SQLException, TypeCastException
DataTypegetSqlValue in class AbstractDataTypeSQLExceptionTypeCastExceptionpublic void setSqlValue(Object value, int column, PreparedStatement statement) throws SQLException, TypeCastException
DataTypesetSqlValue in class AbstractDataTypeSQLExceptionTypeCastExceptionCopyright © 2002-2017. All Rights Reserved.