Recent Pos

The SQL 99 Types – CLOB (Character Large Object)

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

character large object (CLOB)
⇒ The Character Large Object(CLOB) is also a datatype similar to Binary Large Object(BLOB) supporting to store large content, however this allows managing large Character based content.
This supports an UNICODE character set so that we can store the large content of any character set.
⇒ Working with JDBC for storing and reading the CLOB is similar to done with the BLOB except that we use Character Stream instead of Binary stream i.e. Reader instead of InputStream and Writer instead of OutputStream.
⇒ Like java.sql.Blob we do have java.sql.Clob for representing the DB CLOB object.
⇒ The BLOB and CLOB combinedly called Large Objects(LOB).

Following are the methods of LOB for writing and reading objects from DB:

BLOBsetBinaryStream(int, InputSteam, int)PS
CLOBsetCharacterStream(int,Reader,int)
BLOBInputStream getBinaryStream(int)ResutlSet
CLOBReader getCharacterStream(int)

Example:


Note: The examples and other utility files are available in the downloadable .zip, download link available below.

Download this example: LOBExample.zip

<-Previous: The SQL 99 Types – BLOB (Binary Large Object) | | Next->#

Tags:
No Comments

Post a Comment