Package Summary  Overview Summary

class:SerialClob [CHANGED]

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.sql.Clob


    public class SerialClob
    extends java.lang.Object
    implements java.sql.Clob, java.io.Serializable, java.lang.Cloneable
    A serialized mapping in the Java programming language of an SQL 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.

    Thread safety

    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.

    See Also:
    Serialized Form
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.sql.Clob


    public class SerialClob
    extends java.lang.Object
    implements java.sql.Clob, java.io.Serializable, java.lang.Cloneable
    A serialized mapping in the Java programming language of an SQL 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.

    See Also:
    Serialized Form
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.sql.Clob


    public class SerialClob
    extends java.lang.Object
    implements java.sql.Clob, java.io.Serializable, java.lang.Cloneable
    A serialized mapping in the Java programming language of an SQL 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.

    Thread safety

    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.

    See Also:
    Serialized Form

constructor:SerialClob(char[]) [NONE]

  • SerialClob

    public SerialClob(char[] ch)
               throws SerialException,
                      java.sql.SQLException
    Constructs a SerialClob object that is a serialized version of the given char array.

    The new SerialClob object is initialized with the data from the char array, thus allowing disconnected RowSet objects to establish a serialized Clob object without touching the data source.

    Parameters:
    ch - the char array representing the Clob object to be serialized
    Throws:
    SerialException - if an error occurs during serialization
    java.sql.SQLException - if a SQL error occurs

constructor:SerialClob(java.sql.Clob) [NONE]

  • SerialClob

    public SerialClob(java.sql.Clob clob)
               throws SerialException,
                      java.sql.SQLException
    Constructs a SerialClob object that is a serialized version of the given Clob object.

    The new SerialClob object is initialized with the data from the Clob object; therefore, the Clob object should have previously brought the SQL CLOB value's data over to the client from the database. Otherwise, the new SerialClob object object will contain no data.

    Note: The Clob object supplied to this constructor must return non-null for both the Clob.getCharacterStream() and Clob.getAsciiStream methods. This SerialClob constructor cannot serialize a Clob object in this instance and will throw an SQLException object.

    Parameters:
    clob - the Clob object from which this SerialClob object is to be constructed; cannot be null
    Throws:
    SerialException - if an error occurs during serialization
    java.sql.SQLException - if a SQL error occurs in capturing the CLOB; if the Clob object is a null; or if either of the Clob.getCharacterStream() and Clob.getAsciiStream() methods on the Clob returns a null
    See Also:
    <code>Clob</code>

method:length() [CHANGED]

  • length

    public long length()
                throws SerialException
    
    Retrieves the number of characters in this SerialClob object's array of characters.
    Specified by:
    length in interface java.sql.Clob
    Returns:
    a long indicating the length in characters of this SerialClob object's array of character
    Throws:
    SerialException - if an error occurs; if free had previously been called on this object
  • length

    public long length()
                throws SerialException
    
    Retrieves the number of characters in this SerialClob object's array of characters.
    Specified by:
    length in interface java.sql.Clob
    Returns:
    a long indicating the length in characters of this SerialClob object's array of character
    Throws:
    SerialException - if an error occurs
  • length

    public long length()
                throws SerialException
    
    Retrieves the number of characters in this SerialClob object's array of characters.
    Specified by:
    length in interface java.sql.Clob
    Returns:
    a long indicating the length in characters of this SerialClob object's array of character
    Throws:
    SerialException - if an error occurs; if free had previously been called on this object

