public final class SQLServerNClob extends Object implements NClob
| Modifier and Type | Method and Description |
|---|---|
void |
free()
Frees this Clob/NClob object and releases the resources that it holds.
|
InputStream |
getAsciiStream()
Materialize the CLOB as an ASCII stream.
|
Reader |
getCharacterStream()
Retrieves the CLOB value designated by this Clob object as a java.io.Reader object
(or as a stream of characters).
|
Reader |
getCharacterStream(long pos,
long length) |
String |
getSubString(long pos,
int length)
Retrieves a copy of the specified substring in the CLOB value designated by this Clob object.
|
long |
length()
Retrieves the number of characters in the CLOB value designated by this Clob object.
|
long |
position(Clob searchstr,
long start)
Retrieves the character position at which the specified Clob object searchstr appears in this Clob object.
|
long |
position(String searchstr,
long start)
Retrieves the character position at which the specified substring searchstr appears in the
SQL CLOB value represented by this Clob object.
|
OutputStream |
setAsciiStream(long pos)
Retrieves a stream to be used to write Ascii characters to the CLOB value that
this Clob object represents, starting at position pos.
|
Writer |
setCharacterStream(long pos)
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(long pos,
String s)
Writes the given Java String to the CLOB value that this Clob object designates
at the position pos.
|
int |
setString(long pos,
String str,
int offset,
int len)
Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.
|
String |
toString() |
void |
truncate(long len)
Truncates the CLOB value that this Clob designates to have a length of len characters.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfree, getAsciiStream, getCharacterStream, getCharacterStream, getSubString, length, position, position, setAsciiStream, setCharacterStream, setString, setString, truncatepublic void free()
throws SQLException
SQLExceptionpublic InputStream getAsciiStream() throws SQLException
SQLExceptionpublic Reader getCharacterStream() throws SQLException
SQLException - if there is an error accessing the CLOB valuepublic Reader getCharacterStream(long pos, long length) throws SQLException
SQLExceptionpublic String getSubString(long pos, int length) throws SQLException
pos - - the first character of the substring to be extracted. The first character is at position 1.length - - the number of consecutive characters to be copied; the value for length must be 0 or greaterSQLException - - if there is an error accessing the CLOB value; if pos is less than 1 or length is less than 0public long length()
throws SQLException
SQLExceptionpublic long position(Clob searchstr, long start) throws SQLException
searchstr - - the Clob for which to searchstart - - the position at which to begin searching; the first position is 1SQLException - - if there is an error accessing the CLOB value or if start is less than 1public long position(String searchstr, long start) throws SQLException
searchstr - - the substring for which to searchstart - - the position at which to begin searching; the first position is 1SQLException - - if there is an error accessing the CLOB value or if start is less than 1public void truncate(long len)
throws SQLException
len - the length, in characters, to which the CLOB value should be truncatedSQLExceptionpublic OutputStream setAsciiStream(long pos) throws SQLException
pos - the position at which to start writing to this CLOB objectSQLExceptionpublic Writer setCharacterStream(long pos) throws SQLException
pos - the position at which to start writing to the CLOB valueSQLExceptionpublic int setString(long pos,
String s)
throws SQLException
pos - the position at which to start writing to the CLOBs - the string to be written to the CLOB value that this Clob designatesSQLExceptionpublic int setString(long pos,
String str,
int offset,
int len)
throws SQLException
pos - - the position at which to start writing to this CLOB object; The first position is 1str - - the string to be written to the CLOB value that this Clob object representsoffset - - the offset (0-based) into str to start reading the characters to be writtenlen - - the number of characters to be writtenSQLException - - if there is an error accessing the CLOB value or if pos is less than 1Copyright © 2016. All rights reserved.