Package com.mckoi.database.jdbc
Class MClob
- java.lang.Object
-
- com.mckoi.database.jdbc.MClob
-
- All Implemented Interfaces:
java.sql.Clob
class MClob extends java.lang.Object implements java.sql.Clob
An implementation of java.sql.Clob over a java.util.String object.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
str
The string the Clob is based on.
-
Constructor Summary
Constructors Constructor Description MClob(java.lang.String str)
Constructs the Clob implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
free()
java.io.InputStream
getAsciiStream()
java.io.Reader
getCharacterStream()
java.io.Reader
getCharacterStream(long pos, long length)
java.lang.String
getSubString(long pos, int length)
long
length()
long
position(java.lang.String searchstr, long start)
long
position(java.sql.Clob searchstr, long start)
java.io.OutputStream
setAsciiStream(long pos)
java.io.Writer
setCharacterStream(long pos)
int
setString(long pos, java.lang.String str)
int
setString(long pos, java.lang.String str, int offset, int len)
void
truncate(long len)
-
-
-
Method Detail
-
length
public long length() throws java.sql.SQLException
- Specified by:
length
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
getSubString
public java.lang.String getSubString(long pos, int length) throws java.sql.SQLException
- Specified by:
getSubString
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
getCharacterStream
public java.io.Reader getCharacterStream() throws java.sql.SQLException
- Specified by:
getCharacterStream
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
getAsciiStream
public java.io.InputStream getAsciiStream() throws java.sql.SQLException
- Specified by:
getAsciiStream
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
position
public long position(java.lang.String searchstr, long start) throws java.sql.SQLException
- Specified by:
position
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
position
public long position(java.sql.Clob searchstr, long start) throws java.sql.SQLException
- Specified by:
position
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
setString
public int setString(long pos, java.lang.String str) throws java.sql.SQLException
- Specified by:
setString
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
setString
public int setString(long pos, java.lang.String str, int offset, int len) throws java.sql.SQLException
- Specified by:
setString
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
setAsciiStream
public java.io.OutputStream setAsciiStream(long pos) throws java.sql.SQLException
- Specified by:
setAsciiStream
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
setCharacterStream
public java.io.Writer setCharacterStream(long pos) throws java.sql.SQLException
- Specified by:
setCharacterStream
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
truncate
public void truncate(long len) throws java.sql.SQLException
- Specified by:
truncate
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
free
public void free() throws java.sql.SQLException
- Specified by:
free
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
getCharacterStream
public java.io.Reader getCharacterStream(long pos, long length) throws java.sql.SQLException
- Specified by:
getCharacterStream
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
-