com.mockrunner.mock.jdbc
Class MockClob

java.lang.Object
  extended bycom.mockrunner.mock.jdbc.MockClob
All Implemented Interfaces:
java.sql.Clob, java.lang.Cloneable

public class MockClob
extends java.lang.Object
implements java.sql.Clob, java.lang.Cloneable

Mock implementation of Clob.


Constructor Summary
MockClob(java.lang.String data)
           
 
Method Summary
 java.lang.Object clone()
           
 java.io.InputStream getAsciiStream()
           
 java.io.Reader getCharacterStream()
           
 java.lang.String getSubString(long pos, int length)
           
 long length()
           
 long position(java.sql.Clob searchClob, long start)
           
 long position(java.lang.String 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)
           
 java.lang.String toString()
           
 void truncate(long len)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockClob

public MockClob(java.lang.String data)
Method Detail

length

public long length()
            throws java.sql.SQLException
Specified by:
length in interface java.sql.Clob
Throws:
java.sql.SQLException

truncate

public void truncate(long len)
              throws java.sql.SQLException
Specified by:
truncate in interface java.sql.Clob
Throws:
java.sql.SQLException

getAsciiStream

public java.io.InputStream getAsciiStream()
                                   throws java.sql.SQLException
Specified by:
getAsciiStream in interface java.sql.Clob
Throws:
java.sql.SQLException

setAsciiStream

public java.io.OutputStream setAsciiStream(long pos)
                                    throws java.sql.SQLException
Specified by:
setAsciiStream in interface java.sql.Clob
Throws:
java.sql.SQLException

getCharacterStream

public java.io.Reader getCharacterStream()
                                  throws java.sql.SQLException
Specified by:
getCharacterStream in interface java.sql.Clob
Throws:
java.sql.SQLException

setCharacterStream

public java.io.Writer setCharacterStream(long pos)
                                  throws java.sql.SQLException
Specified by:
setCharacterStream in interface java.sql.Clob
Throws:
java.sql.SQLException

getSubString

public java.lang.String getSubString(long pos,
                                     int length)
                              throws java.sql.SQLException
Specified by:
getSubString in interface java.sql.Clob
Throws:
java.sql.SQLException

setString

public int setString(long pos,
                     java.lang.String str)
              throws java.sql.SQLException
Specified by:
setString in interface java.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 interface java.sql.Clob
Throws:
java.sql.SQLException

position

public long position(java.lang.String searchstr,
                     long start)
              throws java.sql.SQLException
Specified by:
position in interface java.sql.Clob
Throws:
java.sql.SQLException

position

public long position(java.sql.Clob searchClob,
                     long start)
              throws java.sql.SQLException
Specified by:
position in interface java.sql.Clob
Throws:
java.sql.SQLException

toString

public java.lang.String toString()

clone

public java.lang.Object clone()