method:getCharacterStream() [CHANGED]

  • getCharacterStream

    public java.io.Reader getCharacterStream()
                                      throws SerialException
    
    Returns this SerialClob object's data as a stream of Unicode characters. Unlike the related method, getAsciiStream, a stream is produced regardless of whether the SerialClob object was created with a Clob object or a char array.
    Specified by:
    getCharacterStream in interface java.sql.Clob
    Returns:
    a java.io.Reader object containing this SerialClob object's data
    Throws:
    SerialException - if an error occurs; if free had previously been called on this object
    See Also:
    Clob.setCharacterStream(long)
  • getCharacterStream

    public java.io.Reader getCharacterStream()
                                      throws SerialException
    
    Returns this SerialClob object's data as a stream of Unicode characters. Unlike the related method, getAsciiStream, a stream is produced regardless of whether the SerialClob object was created with a Clob object or a char array.
    Specified by:
    getCharacterStream in interface java.sql.Clob
    Returns:
    a java.io.Reader object containing this SerialClob object's data
    Throws:
    SerialException - if an error occurs
    See Also:
    Clob.setCharacterStream(long)
  • getCharacterStream

    public java.io.Reader getCharacterStream()
                                      throws SerialException
    
    Returns this SerialClob object's data as a stream of Unicode characters. Unlike the related method, getAsciiStream, a stream is produced regardless of whether the SerialClob object was created with a Clob object or a char array.
    Specified by:
    getCharacterStream in interface java.sql.Clob
    Returns:
    a java.io.Reader object containing this SerialClob object's data
    Throws:
    SerialException - if an error occurs; if free had previously been called on this object
    See Also:
    Clob.setCharacterStream(long)

method:getAsciiStream() [CHANGED]

  • getAsciiStream

    public java.io.InputStream getAsciiStream()
                                       throws SerialException,
                                              java.sql.SQLException
    Retrieves the CLOB value designated by this SerialClob object as an ascii stream. This method forwards the getAsciiStream call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException object is thrown.
    Specified by:
    getAsciiStream in interface java.sql.Clob
    Returns:
    a java.io.InputStream object containing this SerialClob object's data
    Throws:
    SerialException - if this SerialClob object was not instantiated with a Clob object; if free had previously been called on this object
    java.sql.SQLException - if there is an error accessing the CLOB value represented by the Clob object that was used to create this SerialClob object
    See Also:
    Clob.setAsciiStream(long)
  • getAsciiStream

    public java.io.InputStream getAsciiStream()
                                       throws SerialException,
                                              java.sql.SQLException
    Retrieves the CLOB value designated by this SerialClob object as an ascii stream. This method forwards the getAsciiStream call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException object is thrown.
    Specified by:
    getAsciiStream in interface java.sql.Clob
    Returns:
    a java.io.InputStream object containing this SerialClob object's data
    Throws:
    SerialException - if this SerialClob object was not instantiated with a Clob object
    java.sql.SQLException - if there is an error accessing the CLOB value represented by the Clob object that was used to create this SerialClob object
    See Also:
    Clob.setAsciiStream(long)
  • getAsciiStream

    public java.io.InputStream getAsciiStream()
                                       throws SerialException,
                                              java.sql.SQLException
    Retrieves the CLOB value designated by this SerialClob object as an ascii stream. This method forwards the getAsciiStream call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException object is thrown.
    Specified by:
    getAsciiStream in interface java.sql.Clob
    Returns:
    a java.io.InputStream object containing this SerialClob object's data
    Throws:
    SerialException - if this SerialClob object was not instantiated with a Clob object; if free had previously been called on this object
    java.sql.SQLException - if there is an error accessing the CLOB value represented by the Clob object that was used to create this SerialClob object
    See Also:
    Clob.setAsciiStream(long)

