Name

Clob

Synopsis

Class Name: java.sql.Clob
Superclass: None
Immediate Subclasses: None
Interfaces Implemented: None
Availability: New as of JDK 1.2

Description

CLOB is a SQL3 type that stands for “character large object.” Like a BLOB, a CLOB represents a very large chunk of data in the database. Unlike a BLOB, a CLOB represents text stored using some sort of character encoding. The point of a CLOB type as opposed to a CHAR or VARCHAR type is that CLOB data, like BLOB data, can be retrieved as a stream instead of all at once.

Class Summary

public interface Clob {
    InputStream getAsciiStream() throws SQLException;
    Reader getCharacterStream() throws SQLException;
    String getSubString(long pos, int count) 
        throws SQLException;
    long length() throws SQLException;
    long position(String pattern, long start)
        throws SQLException;
    long position(Clob pattern, long start)
        throws SQLException;
}

Object Methods

getAsciiStream( )
public InputStream getAsciiStream() throws SQLException

Description: Provides access to the data that makes up this Clob via an ASCII stream.

getCharacterStream( )
public Reader getCharacterStream() throws SQLException

Description: Provides access to the data that makes up this Clob via a Unicode stream.

getSubString( )
public String getSubString(long pos, int count)
    throws SQLException

Description: Returns a substring of the Clob starting at the named position up to the number of character specified by the count value.

length( )
public long length() throws SQLException

Description: Provides ...

Get MySQL and mSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.