public class XdevClob extends Object implements CharHolder, Serializable, Comparable<CharHolder>
VirtualTable
.
The XdevClob holds either an reference to a Clob
object or plain
chars.
Clob
,
Serialized FormConstructor and Description |
---|
XdevClob()
Initializes a new instance of
XdevClob . |
XdevClob(char[] chars)
Initializes a new instance of
XdevBlob . |
XdevClob(Clob clob)
Initializes a new instance of
XdevClob . |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CharHolder other)
Compares this
XdevClob with another CharHolder . |
boolean |
equals(Object obj) |
Reader |
getCharacterStream()
Retrieves the CLOB value designated by this Clob object as a
Reader object (or as a stream of characters). |
Reader |
getCharacterStream(int position,
int length)
Returns a Reader object that contains a partial Clob value, starting with
the character specified by pos, which is length characters in length.
|
String |
getSubString(int pos,
int length)
|
int |
hashCode()
Generates a hashcode for this
XdevBlob . |
int |
length()
Returns the number of characters of this
XdevBlob . |
Writer |
setCharacterStream(int position)
Retrieves a stream to be used to write a stream of Unicode characters to
the CLOB value that this Clob object represents, at position pos.
|
int |
setString(int position,
String str)
Writes the given Java String to the CLOB value that this Clob object
designates at the position pos.
|
int |
setString(int position,
String str,
int offset,
int length)
Writes len characters of str, starting at character offset, to the CLOB
value that this Clob represents.
|
char[] |
toCharArray()
Returns a copied
char array of this XdevClob . |
Clob |
toJDBCClob()
|
String |
toString() |
void |
truncate(long length)
Truncates the CLOB value that this
XdevClob object represents to
be len characters in length. |
public XdevClob()
XdevClob
.public XdevClob(char[] chars)
XdevBlob
.chars
- a character array initially to be setpublic XdevClob(Clob clob) throws DBException
XdevClob
.clob
- a Clob
initially to be set.DBException
- if the specified clob could not be set.public int length()
XdevBlob
.length
in interface CharHolder
public void truncate(long length) throws DBException
XdevClob
object represents to
be len characters in length.length
- the length, in characters, to which the CLOB value that this
Blob object represents should be truncatedDBException
- if truncate was not successful.public Reader getCharacterStream() throws DBException
Reader
object (or as a stream of characters).Reader
object containing the CLOB dataDBException
- if there is an error accessing the CLOB valuepublic Reader getCharacterStream(int position, int length) throws DBException
position
- the offset to the first character of the partial value to be
retrievedlength
- the length in characters of the partial value to be retrievedReader
through which the partial Clob value can be readDBException
- if there is an error accessing the CLOB valuepublic Writer setCharacterStream(int position) throws DBException
position
- the position at which to start writing to the CLOB valueWriter
to which Unicode encoded characters can be
writtenDBException
- if there is an error accessing the CLOB valuepublic String getSubString(int pos, int length) throws DBException
pos
- the position of the first character to be returned.length
- the number of characters to be returned.String
representation for a part of this
XdevClob
.DBException
public int setString(int position, String str) throws DBException
position
- the position at which to start writing to the CLOB value that
this Clob object representsstr
- the string to be written to the CLOB value that this Clob
designatesDBException
- if there is an error accessing the CLOB valuepublic int setString(int position, String str, int offset, int length) throws DBException
position
- the position at which to start writing to this CLOB objectstr
- the string to be written to the CLOB value that this Clob
object representsoffset
- the offset into str to start reading the characters to be
writtenlength
- the number of characters to be writtenDBException
- if there is an error accessing the CLOB valuepublic char[] toCharArray()
char array
of this XdevClob
.toCharArray
in interface CharHolder
char array
public int compareTo(CharHolder other)
XdevClob
with another CharHolder
.
The length of the CharHolder
objects is used for this comparison.
compareTo
in interface Comparable<CharHolder>
other
- the other CharHolder
.
CharHolder
is greaterCharHolder
is smallerpublic Clob toJDBCClob() throws DBException
Clob
DBException
- if Clob
could not be created.Copyright © 2003–2021 XDEV Software. All rights reserved.