method:getSubString(long, int) [CHANGED]

  • getSubString

    public java.lang.String getSubString(long pos,
                                         int length)
                                  throws SerialException
    
    Returns a copy of the substring contained in this SerialClob object, starting at the given position and continuing for the specified number or characters.
    Specified by:
    getSubString in interface java.sql.Clob
    Parameters:
    pos - the position of the first character in the substring to be copied; the first character of the 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 object
    length - the number of characters in the substring to be returned; must not be greater than the length of this SerialClob object, and the sum of the starting position and the length of the substring must be less than the length of this SerialClob object
    Returns:
    a String object containing a substring of this SerialClob object beginning at the given position and containing the specified number of consecutive characters
    Throws:
    SerialException - if either of the arguments is out of bounds; if free had previously been called on this object
  • getSubString

    public java.lang.String getSubString(long pos,
                                         int length)
                                  throws SerialException
    
    Returns a copy of the substring contained in this SerialClob object, starting at the given position and continuing for the specified number or characters.
    Specified by:
    getSubString in interface java.sql.Clob
    Parameters:
    pos - the position of the first character in the substring to be copied; the first character of the 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 object
    length - the number of characters in the substring to be returned; must not be greater than the length of this SerialClob object, and the sum of the starting position and the length of the substring must be less than the length of this SerialClob object
    Returns:
    a String object containing a substring of this SerialClob object beginning at the given position and containing the specified number of consecutive characters
    Throws:
    SerialException - if either of the arguments is out of bounds
  • getSubString

    public java.lang.String getSubString(long pos,
                                         int length)
                                  throws SerialException
    
    Returns a copy of the substring contained in this SerialClob object, starting at the given position and continuing for the specified number or characters.
    Specified by:
    getSubString in interface java.sql.Clob
    Parameters:
    pos - the position of the first character in the substring to be copied; the first character of the 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 object
    length - the number of characters in the substring to be returned; must not be greater than the length of this SerialClob object, and the sum of the starting position and the length of the substring must be less than the length of this SerialClob object
    Returns:
    a String object containing a substring of this SerialClob object beginning at the given position and containing the specified number of consecutive characters
    Throws:
    SerialException - if either of the arguments is out of bounds; if free had previously been called on this object

method:position(java.lang.String, long) [CHANGED]

  • position

    public long position(java.lang.String searchStr,
                         long start)
                  throws SerialException,
                         java.sql.SQLException
    Returns the position in this SerialClob object where the given String object begins, starting the search at the specified position. This method returns -1 if the pattern is not found.
    Specified by:
    position in interface java.sql.Clob
    Parameters:
    searchStr - the String object for which to search
    start - the position in this 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 object
    Returns:
    the position at which the given String 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
    Throws:
    SerialException - if an error occurs locatingthe String signaturefree method had been previously called on this object
    java.sql.SQLException - if there is an error accessing the BlobClob value from the database.
  • position

    public long position(java.lang.String searchStr,
                         long start)
                  throws SerialException,
                         java.sql.SQLException
    Returns the position in this SerialClob object where the given String object begins, starting the search at the specified position. This method returns -1 if the pattern is not found.
    Specified by:
    position in interface java.sql.Clob
    Parameters:
    searchStr - the String object for which to search
    start - the position in this 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 object
    Returns:
    the position at which the given String 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
    Throws:
    SerialException - if an error occurs locating the String signature
    java.sql.SQLException - if there is an error accessing the Blob value from the database.
  • position

    public long position(java.lang.String searchStr,
                         long start)
                  throws SerialException,
                         java.sql.SQLException
    Returns the position in this SerialClob object where the given String object begins, starting the search at the specified position. This method returns -1 if the pattern is not found.
    Specified by:
    position in interface java.sql.Clob
    Parameters:
    searchStr - the String object for which to search
    start - the position in this 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 object
    Returns:
    the position at which the given String 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
    Throws:
    SerialException - if the free method had been previously called on this object
    java.sql.SQLException - if there is an error accessing the Clob value from the database.

