com.mockrunner.mock.jdbc
Class MockClob
java.lang.Object
com.mockrunner.mock.jdbc.MockClob
- All Implemented Interfaces:
- java.lang.Cloneable, java.sql.Clob
- Direct Known Subclasses:
- MockNClob
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)
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
MockClob
public MockClob(java.lang.String data)
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
getCharacterStream
public java.io.Reader getCharacterStream(long pos,
long length)
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
free
public void free()
throws java.sql.SQLException
- Specified by:
free
in interface java.sql.Clob
- Throws:
java.sql.SQLException
wasFreeCalled
public boolean wasFreeCalled()
- Returns if
free()
has been called.
- Returns:
true
if free()
has been called,
false
otherwise
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object