public class DbBinary extends DbValue
DbBinary
class wraps an array of primitive type byte
in an object. An object of the type DbBinary
contains a single
field whose type is byte
array.
In addition, this class provides several methods for the interconversion of
a byte
array and a String
array,
as well as other constants and methods used when dealing
with a DbBinary
.
Modifier and Type | Field and Description |
---|---|
byte[] |
value
Deprecated.
|
BIGINT_DESC, bNull, CHAR_DESC, CURRENCY_DESC, DATE_DESC, desc, DOUBLE_DESC, INTEGER_DESC, TIME_DESC
Constructor and Description |
---|
DbBinary()
Constructs an uninitialized
DbBinary . |
DbBinary(DbColDesc desc)
Constructs an uninitialized
DbBinary . |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a clone of this
DbBinary object. |
int |
compareTo(DbValue v,
boolean matchSQL)
Compares this
DbBinary object with the DbValue object. |
boolean |
equals(DbValue v)
Compares this object to the specified object.
|
byte[] |
get()
Returns the value of this
DbBinary as a
byte array value. |
java.io.InputStream |
getStream()
return a stream.
|
void |
set(byte[] v)
Sets a newly allocated
DbBinary object that
represents the specified byte array argument. |
void |
set(DbValue v)
Sets a newly allocated
DbBinary object that
represents the byte array value indicated by the
DbValue parameter. |
void |
set(JRHierarchicalDataset hds,
int col)
Sets a newly allocated
DbBinary object that
represents the byte array value indicated by the
JRHierarchicalDataset parameter and an index of the column. |
void |
set(java.sql.ResultSet rs,
int col)
Sets a newly allocated
DbBinary object that
represents the byte array value indicated by the
ResultSet parameter and an index of the column. |
void |
setValue(java.lang.String v)
Sets a newly allocated
DbBinary object that
represents the byte array value indicated by the
String parameter. |
java.lang.String |
toString()
Returns a
String object representing this
byte array's value. |
java.lang.String |
toStringValue() |
compareTo, compareTo, compareTo, equals, getColDesc, getDataTimeZone, getPrecision, getScale, getSqlType, isCurrency, isNull, makeDbValue, setColDesc, setfoo, setNull, setValue
public byte[] value
get
and set
to access it instead of accessing it directly.public DbBinary()
DbBinary
. This
DbBinary object is mutable until the value and the description of the column are set.public DbBinary(DbColDesc desc)
DbBinary
. This
DbBinary object is mutable until the value is set.desc
- The value to be represented by the
DbColDesc
object.public byte[] get()
DbBinary
as a
byte
array value.public java.io.InputStream getStream()
public void set(byte[] v)
DbBinary
object that
represents the specified byte
array argument.v
- The value to be represented by the
DbBinary
object.public void set(java.sql.ResultSet rs, int col) throws java.sql.SQLException
DbBinary
object that
represents the byte
array value indicated by the
ResultSet
parameter and an index of the column.public void set(JRHierarchicalDataset hds, int col) throws java.sql.SQLException
DbBinary
object that
represents the byte
array value indicated by the
JRHierarchicalDataset
parameter and an index of the column.public java.lang.String toString()
String
object representing this
byte
array's value. The value is converted from the byte array
and returned as a string. If the value is null, it returns "NULL".public java.lang.Object clone()
DbBinary
object.public boolean equals(DbValue v)
public int compareTo(DbValue v, boolean matchSQL)
DbBinary
object with the DbValue object.public void set(DbValue v)
DbBinary
object that
represents the byte
array value indicated by the
DbValue
parameter. The DbValue object will be checked to see if it is null.public void setValue(java.lang.String v)
DbBinary
object that
represents the byte
array value indicated by the
String
parameter.public java.lang.String toStringValue()
toStringValue
in class DbValue