| java.sql.Clob
Clob | public interface Clob (Code) | | A Java interface mapping for the SQL CLOB type.
An SQL CLOB type stores a large array of characters as the value in a column
of a database.
The java.sql.Clob interface provides methods for setting and retrieving data
in the Clob, for querying Clob data length, for searching for data within the
Clob.
|
Method Summary | |
public InputStream | getAsciiStream() Gets the value of this Clob object as an ASCII stream. | public Reader | getCharacterStream() Gets the value of this Clob object as a java.io.Reader. | public String | getSubString(long pos, int length) Gets a copy of a specified substring in this Clob. | public long | length() Retrieves the number of characters in this Clob object. | public long | position(Clob searchstr, long start) Retrieves the character position at which a specified Clob object appears
in this Clob object. | public long | position(String searchstr, long start) Retrieves the character position at which a specified substring appears
in this Clob object.
Parameters: searchstr - th String to search for Parameters: start - the position at which to start the search within this Clob. | public OutputStream | setAsciiStream(long pos) Retrieves a stream which can be used to write Ascii characters to this
Clob object, starting at specified position. | public Writer | setCharacterStream(long pos) Retrieves a stream which can be used to write a stream of Unicode
characters to this Clob object, at a specified position. | public int | setString(long pos, String str) Writes a given Java String to this Clob object at a specified position. | public int | setString(long pos, String str, int offset, int len) Writes len characters of String, starting at a specified character
offset, to this Clob. | public void | truncate(long len) Truncates this Clob to have a specified length of characters. |
getAsciiStream | public InputStream getAsciiStream() throws SQLException(Code) | | Gets the value of this Clob object as an ASCII stream.
an ASCII InputStream giving access to the Clob data throws: SQLException - if an error occurs accessing the Clob |
getCharacterStream | public Reader getCharacterStream() throws SQLException(Code) | | Gets the value of this Clob object as a java.io.Reader.
a character stream Reader object giving access to the Clob data throws: SQLException - if an error occurs accessing the Clob |
getSubString | public String getSubString(long pos, int length) throws SQLException(Code) | | Gets a copy of a specified substring in this Clob.
Parameters: pos - the index of the start of the substring in the Clob Parameters: length - the length of the data to retrieve A String containing the requested data throws: SQLException - if an error occurs accessing the Clob |
length | public long length() throws SQLException(Code) | | Retrieves the number of characters in this Clob object.
a long value with the number of character in this Clob. throws: SQLException - if an error occurs accessing the Clob |
position | public long position(Clob searchstr, long start) throws SQLException(Code) | | Retrieves the character position at which a specified Clob object appears
in this Clob object.
Parameters: searchstr - the specified Clob to search for Parameters: start - the position within this Clob to start the search a long value with the position at which the specified Clob occurswithin this Clob. throws: SQLException - if an error occurs accessing the Clob |
position | public long position(String searchstr, long start) throws SQLException(Code) | | Retrieves the character position at which a specified substring appears
in this Clob object.
Parameters: searchstr - th String to search for Parameters: start - the position at which to start the search within this Clob. a long value with the position at which the specified Stringoccurs within this Clob. throws: SQLException - if an error occurs accessing the Clob |
setAsciiStream | public OutputStream setAsciiStream(long pos) throws SQLException(Code) | | Retrieves a stream which can be used to write Ascii characters to this
Clob object, starting at specified position.
Parameters: pos - the position at which to start the writing an OutputStream which can be used to write ASCII characters tothis Clob. throws: SQLException - if an error occurs accessing the Clob |
setCharacterStream | public Writer setCharacterStream(long pos) throws SQLException(Code) | | Retrieves a stream which can be used to write a stream of Unicode
characters to this Clob object, at a specified position.
Parameters: pos - the position at which to start the writing a Writer which can be used to write Unicode characters to thisClob. throws: SQLException - if an error occurs accessing the Clob |
setString | public int setString(long pos, String str) throws SQLException(Code) | | Writes a given Java String to this Clob object at a specified position.
Parameters: pos - the position at which to start the writing Parameters: str - the String to write the number of characters written throws: SQLException - if an error occurs accessing the Clob |
setString | public int setString(long pos, String str, int offset, int len) throws SQLException(Code) | | Writes len characters of String, starting at a specified character
offset, to this Clob.
Parameters: pos - the position at which to start the writing Parameters: str - the String to write Parameters: offset - the offset within str to start writing from Parameters: len - the number of characters to write the number of characters written throws: SQLException - if an error occurs accessing the Clob |
truncate | public void truncate(long len) throws SQLException(Code) | | Truncates this Clob to have a specified length of characters.
Parameters: len - the length in characters to truncate this Clob throws: SQLException - if an error occurs accessing the Clob |
|
|