Package com.mckoi.database.jdbc
Class MStreamableClob
- java.lang.Object
-
- com.mckoi.database.jdbc.AbstractStreamableObject
-
- com.mckoi.database.jdbc.MStreamableClob
-
- All Implemented Interfaces:
java.sql.Clob
class MStreamableClob extends AbstractStreamableObject implements java.sql.Clob
A Clob that is a large object that may be streamed from the server directly to this object. A clob that is streamable is only alive for the lifetime of the result set it is part of. If the underlying result set that contains this streamable clob is closed then this clob is no longer valid.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.mckoi.database.jdbc.AbstractStreamableObject
AbstractStreamableObject.StreamableObjectInputStream
-
-
Field Summary
-
Fields inherited from class com.mckoi.database.jdbc.AbstractStreamableObject
connection, result_set_id
-
-
Constructor Summary
Constructors Constructor Description MStreamableClob(MConnection connection, int result_set_id, byte type, long streamable_object_id, long size)Constructs the Clob.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfree()java.io.InputStreamgetAsciiStream()java.io.ReadergetCharacterStream()java.io.ReadergetCharacterStream(long pos, long length)java.lang.StringgetSubString(long pos, int length)longlength()longposition(java.lang.String searchstr, long start)longposition(java.sql.Clob searchstr, long start)java.io.OutputStreamsetAsciiStream(long pos)java.io.WritersetCharacterStream(long pos)intsetString(long pos, java.lang.String str)intsetString(long pos, java.lang.String str, int offset, int len)voidtruncate(long len)-
Methods inherited from class com.mckoi.database.jdbc.AbstractStreamableObject
getStreamableId, getType, rawSize
-
-
-
-
Constructor Detail
-
MStreamableClob
MStreamableClob(MConnection connection, int result_set_id, byte type, long streamable_object_id, long size)
Constructs the Clob.
-
-
Method Detail
-
length
public long length() throws java.sql.SQLException- Specified by:
lengthin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
getSubString
public java.lang.String getSubString(long pos, int length) throws java.sql.SQLException- Specified by:
getSubStringin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
getCharacterStream
public java.io.Reader getCharacterStream() throws java.sql.SQLException- Specified by:
getCharacterStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
getAsciiStream
public java.io.InputStream getAsciiStream() throws java.sql.SQLException- Specified by:
getAsciiStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
position
public long position(java.lang.String searchstr, long start) throws java.sql.SQLException- Specified by:
positionin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
position
public long position(java.sql.Clob searchstr, long start) throws java.sql.SQLException- Specified by:
positionin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
setString
public int setString(long pos, java.lang.String str) throws java.sql.SQLException- Specified by:
setStringin 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:
setStringin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
setAsciiStream
public java.io.OutputStream setAsciiStream(long pos) throws java.sql.SQLException- Specified by:
setAsciiStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
setCharacterStream
public java.io.Writer setCharacterStream(long pos) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
truncate
public void truncate(long len) throws java.sql.SQLException- Specified by:
truncatein interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
free
public void free() throws java.sql.SQLException- Specified by:
freein interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
getCharacterStream
public java.io.Reader getCharacterStream(long pos, long length) throws java.sql.SQLException- Specified by:
getCharacterStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
-