method:position(java.sql.Clob, long) [CHANGED]

  • position

    public long position(java.sql.Clob searchStr,
                         long start)
                  throws SerialException,
                         java.sql.SQLException
    Returns the position in this SerialClob object where the given Clob signature begins, starting the search at the specified position. This method returns -1 if the pattern is not found.
    Specified by:
    position in interface java.sql.Clob
    Parameters:
    searchStr - the Clob object for which to search
    start - the position in this 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 object
    Returns:
    the position at which the given Clob object begins in this SerialClob object, at or after the specified starting position
    Throws:
    SerialException - if an error occurs locating the Clob signature; if the free method had been previously called on this object
    java.sql.SQLException - if there is an error accessing the BlobClob value from the database
  • position

    public long position(java.sql.Clob searchStr,
                         long start)
                  throws SerialException,
                         java.sql.SQLException
    Returns the position in this SerialClob object where the given Clob signature begins, starting the search at the specified position. This method returns -1 if the pattern is not found.
    Specified by:
    position in interface java.sql.Clob
    Parameters:
    searchStr - the Clob object for which to search
    start - the position in this 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 object
    Returns:
    the position at which the given Clob object begins in this SerialClob object, at or after the specified starting position
    Throws:
    SerialException - if an error occurs locating the Clob signature
    java.sql.SQLException - if there is an error accessing the Blob value from the database
  • position

    public long position(java.sql.Clob searchStr,
                         long start)
                  throws SerialException,
                         java.sql.SQLException
    Returns the position in this SerialClob object where the given Clob signature begins, starting the search at the specified position. This method returns -1 if the pattern is not found.
    Specified by:
    position in interface java.sql.Clob
    Parameters:
    searchStr - the Clob object for which to search
    start - the position in this 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 object
    Returns:
    the position at which the given Clob object begins in this SerialClob object, at or after the specified starting position
    Throws:
    SerialException - if an error occurs locating the Clob signature; if the free method had been previously called on this object
    java.sql.SQLException - if there is an error accessing the Clob value from the database

method:setString(long, java.lang.String) [CHANGED]

  • setString

    public int setString(long pos,
                         java.lang.String str)
                  throws SerialException
    
    Writes the given Java String to the CLOB value that this SerialClob object represents, at the position pos.
    Specified by:
    setString in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value that this SerialClob object represents; the first position is 1; must not be less than 1 nor greater than the length of this SerialClob object
    str - the string to be written to the CLOB value that this SerialClob object represents
    Returns:
    the number of characters written
    Throws:
    SerialException - if there is an error accessing the CLOB value; if an invalid position is set; if an invalid offset value is set; if number of bytes to be written is greater than the SerialClob length; or the combined values of the length and offset is greater than the Clob buffer; if the free method had been previously called on this object
  • setString

    public int setString(long pos,
                         java.lang.String str)
                  throws SerialException
    
    Writes the given Java String to the CLOB value that this SerialClob object represents, at the position pos.
    Specified by:
    setString in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value that this SerialClob object represents; the first position is 1; must not be less than 1 nor greater than the length of this SerialClob object
    str - the string to be written to the CLOB value that this SerialClob object represents
    Returns:
    the number of characters written
    Throws:
    SerialException - if there is an error accessing the CLOB value; if an invalid position is set; if an invalid offset value is set; if number of bytes to be written is greater than the SerialClob length; or the combined values of the length and offset is greater than the Clob buffer
  • setString

    public int setString(long pos,
                         java.lang.String str)
                  throws SerialException
    
    Writes the given Java String to the CLOB value that this SerialClob object represents, at the position pos.
    Specified by:
    setString in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value that this SerialClob object represents; the first position is 1; must not be less than 1 nor greater than the length of this SerialClob object
    str - the string to be written to the CLOB value that this SerialClob object represents
    Returns:
    the number of characters written
    Throws:
    SerialException - if there is an error accessing the CLOB value; if an invalid position is set; if an invalid offset value is set; if number of bytes to be written is greater than the SerialClob length; or the combined values of the length and offset is greater than the Clob buffer; if the free method had been previously called on this object

