Spec-Zone.ru › OpenJDK 27

Interface NClob

All Superinterfaces:
AutoCloseable, Clob
public interface NClob extends 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.

To release resources used by the NClob object, applications must call either the Clob.free() or the Clob.close() method. Any attempt to invoke a method other than Clob.free() or Clob.close() after the NClob object has been closed, will result in a SQLException being thrown.

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

close, free, getAsciiStream, getCharacterStream, getCharacterStream, getSubString, length, position, position, setAsciiStream, setCharacterStream, setString, setString, truncate
Modifier and Type Method Description
default void close()
Closes and releases the resources held by this Clob object.
void free()
Closes and releases the resources held by this Clob object.
InputStream getAsciiStream()
Retrieves the CLOB value designated by this Clob object 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)
Returns a Reader object that contains a partial Clob value, starting with the character specified by pos, which is length characters in 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(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.
long position(Clob searchstr, long start)
Retrieves the character position at which the specified Clob object searchstr appears in 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 str)
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.
void truncate(long len)
Truncates the CLOB value that this Clob designates to have a length of len characters.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API