public class MariaDbClob extends MariaDbBlob implements java.sql.Clob, java.sql.NClob, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
actualSize, blobContent
Constructor and Description |
---|
MariaDbClob() |
MariaDbClob(byte[] bytes) |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getAsciiStream() |
java.io.Reader |
getCharacterStream() |
java.io.Reader |
getCharacterStream(long pos,
long length) |
java.lang.String |
getSubString(long pos,
int length)
Get sub string.
|
long |
length()
Return character length of the Clob.
|
long |
position(java.sql.Clob searchstr,
long start) |
long |
position(java.lang.String searchstr,
long start) |
java.io.OutputStream |
setAsciiStream(long pos) |
java.io.Writer |
setCharacterStream(long pos)
Set character stream.
|
int |
setString(long pos,
java.lang.String str)
Set String.
|
int |
setString(long pos,
java.lang.String str,
int offset,
int len) |
java.lang.String |
toString()
ToString implementation.
|
private int |
utf8Position(int charPosition)
Convert character position into byte position in UTF8 byte array.
|
free, getBinaryStream, getBinaryStream, getBytes, position, position, setBinaryStream, setBytes, setBytes, truncate
private static final long serialVersionUID
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSubString(long pos, int length) throws java.sql.SQLException
getSubString
in interface java.sql.Clob
pos
- positionlength
- length of sub stringjava.sql.SQLException
- if position is not possiblepublic java.io.Reader getCharacterStream() throws java.sql.SQLException
getCharacterStream
in interface java.sql.Clob
java.sql.SQLException
public java.io.Reader getCharacterStream(long pos, long length) throws java.sql.SQLException
getCharacterStream
in interface java.sql.Clob
java.sql.SQLException
public java.io.Writer setCharacterStream(long pos) throws java.sql.SQLException
setCharacterStream
in interface java.sql.Clob
pos
- positionjava.sql.SQLException
- if position is invalidpublic java.io.InputStream getAsciiStream() throws java.sql.SQLException
getAsciiStream
in interface java.sql.Clob
java.sql.SQLException
public long position(java.lang.String searchstr, long start) throws java.sql.SQLException
position
in interface java.sql.Clob
java.sql.SQLException
public long position(java.sql.Clob searchstr, long start) throws java.sql.SQLException
position
in interface java.sql.Clob
java.sql.SQLException
private int utf8Position(int charPosition)
charPosition
- charPositionpublic int setString(long pos, java.lang.String str) throws java.sql.SQLException
setString
in interface java.sql.Clob
pos
- positionstr
- stringjava.sql.SQLException
- if UTF-8 convertion failedpublic int setString(long pos, java.lang.String str, int offset, int len) throws java.sql.SQLException
setString
in interface java.sql.Clob
java.sql.SQLException
public java.io.OutputStream setAsciiStream(long pos) throws java.sql.SQLException
setAsciiStream
in interface java.sql.Clob
java.sql.SQLException
public long length()
length
in interface java.sql.Blob
length
in interface java.sql.Clob
length
in class MariaDbBlob
BLOB
in bytes