public class Clob extends Lob implements ObClob
| Constructor and Description |
|---|
Clob()
Creates an empty Clob.
|
Clob(boolean hasLocator,
byte[] data,
String encoding,
OceanBaseConnection conn) |
Clob(byte[] bytes)
Creates a Clob with content.
|
Clob(byte[] bytes,
ExceptionInterceptor exceptionInterceptor) |
Clob(byte[] bytes,
int offset,
int length)
Creates a Clob with content.
|
Clob(String charDataInit,
ExceptionInterceptor exceptionInterceptor) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getAsciiStream() |
Reader |
getCharacterStream() |
Reader |
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.
|
static Clob |
getEmptyCLOB() |
com.oceanbase.jdbc.ObLobLocator |
getLocator() |
String |
getSubString(long pos,
int length)
Get sub string.
|
long |
length()
Return character length of the Clob.
|
long |
position(Clob searchStr,
long start) |
long |
position(String searchStr,
long start) |
OutputStream |
setAsciiStream(long pos) |
Writer |
setCharacterStream(long pos)
Set character stream.
|
void |
setLocator(com.oceanbase.jdbc.ObLobLocator locator) |
int |
setString(long pos,
String str)
Set String.
|
int |
setString(long pos,
String str,
int offset,
int len) |
String |
toString()
ToString implementation.
|
void |
trimClobToServer(int len)
Truncate
Clob object by the DBMS_LOB.trim(?,?), truncate data from len, exception if len is big than data's length
and success when len is less than data's length. |
void |
truncate(long truncateLen) |
void |
updateClobToServer(long writeAt,
byte[] bytes,
int offset,
int length)
Update
Clob object by the DBMS_LOB.write(?,?,?,?), starting with writeAt and write the bytes to
database. |
free, getBinaryStream, getBinaryStream, getBytes, isEmptyLob, setBinaryStream, setBytespublic Clob(byte[] bytes)
bytes - the content for the Clob.public Clob(byte[] bytes,
ExceptionInterceptor exceptionInterceptor)
public Clob(byte[] bytes,
int offset,
int length)
bytes - the content for the Clob.offset - offsetlength - lengthpublic Clob(String charDataInit, ExceptionInterceptor exceptionInterceptor)
public Clob(boolean hasLocator,
byte[] data,
String encoding,
OceanBaseConnection conn)
throws SQLException
SQLExceptionpublic Clob()
public static Clob getEmptyCLOB() throws SQLException
SQLExceptionpublic com.oceanbase.jdbc.ObLobLocator getLocator()
getLocator in interface ObClobpublic void setLocator(com.oceanbase.jdbc.ObLobLocator locator)
setLocator in interface ObClobpublic String toString()
public String getSubString(long pos, int length) throws SQLException
getSubString in interface Clobpos - positionlength - length of sub stringSQLException - if pos is less than 1 or length is less than 0public Reader getCharacterStream()
getCharacterStream in interface Clobpublic Reader getCharacterStream(long pos, long length) throws SQLException
getCharacterStream in interface Clobpos - the offset to the first character of the partial value to be retrieved. The first
character in the Clob is at position 1.length - the length in characters of the partial value to be retrieved.SQLException - if pos is less than 1 or if pos is greater than the number of characters
in the Clob or if pos + length is greater than the number of characters in the Clobpublic Writer setCharacterStream(long pos) throws SQLException
setCharacterStream in interface Clobpos - positionSQLException - if position is invalidpublic InputStream getAsciiStream() throws SQLException
getAsciiStream in interface ClobSQLExceptionpublic long position(String searchStr, long start) throws SQLException
position in interface ClobSQLExceptionpublic long position(Clob searchStr, long start) throws SQLException
position in interface ClobSQLExceptionpublic int setString(long pos,
String str)
throws SQLException
setString in interface Clobpos - positionstr - stringSQLException - if UTF-8 conversion failedpublic int setString(long pos,
String str,
int offset,
int len)
throws SQLException
setString in interface ClobSQLExceptionpublic OutputStream setAsciiStream(long pos) throws SQLException
setAsciiStream in interface ClobSQLExceptionpublic long length()
public void truncate(long truncateLen)
throws SQLException
truncate in interface ClobSQLExceptionpublic void updateClobToServer(long writeAt,
byte[] bytes,
int offset,
int length)
throws SQLException
Clob object by the DBMS_LOB.write(?,?,?,?), starting with writeAt and write the bytes to
database.updateClobToServer in interface ObClobwriteAt - Start position to be write.bytes - byte[] data to be write.offset - first position offset will be write.length - date length to be write.SQLException - if database error occurpublic void trimClobToServer(int len)
throws SQLException
Clob object by the DBMS_LOB.trim(?,?), truncate data from len, exception if len is big than data's length
and success when len is less than data's length.len - truncate data from lenSQLException - if database error occurCopyright © 2022 oceanbase.com. All rights reserved.