public class Clob extends Lob implements Clob
charData, data, DBMS_LOB_MAX_AMOUNT, encoding, exceptionInterceptor, isOracleMode, length, lengthFromServer, locator, offset| 构造器和说明 |
|---|
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
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() |
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) |
protected void |
readFromServer()
Read Clob object by the DBMS_LOB.READ(lob_loc, amount, offset, buffer).
|
OutputStream |
setAsciiStream(long pos) |
Writer |
setCharacterStream(long pos)
Set character stream.
|
int |
setString(long pos,
String str)
Set String.
|
int |
setString(long pos,
String str,
int offset,
int len) |
String |
toString()
ToString implementation.
|
void |
truncate(long truncateLen) |
buildObLobLocatorV1, buildObLobLocatorV2, clearData, copy, free, getBinaryStream, getBinaryStream, getBytes, getLocator, 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 String toString()
public String getSubString(long pos, int length) throws SQLException
getSubString 在接口中 Clobpos - positionlength - length of sub stringSQLException - if pos is less than 1 or length is less than 0public Reader getCharacterStream() throws SQLException
getCharacterStream 在接口中 ClobSQLExceptionpublic Reader getCharacterStream(long pos, long length) throws SQLException
getCharacterStream 在接口中 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 在接口中 Clobpos - positionSQLException - if position is invalidpublic InputStream getAsciiStream() throws SQLException
getAsciiStream 在接口中 ClobSQLExceptionpublic long position(String searchStr, long start) throws SQLException
position 在接口中 ClobSQLExceptionpublic long position(Clob searchStr, long start) throws SQLException
position 在接口中 ClobSQLExceptionpublic int setString(long pos,
String str)
throws SQLException
setString 在接口中 Clobpos - positionstr - stringSQLException - if UTF-8 conversion failedpublic int setString(long pos,
String str,
int offset,
int len)
throws SQLException
setString 在接口中 ClobSQLExceptionpublic OutputStream setAsciiStream(long pos) throws SQLException
setAsciiStream 在接口中 ClobSQLExceptionpublic long length()
throws SQLException
length 在接口中 ClobSQLExceptionpublic void truncate(long truncateLen)
throws SQLException
truncate 在接口中 ClobSQLExceptionprotected void readFromServer()
throws SQLException
readFromServer 在类中 LobSQLException - if database READ procedure exceptions occur
INVALID_ARGVAL: amount is less than 1, or amount is larger than 32767 bytes (or the character equivalent)
offset is less than 1, or offset is larger than LOBMAXSIZE
amount is greater, in bytes or characters, than the capacity of buffer.
NO_DATA_FOUND: End of the LOB is reached, and there are no more bytes or characters to read from the LOB: amount has a value of 0.Copyright © 2024 oceanbase.com. All rights reserved.