public class MariaDbClob extends MariaDbBlob implements Clob, NClob, Serializable
data, length, offset| Constructor and Description |
|---|
MariaDbClob()
Creates an empty Clob.
|
MariaDbClob(byte[] bytes)
Creates a Clob with content.
|
MariaDbClob(byte[] bytes,
int offset,
int length)
Creates a Clob with content.
|
| 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.
|
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.
|
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 len)
Truncates the
BLOB value that this Blob object represents to be len bytes
in length. |
free, getBinaryStream, getBinaryStream, getBytes, position, position, setBinaryStream, setBytes, setBytespublic MariaDbClob(byte[] bytes)
bytes - the content for the Clob.public MariaDbClob(byte[] bytes,
int offset,
int length)
bytes - the content for the Clob.offset - offsetlength - lengthpublic MariaDbClob()
public 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() throws SQLException
getCharacterStream in interface ClobSQLExceptionpublic 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 len)
throws SQLException
MariaDbBlobBLOB value that this Blob object represents to be len bytes
in length.truncate in interface Blobtruncate in interface Clobtruncate in class MariaDbBloblen - the length, in bytes, to which the BLOB value that this Blob object
represents should be truncatedSQLException - if there is an error accessing the BLOB value or if len is less than
0Copyright © 2018 mariadb.org. All rights reserved.