org.mariadb.jdbc
Class MariaDbClob
java.lang.Object
org.mariadb.jdbc.MariaDbBlob
org.mariadb.jdbc.MariaDbClob
- All Implemented Interfaces:
- Serializable, Blob, Clob, NClob
public class MariaDbClob
- extends MariaDbBlob
- implements Clob, NClob, Serializable
- See Also:
- Serialized Form
MariaDbClob
public MariaDbClob(byte[] bytes)
MariaDbClob
public MariaDbClob()
toString
public String toString()
- ToString implementation.
- Overrides:
toString in class Object
- Returns:
- string value of blob content.
getSubString
public String getSubString(long pos,
int length)
throws SQLException
- Get sub string.
- Specified by:
getSubString in interface Clob
- Parameters:
pos - positionlength - length of sub string
- Returns:
- substring
- Throws:
SQLException - if position is not possible
getCharacterStream
public Reader getCharacterStream()
throws SQLException
- Specified by:
getCharacterStream in interface Clob
- Throws:
SQLException
getCharacterStream
public Reader getCharacterStream(long pos,
long length)
throws SQLException
- Specified by:
getCharacterStream in interface Clob
- Throws:
SQLException
setCharacterStream
public Writer setCharacterStream(long pos)
throws SQLException
- Set character stream.
- Specified by:
setCharacterStream in interface Clob
- Parameters:
pos - position
- Returns:
- writer
- Throws:
SQLException - if position is invalid
getAsciiStream
public InputStream getAsciiStream()
throws SQLException
- Specified by:
getAsciiStream in interface Clob
- Throws:
SQLException
position
public long position(String searchstr,
long start)
throws SQLException
- Specified by:
position in interface Clob
- Throws:
SQLException
position
public long position(Clob searchstr,
long start)
throws SQLException
- Specified by:
position in interface Clob
- Throws:
SQLException
setString
public int setString(long pos,
String str)
throws SQLException
- Set String.
- Specified by:
setString in interface Clob
- Parameters:
pos - positionstr - string
- Returns:
- string length
- Throws:
SQLException - if UTF-8 convertion failed
setString
public int setString(long pos,
String str,
int offset,
int len)
throws SQLException
- Specified by:
setString in interface Clob
- Throws:
SQLException
setAsciiStream
public OutputStream setAsciiStream(long pos)
throws SQLException
- Specified by:
setAsciiStream in interface Clob
- Throws:
SQLException
length
public long length()
- Return character length of the Clob. Assume UTF8 encoding.
- Specified by:
length in interface Blob- Specified by:
length in interface Clob- Overrides:
length in class MariaDbBlob
- Returns:
- length of the
BLOB in bytes
Copyright © 2017. All rights reserved.