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, 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() throws SQLException
getCharacterStream
in interface Clob
SQLException
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) throws SQLException
position
in interface Clob
SQLException
public long position(Clob searchStr, long start) throws SQLException
position
in interface Clob
SQLException
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 len) throws SQLException
MariaDbBlob
BLOB
value that this Blob
object represents to be len
bytes
in length.truncate
in interface Blob
truncate
in interface Clob
truncate
in class MariaDbBlob
len
- 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 © 2017. All rights reserved.