Class ClobImpl

java.lang.Object
net.sourceforge.jtds.jdbc.ClobImpl
All Implemented Interfaces:
Clob

public class ClobImpl extends Object implements Clob
An in-memory or disk based representation of character data.

Implementation note:

  1. This implementation stores the CLOB data in a byte array managed by the BlobBuffer class. Each character is stored in 2 sequential bytes using UTF-16LE encoding.
  2. As a consequence of using UTF-16LE, Unicode 3.1 supplementary characters may require an additional 2 bytes of storage. This implementation assumes that character position parameters supplied to getSubstring, position and the set methods refer to 16 bit characters only. The presence of supplementary characters will cause the wrong characters to be accessed.
  3. For the same reasons although the position method will return the correct start position for any given pattern in the array, the returned value may be different to that expected if supplementary characters exist in the text preceding the pattern.
Version:
$Id: ClobImpl.java,v 1.36.2.3 2009-12-30 08:45:34 ickzon Exp $
Author:
Brian Heineman, Mike Hutchinson