public class ClobImpl
extends java.lang.Object
implements java.sql.Clob
BlobBuffer class. Each character is stored in 2
sequential bytes using UTF-16LE encoding.
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.
| Modifier and Type | Field and Description |
|---|---|
private BlobBuffer |
blobBuffer
The underlying
BlobBuffer. |
private static java.lang.String |
EMPTY_CLOB
0 length
String as initial value for empty
Clobs. |
| Constructor and Description |
|---|
ClobImpl(JtdsConnection connection)
Constructs a new empty
Clob instance. |
ClobImpl(JtdsConnection connection,
java.lang.String str)
Constructs a new initialized
Clob instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
free() |
java.io.InputStream |
getAsciiStream() |
(package private) BlobBuffer |
getBlobBuffer()
Obtain this object's backing
BlobBuffer object. |
java.io.Reader |
getCharacterStream() |
java.io.Reader |
getCharacterStream(long pos,
long length) |
java.lang.String |
getSubString(long pos,
int length) |
long |
length() |
long |
position(java.sql.Clob searchStr,
long start) |
long |
position(java.lang.String searchStr,
long start) |
java.io.OutputStream |
setAsciiStream(long pos) |
java.io.Writer |
setCharacterStream(long pos) |
int |
setString(long pos,
java.lang.String str) |
int |
setString(long pos,
java.lang.String str,
int offset,
int len) |
void |
truncate(long len) |
private static final java.lang.String EMPTY_CLOB
String as initial value for empty
Clobs.private final BlobBuffer blobBuffer
BlobBuffer.ClobImpl(JtdsConnection connection)
Clob instance.connection - a reference to the parent connection objectClobImpl(JtdsConnection connection, java.lang.String str)
Clob instance.connection - a reference to the parent connection objectstr - the String object to encapsulateBlobBuffer getBlobBuffer()
BlobBuffer object.BlobBufferpublic java.io.InputStream getAsciiStream()
throws java.sql.SQLException
getAsciiStream in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.Reader getCharacterStream()
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobjava.sql.SQLExceptionpublic java.lang.String getSubString(long pos,
int length)
throws java.sql.SQLException
getSubString in interface java.sql.Clobjava.sql.SQLExceptionpublic long length()
throws java.sql.SQLException
length in interface java.sql.Clobjava.sql.SQLExceptionpublic long position(java.lang.String searchStr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobjava.sql.SQLExceptionpublic long position(java.sql.Clob searchStr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.OutputStream setAsciiStream(long pos)
throws java.sql.SQLException
setAsciiStream in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.Writer setCharacterStream(long pos)
throws java.sql.SQLException
setCharacterStream in interface java.sql.Clobjava.sql.SQLExceptionpublic int setString(long pos,
java.lang.String str)
throws java.sql.SQLException
setString in interface java.sql.Clobjava.sql.SQLExceptionpublic int setString(long pos,
java.lang.String str,
int offset,
int len)
throws java.sql.SQLException
setString in interface java.sql.Clobjava.sql.SQLExceptionpublic void truncate(long len)
throws java.sql.SQLException
truncate in interface java.sql.Clobjava.sql.SQLExceptionpublic void free()
throws java.sql.SQLException
free in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.Reader getCharacterStream(long pos,
long length)
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobjava.sql.SQLExceptionGenerated on June 8 2013