com.metamatrix.common.types
Class ClobType
java.lang.Object
com.metamatrix.common.types.Streamable<java.sql.Clob>
com.metamatrix.common.types.ClobType
- All Implemented Interfaces:
- Sequencable, java.io.Serializable, java.sql.Clob
public final class ClobType
- extends Streamable<java.sql.Clob>
- implements java.sql.Clob, Sequencable
This is wrapper on top of a "clob" object, which implements the "java.sql.Clob"
interface. This class also implements the Streamable interface
- See Also:
- Serialized Form
Constructor Summary |
ClobType(java.sql.Clob clob)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ClobType
public ClobType(java.sql.Clob clob)
getAsciiStream
public java.io.InputStream getAsciiStream()
throws java.sql.SQLException
- Specified by:
getAsciiStream
in interface java.sql.Clob
- Throws:
java.sql.SQLException
- See Also:
Clob.getAsciiStream()
getCharacterStream
public java.io.Reader getCharacterStream()
throws java.sql.SQLException
- Specified by:
getCharacterStream
in interface java.sql.Clob
- Throws:
java.sql.SQLException
- See Also:
Clob.getCharacterStream()
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
- See Also:
Clob.getSubString(long, int)
length
public long length()
throws java.sql.SQLException
- Specified by:
length
in interface java.sql.Clob
- Throws:
java.sql.SQLException
- See Also:
Clob.length()
position
public long position(java.sql.Clob searchstr,
long start)
throws java.sql.SQLException
- Specified by:
position
in interface java.sql.Clob
- Throws:
java.sql.SQLException
- See Also:
Clob.position(java.sql.Clob, long)
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
- See Also:
Clob.position(java.lang.String, long)
setAsciiStream
public java.io.OutputStream setAsciiStream(long pos)
throws java.sql.SQLException
- Specified by:
setAsciiStream
in interface java.sql.Clob
- Throws:
java.sql.SQLException
- See Also:
Clob.setAsciiStream(long)
setCharacterStream
public java.io.Writer setCharacterStream(long pos)
throws java.sql.SQLException
- Specified by:
setCharacterStream
in interface java.sql.Clob
- Throws:
java.sql.SQLException
- See Also:
Clob.setCharacterStream(long)
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
- See Also:
Clob.setString(long, java.lang.String, int, int)
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
- See Also:
Clob.setString(long, java.lang.String)
truncate
public void truncate(long len)
throws java.sql.SQLException
- Specified by:
truncate
in interface java.sql.Clob
- Throws:
java.sql.SQLException
- See Also:
Clob.truncate(long)
getString
public static java.lang.String getString(java.sql.Clob clob)
throws java.sql.SQLException,
java.io.IOException
- Utility method to convert to String
- Parameters:
clob
-
- Returns:
- string form of the clob passed.
- Throws:
java.sql.SQLException
java.io.IOException
getCharSequence
public java.lang.CharSequence getCharSequence()
- Specified by:
getCharSequence
in interface Sequencable
free
public void free()
throws java.sql.SQLException
- Specified by:
free
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
createClob
public static javax.sql.rowset.serial.SerialClob createClob(char[] chars)
Copyright © 2009. All Rights Reserved.