Interface NClob

All Superinterfaces:
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.

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, truncate
    Modifier and Type
    Method
    Description
    void
    This method releases the resources that the Clob object holds.
    Retrieves the CLOB value designated by this Clob object as an ascii stream.
    Retrieves the CLOB value designated by this Clob object as a java.io.Reader object (or as a stream of characters).
    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.
    getSubString(long pos, int length)
    Retrieves a copy of the specified substring in the CLOB value designated by this Clob object.
    long
    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.
    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.
    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.