CLOB
value.
The SerialClob
class provides a constructor for creating
an instance from a Clob
object. Note that the Clob
object should have brought the SQL CLOB
value's data over
to the client before a SerialClob
object
is constructed from it. The data of an SQL CLOB
value can
be materialized on the client as a stream of Unicode characters.
SerialClob
methods make it possible to get a substring
from a SerialClob
object or to locate the start of
a pattern of characters.
A SerialClob is not safe for use by multiple concurrent threads. If a SerialClob is to be used by more than one thread then access to the SerialClob should be controlled by appropriate synchronization.
Modifier and Type | Field and Description |
---|---|
private char[] | buf
A serialized array of characters containing the data of the SQL
|
private Clob | clob
Internal Clob representation if SerialClob is initialized with a Clob. |
private long | len
The length in characters of this |
private long | origLen
The original length in characters of this |
pack-priv static final long | serialVersionUID
The identifier that assists in the serialization of this |
Access | Constructor and Description |
---|---|
public | SerialClob(char[]
the char array representing the ch)Clob object to be
serializedConstructs a |
public | SerialClob(Clob
the clob)Clob object from which this
SerialClob object is to be constructed; cannot be nullConstructs a |
Modifier and Type | Method and Description |
---|---|
public Object | Returns: a clone of this SerialClobOverrides java. SerialClob .
|
public boolean | Returns: true if the given object represents a SerialClob
equivalent to this SerialClob, false otherwiseThe object to compare this obj)SerialClob againstOverrides java. |
public void | free()
Implements java. SerialClob object and releases the
resources that it holds.
|
public InputStream | Returns: ajava.io.InputStream object containing
this SerialClob object's dataImplements java. CLOB value designated by this SerialClob
object as an ascii stream.
|
public Reader | Returns: ajava.io.Reader object containing this
SerialClob object's dataImplements java. SerialClob object's data as a stream
of Unicode characters.
|
public Reader | Returns: Reader through which the partial SerialClob
value can be read.the offset to the first character of the partial value to
be retrieved. The first character in the pos, long SerialClob is at position 1.the length in characters of the partial value to be retrieved. length)Implements java. Reader object that contains a partial
SerialClob value, starting
with the character specified by pos, which is length characters in length.
|
public String | Returns: aString object containing a substring of
this SerialClob object beginning at the
given position and containing the specified number of
consecutive charactersthe position of the first character in the substring
to be copied; the first character of the
pos, int SerialClob object is at position
1 ; must not be less than 1 ,
and the sum of the starting position and the length
of the substring must be less than the length of this
SerialClob objectthe number of characters in the substring to be
returned; must not be greater than the length of
this length)SerialClob object, and the
sum of the starting position and the length
of the substring must be less than the length of this
SerialClob objectImplements java. SerialClob object, starting at the given position
and continuing for the specified number or characters.
|
public int | Returns: a hash code value for this object.Overrides java. SerialClob .
|
private void | |
public long | Returns: along indicating the length in characters of this
SerialClob object's array of characterImplements java. SerialClob
object's array of characters.
|
public long | Returns: the position at which the givenString object
begins, starting the search at the specified position;
-1 if the given String object is
not found or the starting position is out of bounds; position
numbering for the return value starts at 1 the searchStr, long String object for which to
searchthe position in this start)SerialClob object
at which to start the search; the first position is
1 ; must not be less than 1 nor
greater than the length of this SerialClob objectImplements java. SerialClob object
where the given String object begins, starting
the search at the specified position.
|
public long | Returns: the position at which the givenClob
object begins in this SerialClob object,
at or after the specified starting positionthe searchStr, long Clob object for which to searchthe position in this start)SerialClob object
at which to begin the search; the first position is
1 ; must not be less than 1 nor
greater than the length of this SerialClob objectImplements java. SerialClob object
where the given Clob signature begins, starting
the search at the specified position.
|
private void | readObject(ObjectInputStream
the s)ObjectInputStream to read from.readObject is called to restore the state of the SerialClob from a stream. |
public OutputStream | Returns: the stream to which ASCII encoded characters can be writtenthe position at which to start writing to the
pos)CLOB objectImplements java. CLOB value that this SerialClob object represents,
starting at position pos .
|
public Writer | Returns: a stream to which Unicode encoded characters can be writtenthe position at which to start writing to the
pos)CLOB valueImplements java. CLOB value that this SerialClob object
represents, at position pos .
|
public int | Returns: the number of characters writtenthe position at which to start writing to the pos, String CLOB
value that this SerialClob object represents; the first
position is 1 ; must not be less than 1 nor
greater than the length+1 of this SerialClob objectthe string to be written to the str)CLOB
value that this SerialClob object representsImplements java. String to the CLOB
value that this SerialClob object represents, at the position
pos .
|
public int | Returns: the number of characters writtenthe position at which to start writing to the pos, String CLOB
value that this SerialClob object represents; the first
position is 1 ; must not be less than 1 nor
greater than the length+1 of this SerialClob objectthe string to be written to the str, int CLOB
value that this Clob object representsthe offset into offset, int str to start reading
the characters to be writtenthe number of characters to be written length)Implements java. len characters of str , starting
at character offset , to the CLOB value
that this Clob represents.
|
public void | truncate(long
the length, in bytes, to which the length)CLOB
value should be truncatedImplements java. CLOB value that this SerialClob
object represents so that it has a length of len
characters.
|
private void | writeObject(ObjectOutputStream
the s)ObjectOutputStream to write to.writeObject is called to save the state of the SerialClob to a stream. |
buf | back to summary |
---|---|
private char[] buf A serialized array of characters containing the data of the SQL
|
clob | back to summary |
---|---|
private Clob clob Internal Clob representation if SerialClob is initialized with a Clob. Null if SerialClob is initialized with a char[].
|
len | back to summary |
---|---|
private long len The length in characters of this |
origLen | back to summary |
---|---|
private long origLen The original length in characters of this |
serialVersionUID | back to summary |
---|---|
pack-priv static final long serialVersionUID The identifier that assists in the serialization of this |
SerialClob | back to summary |
---|---|
public SerialClob(char[] ch) throws SerialException, SQLException Constructs a
The new
|
SerialClob | back to summary |
---|---|
public SerialClob(Clob clob) throws SerialException, SQLException Constructs a
The new Note The
|
clone | back to summary |
---|---|
public Object clone() Overrides java. Returns a clone of this
|
equals | back to summary |
---|---|
public boolean equals(Object obj) Overrides java. Compares this SerialClob to the specified object. The result is
|
free | back to summary |
---|---|
public void free() throws SQLException Implements java. This method frees the
If
|
getAsciiStream | back to summary |
---|---|
public InputStream getAsciiStream() throws SerialException, SQLException Implements java. Retrieves the
|
getCharacterStream | back to summary |
---|---|
public Reader getCharacterStream() throws SerialException Implements java. Returns this
|
getCharacterStream | back to summary |
---|---|
public Reader getCharacterStream(long pos, long length) throws SQLException Implements java. Returns a
|
getSubString | back to summary |
---|---|
public String getSubString(long pos, int length) throws SerialException Implements java. Returns a copy of the substring contained in this
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Returns a hash code for this
|
isValid | back to summary |
---|---|
private void isValid() throws SerialException Check to see if this object had previously had its |
length | back to summary |
---|---|
public long length() throws SerialException Implements java. Retrieves the number of characters in this
|
position | back to summary |
---|---|
public long position(String searchStr, long start) throws SerialException, SQLException Implements java. Returns the position in this
|
position | back to summary |
---|---|
public long position(Clob searchStr, long start) throws SerialException, SQLException Implements java. Returns the position in this
|
readObject | back to summary |
---|---|
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException readObject is called to restore the state of the SerialClob from a stream.
|
setAsciiStream | back to summary |
---|---|
public OutputStream setAsciiStream(long pos) throws SerialException, SQLException Implements java. Retrieves a stream to be used to write Ascii characters to the
|
setCharacterStream | back to summary |
---|---|
public Writer setCharacterStream(long pos) throws SerialException, SQLException Implements java. Retrieves a stream to be used to write a stream of Unicode characters
to the
|
setString | back to summary |
---|---|
public int setString(long pos, String str) throws SerialException Implements java. Writes the given Java
|
setString | back to summary |
---|---|
public int setString(long pos, String str, int offset, int length) throws SerialException Implements java. Writes
|
truncate | back to summary |
---|---|
public void truncate(long length) throws SerialException Implements java. Truncates the
Truncating a
|
writeObject | back to summary |
---|---|
private void writeObject(ObjectOutputStream s) throws IOException writeObject is called to save the state of the SerialClob to a stream.
|