Interface NClob
- All Superinterfaces:
Clob
The mapping in the Java programming language
for the SQL
NCLOB type.
An SQL NCLOB is a built-in type
that stores a Character Large Object using the National Character Set
as a column value in a row of a database table.
The NClob interface extends the Clob interface
which provides methods for getting the
length of an SQL NCLOB value,
for materializing a NCLOB value on the client, and for
searching for a substring or NCLOB object within a
NCLOB value. A NClob object, just like a Clob object, is valid for the duration
of the transaction in which it was created.
Methods in the interfaces ResultSet,
CallableStatement, and PreparedStatement, such as
getNClob and setNClob allow a programmer to
access an SQL NCLOB value. In addition, this interface
has methods for updating a NCLOB value.
All methods on the NClob interface must be fully implemented if the
JDBC driver supports the data type.
- Since:
- 1.6
-
Method Summary
Methods declared in interface Clob
free, getAsciiStream, getCharacterStream, getCharacterStream, getSubString, length, position, position, setAsciiStream, setCharacterStream, setString, setString, truncateModifier and TypeMethodDescriptionvoidfree()This method releases the resources that theClobobject holds.Retrieves theCLOBvalue designated by thisClobobject as an ascii stream.Retrieves theCLOBvalue designated by thisClobobject as ajava.io.Readerobject (or as a stream of characters).getCharacterStream(long pos, long length) Returns aReaderobject that contains a partialClobvalue, starting with the character specified by pos, which is length characters in length.getSubString(long pos, int length) Retrieves a copy of the specified substring in theCLOBvalue designated by thisClobobject.longlength()Retrieves the number of characters in theCLOBvalue designated by thisClobobject.longRetrieves the character position at which the specified substringsearchstrappears in the SQLCLOBvalue represented by thisClobobject.longRetrieves the character position at which the specifiedClobobjectsearchstrappears in thisClobobject.setAsciiStream(long pos) Retrieves a stream to be used to write Ascii characters to theCLOBvalue that thisClobobject represents, starting at positionpos.setCharacterStream(long pos) Retrieves a stream to be used to write a stream of Unicode characters to theCLOBvalue that thisClobobject represents, at positionpos.intWrites the given JavaStringto theCLOBvalue that thisClobobject designates at the positionpos.intWriteslencharacters ofstr, starting at characteroffset, to theCLOBvalue that thisClobrepresents.voidtruncate(long len) Truncates theCLOBvalue that thisClobdesignates to have a length oflencharacters.