Package org.exolab.castor.jdo.engine
Class ClobImpl
- java.lang.Object
-
- org.exolab.castor.jdo.engine.ClobImpl
-
- All Implemented Interfaces:
java.sql.Clob
public class ClobImpl extends java.lang.Object implements java.sql.Clob
This is an implementation of java.sql.Clob interface that is constructed from java.io.Reader, in needs information about the length of the stream (which is not provided by java.io.Reader interface).It is useful for setting CLOB values in the database.
Note: This implementation does not attempt to implement features of JDBC3 or JDBC4.
- Version:
- $Revision: 7121 $
- Author:
- Oleg Nitz, Adam Esterline
-
-
Constructor Summary
Constructors Constructor Description ClobImpl(java.io.Reader reader, long length)
Construct an ClobImpl instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
free()
Not implemented.java.io.InputStream
getAsciiStream()
java.io.Reader
getCharacterStream()
java.io.Reader
getCharacterStream(long pos, long length)
Not implemented.java.lang.String
getSubString(long pos, int length)
long
length()
long
position(java.lang.String searchstr, long start)
Not implemented, I guess it is not needed for writing CLOB.long
position(java.sql.Clob searchstr, long start)
Not implemented, I guess it is not needed for writing CLOB.java.io.OutputStream
setAsciiStream(long pos)
Not implemented.java.io.Writer
setCharacterStream(long pos)
Not implemented.int
setString(long pos, java.lang.String str)
Not implemented.int
setString(long pos, java.lang.String str, int offset, int len)
Not implemented.void
truncate(long len)
Not implemented.
-
-
-
Method Detail
-
getAsciiStream
public java.io.InputStream getAsciiStream()
- Specified by:
getAsciiStream
in interfacejava.sql.Clob
-
getCharacterStream
public java.io.Reader getCharacterStream()
- Specified by:
getCharacterStream
in interfacejava.sql.Clob
-
length
public long length()
- Specified by:
length
in interfacejava.sql.Clob
-
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
-
position
public long position(java.sql.Clob searchstr, long start)
Not implemented, I guess it is not needed for writing CLOB.- Specified by:
position
in interfacejava.sql.Clob
-
position
public long position(java.lang.String searchstr, long start)
Not implemented, I guess it is not needed for writing CLOB.- Specified by:
position
in interfacejava.sql.Clob
-
setAsciiStream
public java.io.OutputStream setAsciiStream(long pos) throws java.sql.SQLException
Not implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- Specified by:
setAsciiStream
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
setCharacterStream
public java.io.Writer setCharacterStream(long pos) throws java.sql.SQLException
Not implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- Specified by:
setCharacterStream
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
setString
public int setString(long pos, java.lang.String str) throws java.sql.SQLException
Not implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- 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
Not implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- Specified by:
setString
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
truncate
public void truncate(long len) throws java.sql.SQLException
Not implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- Specified by:
truncate
in interfacejava.sql.Clob
- Throws:
java.sql.SQLException
-
getCharacterStream
public java.io.Reader getCharacterStream(long pos, long length)
Not implemented. Added to make ClobImpl compliant with JDBC 4.0, which is a part of JDK6.- Specified by:
getCharacterStream
in interfacejava.sql.Clob
-
free
public void free()
Not implemented. Added to make ClobImpl compliant with JDBC 4.0, which is a part of JDK6.- Specified by:
free
in interfacejava.sql.Clob
-
-