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.ClobThis 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 voidfree()Not implemented.java.io.InputStreamgetAsciiStream()java.io.ReadergetCharacterStream()java.io.ReadergetCharacterStream(long pos, long length)Not implemented.java.lang.StringgetSubString(long pos, int length)longlength()longposition(java.lang.String searchstr, long start)Not implemented, I guess it is not needed for writing CLOB.longposition(java.sql.Clob searchstr, long start)Not implemented, I guess it is not needed for writing CLOB.java.io.OutputStreamsetAsciiStream(long pos)Not implemented.java.io.WritersetCharacterStream(long pos)Not implemented.intsetString(long pos, java.lang.String str)Not implemented.intsetString(long pos, java.lang.String str, int offset, int len)Not implemented.voidtruncate(long len)Not implemented.
-
-
-
Method Detail
-
getAsciiStream
public java.io.InputStream getAsciiStream()
- Specified by:
getAsciiStreamin interfacejava.sql.Clob
-
getCharacterStream
public java.io.Reader getCharacterStream()
- Specified by:
getCharacterStreamin interfacejava.sql.Clob
-
length
public long length()
- Specified by:
lengthin interfacejava.sql.Clob
-
getSubString
public java.lang.String getSubString(long pos, int length) throws java.sql.SQLException- Specified by:
getSubStringin 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:
positionin 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:
positionin interfacejava.sql.Clob
-
setAsciiStream
public java.io.OutputStream setAsciiStream(long pos) throws java.sql.SQLExceptionNot implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- Specified by:
setAsciiStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
setCharacterStream
public java.io.Writer setCharacterStream(long pos) throws java.sql.SQLExceptionNot implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- Specified by:
setCharacterStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
setString
public int setString(long pos, java.lang.String str) throws java.sql.SQLExceptionNot implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- 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.SQLExceptionNot implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- Specified by:
setStringin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
truncate
public void truncate(long len) throws java.sql.SQLExceptionNot implemented. Added to make ClobImpl compliant with JDBC 3.0, which is a part of JDK1.4.- Specified by:
truncatein 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:
getCharacterStreamin 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:
freein interfacejava.sql.Clob
-
-