method:setString(long, java.lang.String, int, int) [CHANGED]

  • setString

    public int setString(long pos,
                         java.lang.String str,
                         int offset,
                         int length)
                  throws SerialException
    
    Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.
    Specified by:
    setString in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value that this SerialClob object represents; the first position is 1; must not be less than 1 nor greater than the length of this SerialClob object
    str - the string to be written to the CLOB value that this Clob object represents
    offset - the offset into str to start reading the characters to be written
    length - the number of characters to be written
    Returns:
    the number of characters written
    Throws:
    SerialException - if there is an error accessing the CLOB value; if an invalid position is set; if an invalid offset value is set; if number of bytes to be written is greater than the SerialClob length; or the combined values of the length and offset is greater than the Clob buffer; if the free method had been previously called on this object
  • setString

    public int setString(long pos,
                         java.lang.String str,
                         int offset,
                         int length)
                  throws SerialException
    
    Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.
    Specified by:
    setString in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value that this SerialClob object represents; the first position is 1; must not be less than 1 nor greater than the length of this SerialClob object
    str - the string to be written to the CLOB value that this Clob object represents
    offset - the offset into str to start reading the characters to be written
    length - the number of characters to be written
    Returns:
    the number of characters written
    Throws:
    SerialException - if there is an error accessing the CLOB value; if an invalid position is set; if an invalid offset value is set; if number of bytes to be written is greater than the SerialClob length; or the combined values of the length and offset is greater than the Clob buffer
  • setString

    public int setString(long pos,
                         java.lang.String str,
                         int offset,
                         int length)
                  throws SerialException
    
    Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.
    Specified by:
    setString in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value that this SerialClob object represents; the first position is 1; must not be less than 1 nor greater than the length of this SerialClob object
    str - the string to be written to the CLOB value that this Clob object represents
    offset - the offset into str to start reading the characters to be written
    length - the number of characters to be written
    Returns:
    the number of characters written
    Throws:
    SerialException - if there is an error accessing the CLOB value; if an invalid position is set; if an invalid offset value is set; if number of bytes to be written is greater than the SerialClob length; or the combined values of the length and offset is greater than the Clob buffer; if the free method had been previously called on this object

method:setAsciiStream(long) [CHANGED]

  • setAsciiStream

    public java.io.OutputStream setAsciiStream(long pos)
                                        throws SerialException,
                                               java.sql.SQLException
    Retrieves a stream to be used to write Ascii characters to the CLOB value that this SerialClob object represents, starting at position pos. This method forwards the setAsciiStream() call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException object is thrown.
    Specified by:
    setAsciiStream in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB object
    Returns:
    the stream to which ASCII encoded characters can be written
    Throws:
    SerialException - if SerialClob is not instantiated with a Clob object that supports setAsciiStream; if the free method had been previously called on this object
    java.sql.SQLException - if there is an error accessing the CLOB value
    See Also:
    getAsciiStream()
  • setAsciiStream

    public java.io.OutputStream setAsciiStream(long pos)
                                        throws SerialException,
                                               java.sql.SQLException
    Retrieves a stream to be used to write Ascii characters to the CLOB value that this SerialClob object represents, starting at position pos. This method forwards the setAsciiStream() call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException object is thrown.
    Specified by:
    setAsciiStream in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB object
    Returns:
    the stream to which ASCII encoded characters can be written
    Throws:
    SerialException - if SerialClob is not instantiated with a Clob object that supports setAsciiStream
    java.sql.SQLException - if there is an error accessing the CLOB value
    See Also:
    getAsciiStream()
  • setAsciiStream

    public java.io.OutputStream setAsciiStream(long pos)
                                        throws SerialException,
                                               java.sql.SQLException
    Retrieves a stream to be used to write Ascii characters to the CLOB value that this SerialClob object represents, starting at position pos. This method forwards the setAsciiStream() call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException object is thrown.
    Specified by:
    setAsciiStream in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB object
    Returns:
    the stream to which ASCII encoded characters can be written
    Throws:
    SerialException - if SerialClob is not instantiated with a Clob object; if the free method had been previously called on this object
    java.sql.SQLException - if there is an error accessing the CLOB value
    See Also:
    getAsciiStream()

