Format : <encoded length><raw data>
Length is encoded to support Cloudscape 5.x databases where the length was stored as the number of bits.
The first bit of the first byte indicates if the format is an old (Cloudscape 5.x) style or a new Derby style.
Derby then uses the next two bits to indicate how the length is encoded.
<encoded length> is one of N styles.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Blob | |
| private static final int | |
| pack-priv byte[] | |
| private static final int | |
| pack-priv static final byte | |
| pack-priv InputStream | stream
Value as a stream, this stream represents the on-disk format of the value. |
| pack-priv int | streamValueLength
Length of the value in bytes when this value is set as a stream. |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final NumberDataValue | Returns: A SQLInteger containing the length of the char valueThe result of a previous call to this method, null
if not called yet result)Implements org. This method implements the char_length function for bit. |
| public final void | checkHostVariable(int declaredLength)
Overrides org. Implements org. Host variables are rejected if their length is bigger than the declared length, regardless of if the trailing bytes are the pad character. |
| public final DataValueDescriptor | cloneHolder()
Overrides org. Implements org. Shallow clone a StreamStorable without objectifying. |
| public DataValueDescriptor | cloneValue(boolean
any streams representing the data value will
be materialized if forceMaterialization)true, the data value will be kept as a
stream if possible if falseImplements org. Clone this DataValueDescriptor. |
| public final boolean | compare(int
Orderable.ORDER_OP_EQUALS means do an = comparison.
Orderable.ORDER_OP_LESSTHAN means compare this < other.
Orderable.ORDER_OP_LESSOREQUALS means compare this <= other. op, DataValueDescriptor The DataValueDescriptor to compare this one to. other, boolean True means to treat nulls as ordered values,
that is, treat SQL null as equal to null, and less
than all other values.
False means to treat nulls as unknown values,
that is, the result of any comparison with a null
is the UNKNOWN truth value. orderedNulls, boolean The return value to use if the result of the
comparison is the UNKNOWN truth value. In other
words, if orderedNulls is false, and a null is
involved in the comparison, return unknownRV.
This parameter is not used orderedNulls is true. unknownRV)Overrides org. Implements org. Compare this Orderable with a given Orderable for the purpose of qualification and sorting. |
| public final int | compare(DataValueDescriptor
The Orderable to compare this one to. other)Implements org. Compare this Orderable with a given Orderable for the purpose of index positioning. |
| private static int | |
| public final BitDataValue | concatenate(BitDataValue
String on the left hand side of '||' left, BitDataValue String on the right hand side of '||' right, BitDataValue The result of a previous call to this method,
null if not called yet. result)Implements org. The SQL concatenation '||' operator. |
| public final BooleanDataValue | Returns: A SQL boolean value telling whether the two parameters are equalThe value on the left side of the = left, DataValueDescriptor The value on the right side of the =
is not. right)Overrides org. Implements org. The = operator as called from the language module, as opposed to the storage module. |
| public int | estimateMemoryUsage()
Implements org. Estimate the memory usage in bytes of the data value and the overhead of the class. |
| private int | |
| public final byte[] | getBytes()
Overrides org. Implements org. Gets the value in the data value descriptor as a byte array. |
| public final int | |
| pack-priv abstract int | |
| public final InputStream | getStream()
Overrides org. Implements org. Gets the value in the data value descriptor as a stream of bytes. |
| public final String | getString()
Implements org. Used by JDBC -- string should not contain SQL92 formatting. |
| public final String | Returns: a trace representation of this SQL DataType.Overrides org. Implements org. Gets a trace representation for debugging. |
| pack-priv byte[] | |
| public final BooleanDataValue | Returns: A SQL boolean value telling whether the first operand is greater than or equal to the second operandThe value on the left side of the >= left, DataValueDescriptor The value on the right side of the >= right)Overrides org. Implements org. The >= operator as called from the language module, as opposed to the storage module. |
| public final BooleanDataValue | Returns: A SQL boolean value telling whether the first operand is greater than the second operandThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The > operator as called from the language module, as opposed to the storage module. |
| public final int | |
| public final boolean | |
| public final BooleanDataValue | Returns: A SQL boolean value telling whether the first operand is less than or equal to the second operandThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The <= operator as called from the language module, as opposed to the storage module. |
| public final BooleanDataValue | Returns: A SQL boolean value telling whether the first operand is less than the second operandThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The < operator as called from the language module, as opposed to the storage module. |
| public final void | loadStream()
Implements org. Set the value by reading the stream and converting it to an object form. |
| public final BooleanDataValue | Returns: A SQL boolean value telling whether the two parameters are not equalThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The <> operator as called from the language module, as opposed to the storage module. |
| pack-priv boolean | |
| private static int | |
| public final void | readExternal(ObjectInput
the stream to read data from in order to restore the object in)Implements java. delegated to bit |
| private void | |
| public final void | restoreToNull()
Implements org. Restore this object to its (SQL)null value. |
| public final InputStream | returnStream()
Implements org. Return the on-disk stream state of the object. |
| protected final void | setFrom(DataValueDescriptor
The DataValueDescriptor that holds the value to
which we want to set this DataValueDescriptor's value. theValue)Overrides org. Set the value of this DataValueDescriptor based on the value of the specified DataValueDescriptor. |
| public void | setInto(PreparedStatement ps, int position)
Overrides org. Implements org. Adding this method to ensure that super class' setInto method doesn't get called that leads to the violation of JDBC spec( untyped nulls ) when batching is turned on. |
| public final void | setStream(InputStream
The new stream to use newStream)Implements org. Set me to the value represented by this stream. |
| public final void | setValue(byte[]
The byte value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Set the value of this DataValueDescriptor. |
| public final void | setValue(Blob
The Blob value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Stuff a BitDataValue with a Blob. |
| public final void | setValue(InputStream
On disk format of the stream theStream, int length of the logical value in bytes, or
valueLength)DataValueDescriptor.UNKNOWN_LOGICAL_LENGTHOverrides org. Implements org. Set the value from the stream which is in the on-disk format. |
| public final ConcatableDataValue | Returns: A ConcatableDataValue containing the result of the substr()Start of substr start, NumberDataValue Length of substr length, ConcatableDataValue The result of a previous call to this method,
null if not called yet. result, int Maximum length of the result maxLen)Implements org. The SQL substr() function. |
| private void | |
| public final String | |
| pack-priv void | truncate(int
the original width in bytes (only used for
diagnostics, ignored if sourceWidth, int warn is false)the desired width in bytes desiredWidth, boolean whether or not to generate a truncation warning warn)Truncate this value to the desired width by removing bytes at the end of the byte sequence. |
| private void | |
| public final void | writeExternal(ObjectOutput
the stream to write the object to out)Implements java. Write the value out from the byte array (not called if null) using the 8.1 encoding. |
| private void |