com.ibm.ims.rds
Class ClientClob
java.lang.Object
|
+--com.ibm.ims.rds.ClientClob
- All Implemented Interfaces:
- java.sql.Clob
- public class ClientClob
- extends java.lang.Object
- implements java.sql.Clob
Constructor Summary |
ClientClob(int statementID,
int index,
boolean isBeanManaged,
javax.ejb.EJBObject remoteInterface,
java.io.PrintWriter logWriter,
int traceLevel)
|
Method Summary |
java.io.InputStream |
getAsciiStream()
|
java.io.Reader |
getCharacterStream()
|
java.lang.String |
getSubString(long pos,
int length)
|
long |
length()
|
long |
position(java.sql.Clob searchstr,
long start)
|
long |
position(java.lang.String searchstr,
long start)
|
java.io.OutputStream |
setAsciiStream(long pos)
Retrieves a stream to be used to write Ascii characters to the
CLOB value that this Clob object represents,
starting at position pos . |
java.io.Writer |
setCharacterStream(long pos)
Retrieves a stream to be used to write a stream of Unicode characters
to the CLOB value that this Clob object
represents, at position pos . |
int |
setString(long pos,
java.lang.String str)
Writes the given Java String to the CLOB
value that this Clob object designates at the position
pos . |
int |
setString(long pos,
java.lang.String str,
int offset,
int len)
Writes len characters of str , starting
at character offset , to the CLOB value
that this Clob represents. |
void |
truncate(long len)
Truncates the CLOB value that this Clob
designates to have a length of len
characters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClientClob
public ClientClob(int statementID,
int index,
boolean isBeanManaged,
javax.ejb.EJBObject remoteInterface,
java.io.PrintWriter logWriter,
int traceLevel)
length
public long length()
throws java.sql.SQLException
- Specified by:
length
in interface java.sql.Clob
getSubString
public java.lang.String getSubString(long pos,
int length)
throws java.sql.SQLException
- Specified by:
getSubString
in interface java.sql.Clob
getCharacterStream
public java.io.Reader getCharacterStream()
throws java.sql.SQLException
- Specified by:
getCharacterStream
in interface java.sql.Clob
getAsciiStream
public java.io.InputStream getAsciiStream()
throws java.sql.SQLException
- Specified by:
getAsciiStream
in interface java.sql.Clob
position
public long position(java.lang.String searchstr,
long start)
throws java.sql.SQLException
- Specified by:
position
in interface java.sql.Clob
position
public long position(java.sql.Clob searchstr,
long start)
throws java.sql.SQLException
- Specified by:
position
in interface java.sql.Clob
setString
public int setString(long pos,
java.lang.String str)
throws java.sql.SQLException
- Writes the given Java
String
to the CLOB
value that this Clob
object designates at the position
pos
.
- Parameters:
pos
- the position at which to start writing to the CLOB
value that this Clob
object representsstr
- the string to be written to the CLOB
value that this Clob
designates- Returns:
- the number of characters written
- Throws:
java.sql.SQLException
- if there is an error accessing the
CLOB
value- Since:
- 1.4
setString
public int setString(long pos,
java.lang.String str,
int offset,
int len)
throws java.sql.SQLException
- Writes
len
characters of str
, starting
at character offset
, to the CLOB
value
that this Clob
represents.
- Parameters:
pos
- the position at which to start writing to this
CLOB
objectstr
- the string to be written to the CLOB
value that this Clob
object representsoffset
- the offset into str
to start reading
the characters to be writtenlen
- the number of characters to be written- Returns:
- the number of characters written
- Throws:
java.sql.SQLException
- if there is an error accessing the
CLOB
value- Since:
- 1.4
setAsciiStream
public java.io.OutputStream setAsciiStream(long pos)
throws java.sql.SQLException
- Retrieves a stream to be used to write Ascii characters to the
CLOB
value that this Clob
object represents,
starting at position pos
.
- Parameters:
pos
- the position at which to start writing to this
CLOB
object- Returns:
- the stream to which ASCII encoded characters can be written
- Throws:
java.sql.SQLException
- if there is an error accessing the
CLOB
value- Since:
- 1.4
- See Also:
getAsciiStream()
setCharacterStream
public java.io.Writer setCharacterStream(long pos)
throws java.sql.SQLException
- Retrieves a stream to be used to write a stream of Unicode characters
to the
CLOB
value that this Clob
object
represents, at position pos
.
- Parameters:
pos
- the position at which to start writing to the
CLOB
value- Returns:
- a stream to which Unicode encoded characters can be written
- Throws:
java.sql.SQLException
- if there is an error accessing the
CLOB
value- Since:
- 1.4
- See Also:
getCharacterStream()
truncate
public void truncate(long len)
throws java.sql.SQLException
- Truncates the
CLOB
value that this Clob
designates to have a length of len
characters.
- Parameters:
len
- the length, in bytes, to which the CLOB
value
should be truncated- Throws:
java.sql.SQLException
- if there is an error accessing the
CLOB
value- Since:
- 1.4
(C) International Business Machines Corporation 2004. All rights reserved.