method:setCharacterStream(long) [CHANGED]

  • setCharacterStream

    public java.io.Writer setCharacterStream(long pos)
                                      throws SerialException,
                                             java.sql.SQLException
    Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this SerialClob object represents, at position pos. This method forwards the setCharacterStream() call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException is thrown.
    Specified by:
    setCharacterStream in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value
    Returns:
    a stream to which Unicode encoded characters can be written
    Throws:
    SerialException - if the SerialClob is not instantiated with a Clob object that supports setCharacterStream; if the free method had been previously called on this object
    java.sql.SQLException - if there is an error accessing the CLOB value
    See Also:
    getCharacterStream()
  • setCharacterStream

    public java.io.Writer setCharacterStream(long pos)
                                      throws SerialException,
                                             java.sql.SQLException
    Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this SerialClob object represents, at position pos. This method forwards the setCharacterStream() call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException is thrown.
    Specified by:
    setCharacterStream in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value
    Returns:
    a stream to which Unicode encoded characters can be written
    Throws:
    SerialException - if the SerialClob is not instantiated with a Clob object that supports setCharacterStream
    java.sql.SQLException - if there is an error accessing the CLOB value
    See Also:
    getCharacterStream()
  • setCharacterStream

    public java.io.Writer setCharacterStream(long pos)
                                      throws SerialException,
                                             java.sql.SQLException
    Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this SerialClob object represents, at position pos. This method forwards the setCharacterStream() call to the underlying Clob object in the event that this SerialClob object is instantiated with a Clob object. If this SerialClob object is instantiated with a char array, a SerialException is thrown.
    Specified by:
    setCharacterStream in interface java.sql.Clob
    Parameters:
    pos - the position at which to start writing to the CLOB value
    Returns:
    a stream to which Unicode encoded characters can be written
    Throws:
    SerialException - if the SerialClob is not instantiated with a Clob object; if the free method had been previously called on this object
    java.sql.SQLException - if there is an error accessing the CLOB value
    See Also:
    getCharacterStream()

method:truncate(long) [CHANGED]

  • truncate

    public void truncate(long length)
                  throws SerialException
    
    Truncates the CLOB value that this SerialClob object represents so that it has a length of len characters.

    Truncating a SerialClob object to length 0 has the effect of clearing its contents.

    Specified by:
    truncate in interface java.sql.Clob
    Parameters:
    length - the length, in bytes, to which the CLOB value should be truncated
    Throws:
    java.sql.SQLExceptionSerialException - if there is an error accessing the CLOB value
    SerialException
    ; if the free method had been previously called on this object
  • truncate

    public void truncate(long length)
                  throws SerialException
    
    Truncates the CLOB value that this SerialClob object represents so that it has a length of len characters.

    Truncating a SerialClob object to length 0 has the effect of clearing its contents.

    Specified by:
    truncate in interface java.sql.Clob
    Parameters:
    length - the length, in bytes, to which the CLOB value should be truncated
    Throws:
    java.sql.SQLException - if there is an error accessing the CLOB value
    SerialException
  • truncate

    public void truncate(long length)
                  throws SerialException
    
    Truncates the CLOB value that this SerialClob object represents so that it has a length of len characters.

    Truncating a SerialClob object to length 0 has the effect of clearing its contents.

    Specified by:
    truncate in interface java.sql.Clob
    Parameters:
    length - the length, in bytes, to which the CLOB value should be truncated
    Throws:
    SerialException - if there is an error accessing the CLOB value; if the free method had been previously called on this object

method:getCharacterStream(long, long) [CHANGED]

  • getCharacterStream

    public java.io.Reader getCharacterStream(long pos,
                                             long length)
                                      throws java.sql.SQLException
    Description copied from interface: java.sql.Clob
    Returns a Reader object that contains a partial ClobSerialClob value, starting with the character specified by pos, which is length characters in length.
    Specified by:
    getCharacterStream in interface java.sql.Clob
    Parameters:
    pos - the offset to the first character of the partial value to be retrieved. The first character in the ClobSerialClob is at position 1.
    length - the length in characters of the partial value to be retrieved.
    Returns:
    Reader through which the partial ClobSerialClob value can be read.
    Throws:
    java.sql.SQLException - if pos is less than 1 or if pos is greater than the number of characters in the ClobSerialClob or if pos + length is greater than the number of characters in the Clob java.sql.SQLFeatureNotSupportedExceptionSerialClob ;
    SerialException - if the JDBC driver does not supportfree method had been previously called on this methodobject
    Since:
    1.6
  • getCharacterStream

    public java.io.Reader getCharacterStream(long pos,
                                             long length)
                                      throws java.sql.SQLException
    Description copied from interface: java.sql.Clob
    Returns a Reader object that contains a partial Clob value, starting with the character specified by pos, which is length characters in length.
    Specified by:
    getCharacterStream in interface java.sql.Clob
    Parameters:
    pos - the offset to the first character of the partial value to be retrieved. The first character in the Clob is at position 1.
    length - the length in characters of the partial value to be retrieved.
    Returns:
    Reader through which the partial Clob value can be read.
    Throws:
    java.sql.SQLException - if pos is less than 1 or if pos is greater than the number of characters in the Clob or if pos + length is greater than the number of characters in the Clob
    java.sql.SQLFeatureNotSupportedException - if the JDBC driver does not support this method
  • getCharacterStream

    public java.io.Reader getCharacterStream(long pos,
                                             long length)
                                      throws java.sql.SQLException
    Returns a Reader object that contains a partial SerialClob value, starting with the character specified by pos, which is length characters in length.
    Specified by:
    getCharacterStream in interface java.sql.Clob
    Parameters:
    pos - the offset to the first character of the partial value to be retrieved. The first character in the SerialClob is at position 1.
    length - the length in characters of the partial value to be retrieved.
    Returns:
    Reader through which the partial SerialClob value can be read.
    Throws:
    java.sql.SQLException - if pos is less than 1 or if pos is greater than the number of characters in the SerialClob or if pos + length is greater than the number of characters in the SerialClob;
    SerialException - if the free method had been previously called on this object
    Since:
    1.6

