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 truncateLen)
Truncates the
BLOB value that this Blob object represents to be
len bytes in length. |
free, getBinaryStream, getBinaryStream, getBytes, position, position, setBinaryStream, setBytes, setBytes
public 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 Clob
pos
- positionlength
- length of sub stringSQLException
- if pos is less than 1 or length is less than 0public Reader getCharacterStream()
getCharacterStream
in interface Clob
public Reader getCharacterStream(long pos, long length) throws SQLException
getCharacterStream
in interface Clob
pos
- 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 Clob
pos
- positionSQLException
- if position is invalidpublic InputStream getAsciiStream() throws SQLException
getAsciiStream
in interface Clob
SQLException
public long position(String searchStr, long start)
public int setString(long pos, String str) throws SQLException
setString
in interface Clob
pos
- positionstr
- stringSQLException
- if UTF-8 conversion failedpublic int setString(long pos, String str, int offset, int len) throws SQLException
setString
in interface Clob
SQLException
public OutputStream setAsciiStream(long pos) throws SQLException
setAsciiStream
in interface Clob
SQLException
public long length()
public void truncate(long truncateLen)
MariaDbBlob
BLOB
value that this Blob
object represents to be
len
bytes in length.Copyright © 2020 mariadb.com. All rights reserved.