Modifier and Type | Method and Description |
---|---|
default java.lang.String |
_getCodePage()
Get this object's code page, if it was explicitly overridden from the server's default.
|
byte[] |
asByteArray(long pos,
long len)
Return the specified range of the current buffer as an array.
|
static boolean |
binaryEquals(LargeObject op1,
LargeObject op2)
Check two large objects for binary equality.
|
default FieldReference |
getFieldReference()
Obtain the
FieldReference reference, if any. |
boolean |
isCharacterData()
Indicate whether this object manages character data (as opposed to binary data).
|
boolean |
isUnknown()
Indicate whether the object represents unknown value.
|
long |
lengthOf()
The length of the data managed by this object.
|
default byte[] |
readBytes(int offset,
int length)
Read an array of bytes from this object, starting at the given offset.
|
default char[] |
readChars(int offset,
int length)
Read an array of characters from this object, starting at the given offset.
|
default void |
setFieldReference(FieldReference bf)
Sets the
FieldReference reference. |
java.lang.String |
toStringMessage()
Creates a string representation of the instance data in a form that is compatible with the
MESSAGE language statement. |
default void |
write(boolean overlay,
byte[] data,
int offset,
boolean trim)
Write the given array of bytes into the data managed by this object, overwriting the bytes
that are at the given location, if any.
|
default void |
write(boolean overlay,
java.lang.String data,
int offset,
boolean trim)
Write the given character data into the data managed by this object, overwriting the data
that are at the given location, if any.
|
boolean isUnknown()
true
if unknown value, else false
.boolean isCharacterData()
true
if this object manages character data; false
if this object
manages binary data.byte[] asByteArray(long pos, long len)
pos
- Starting offset position.len
- Length of range to return.unknown
or has an undefined size, then null
will be returned.long lengthOf()
java.lang.String toStringMessage()
MESSAGE
language statement. If the instance represents the unknown value
,
a '?' will be returned.default java.lang.String _getCodePage()
null
.default char[] readChars(int offset, int length)
offset
- Zero-based offset, in char
s, at which to start reading.length
- Number of characters to read.null
. It should be overridden by
concrete subclasses.java.lang.UnsupportedOperationException
- if invoked on a binary data object.default byte[] readBytes(int offset, int length)
offset
- Zero-based offset, in byte
s, at which to start reading.length
- Number of bytes to read.null
. It should be overridden by
concrete subclasses.java.lang.UnsupportedOperationException
- if invoked on a binary data object.default void write(boolean overlay, byte[] data, int offset, boolean trim)
This default implementation does nothing. It should be overridden by concrete subclasses.
overlay
- Flag indicating if the OVERLAY option is used.data
- Data to be assigned to this object.offset
- Offset position (in bytes) in the target large object.trim
- true
to truncate any remaining data in the target large object; false
to leave remaining data alone. It is up to the concrete implementation as
to whether or not to ignore this option.default void write(boolean overlay, java.lang.String data, int offset, boolean trim)
This default implementation does nothing. It should be overridden by concrete subclasses.
overlay
- Flag indicating if the OVERLAY option is used.data
- Data to be assigned to this object.offset
- Offset position (in characters) in the target large object.trim
- true
to truncate any remaining data in the target large object; false
to leave remaining data alone. It is up to the concrete implementation as
to whether or not to ignore this option.static boolean binaryEquals(LargeObject op1, LargeObject op2)
null
or
unknown
, or if their data as byte arrays exactly match. Otherwise, they are unequal.op1
- Left operand.op2
- Right operand.true
if the operands are binary equals, else false
.default void setFieldReference(FieldReference bf)
FieldReference
reference. This is only used when the object is obtained by a
dereferenciation (::
) operation.bf
- The source of this LOB.default FieldReference getFieldReference()
FieldReference
reference, if any.FieldReference
from which this LOB was obtained by dereferenciation.