method:free() [CHANGED]

  • free

    public void free()
              throws java.sql.SQLException
    Description copied from interface: java.sql.Clob
    This method frees the ClobSeriableClob object and releases the resourcesthe resources that it holds. The object is invalid once the free method is called.

    After free has been called, any attempt to invoke a method other than free will result in a SQLException being thrown.If free is called multiple times, the subsequent calls to free are treated as a no-op.

    Specified by:
    free in interface java.sql.Clob
    Throws:
    java.sql.SQLException - if an error occurs releasing the Clob's resources
    java.sql.SQLFeatureNotSupportedException - if the JDBC driver does not support this method
    Since:
    1.6
  • free

    public void free()
              throws java.sql.SQLException
    Description copied from interface: java.sql.Clob
    This method frees the Clob object and releases the resources the resources that it holds. The object is invalid once the free method is called.

    After free has been called, any attempt to invoke a method other than free will result in a SQLException being thrown. If free is called multiple times, the subsequent calls to free are treated as a no-op.

    Specified by:
    free in interface java.sql.Clob
    Throws:
    java.sql.SQLException - if an error occurs releasing the Clob's resources
    java.sql.SQLFeatureNotSupportedException - if the JDBC driver does not support this method
  • free

    public void free()
              throws java.sql.SQLException
    This method frees the SeriableClob object and releases the resources that it holds. The object is invalid once the free method is called.

    If free is called multiple times, the subsequent calls to free are treated as a no-op.

    Specified by:
    free in interface java.sql.Clob
    Throws:
    java.sql.SQLException - if an error occurs releasing the Clob's resources
    Since:
    1.6

method:equals(java.lang.Object) [ADDED]

  • equals

    public boolean equals(java.lang.Object obj)
    
    Compares this SerialClob to the specified object. The result is true if and only if the argument is not null and is a SerialClob object that represents the same sequence of characters as this object.
    Overrides:
    equals in class java.lang.Object
    Parameters:
    obj - The object to compare this SerialClob against
    Returns:
    true if the given object represents a SerialClob equivalent to this SerialClob, false otherwise
    See Also:
    Object.hashCode(), <code>HashMap</code>

method:hashCode() [ADDED]

  • hashCode

    public int hashCode()
    
    Returns a hash code for this SerialClob.
    Overrides:
    hashCode in class java.lang.Object
    Returns:
    a hash code value for this object.
    See Also:
    Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

method:clone() [ADDED]

  • clone

    public java.lang.Object clone()
    
    Returns a clone of this SerialClob. The copy will contain a reference to a clone of the internal character array, not a reference to the original internal character array of this SerialClob object. The underlying Clob object will be set to null.
    Overrides:
    clone in class java.lang.Object
    Returns:
    a clone of this SerialClob
    See Also:
    <code>Cloneable</code>