|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ims.xms.XMSMaterializer
Implements the CLOB interface, and is returned from a JDBC SELECT query.
Field Summary | |
protected DLIConnection |
dliConnection
|
byte[] |
kfba
|
protected boolean |
open
|
java.lang.String |
pcbAlias
|
java.lang.String |
rootSegmentName
|
protected boolean |
validate
|
protected XMSGrammarPool |
xmsGrammarPool
|
Constructor Summary | |
XMSMaterializer(byte[] kfba,
java.lang.String rootSegmentName,
java.lang.String pcbAlias,
DLIConnection dliConnection,
XMSGrammarPool xmsGrammarPool,
boolean validate)
Creates a XMSMaterializer object used for retrieval from a DLI database. |
Method Summary | |
void |
close()
Closes the XMSMaterializer. |
java.io.InputStream |
getAsciiStream()
Implements the Clob.getAsciiStream() method. |
java.io.Reader |
getCharacterStream()
Implements the Clob.getCharacterStream() method. |
char[] |
getMaterializedCharArray()
Used internally for cacheing the char array during SCROLL_INSENSITIVE ResultSets. |
java.lang.String |
getSubString(long pos,
int length)
Returns a String from pos of size length. |
long |
length()
Implements the Clob.length() method. |
long |
position(java.sql.Clob searchstr,
long start)
Determines the character position at which the specified Clob object searchstr appears in this
Clob object. |
long |
position(java.lang.String searchstr,
long start)
Determines the character position at which the specified substring searchstr appears in the SQL CLOB value
represented by this Clob object. |
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 |
Field Detail |
public byte[] kfba
public java.lang.String rootSegmentName
public java.lang.String pcbAlias
protected boolean validate
protected DLIConnection dliConnection
protected XMSGrammarPool xmsGrammarPool
protected boolean open
Constructor Detail |
public XMSMaterializer(byte[] kfba, java.lang.String rootSegmentName, java.lang.String pcbAlias, DLIConnection dliConnection, XMSGrammarPool xmsGrammarPool, boolean validate)
Method Detail |
public long length() throws java.sql.SQLException
length
in interface java.sql.Clob
CLOB
in charactersjava.sql.SQLException
- if there is an error accessing thepublic java.lang.String getSubString(long pos, int length) throws java.sql.SQLException
getSubString
in interface java.sql.Clob
pos
- the first character of the substring to be extracted.
The first character is at position 1.length
- the number of consecutive characters to be copiedString
that is the specified substring in
the CLOB
value designated by this Clob
objectjava.sql.SQLException
- if there is an error accessing the
CLOB
public java.io.Reader getCharacterStream() throws java.sql.SQLException
getCharacterStream
in interface java.sql.Clob
CLOB
datajava.sql.SQLException
- if there is an error accessing the
CLOB
valuepublic java.io.InputStream getAsciiStream() throws java.sql.SQLException
getAsciiStream
in interface java.sql.Clob
CLOB
datajava.sql.SQLException
- if there is an error accessing the
CLOB
valuepublic long position(java.lang.String searchstr, long start) throws java.sql.SQLException
searchstr
appears in the SQL CLOB
value
represented by this Clob
object. The search
begins at position start
. All Readers and InputStreams are closed.position
in interface java.sql.Clob
searchstr
- the substring for which to searchstart
- the position at which to begin searching; the first position
is 1java.sql.SQLException
- if there is an error accessing the
CLOB
valuepublic long position(java.sql.Clob searchstr, long start) throws java.sql.SQLException
Clob
object searchstr
appears in this
Clob
object. The search begins at position
start
.position
in interface java.sql.Clob
searchstr
- the Clob
object for which to searchstart
- the position at which to begin searching; the first
position is 1Clob
object appears,
else -1; the first position is 1java.sql.SQLException
- if there is an error accessing the
CLOB
valuepublic int setString(long pos, java.lang.String str) throws java.sql.SQLException
String
to the CLOB
value that this Clob
object designates at the position
pos
.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
designatesjava.sql.SQLException
- if there is an error accessing the
CLOB
valuepublic int setString(long pos, java.lang.String str, int offset, int len) throws java.sql.SQLException
len
characters of str
, starting
at character offset
, to the CLOB
value
that this Clob
represents.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 writtenjava.sql.SQLException
- if there is an error accessing the
CLOB
valuepublic java.io.OutputStream setAsciiStream(long pos) throws java.sql.SQLException
CLOB
value that this Clob
object represents,
starting at position pos
.pos
- the position at which to start writing to this
CLOB
objectjava.sql.SQLException
- if there is an error accessing the
CLOB
valuegetAsciiStream()
public java.io.Writer setCharacterStream(long pos) throws java.sql.SQLException
CLOB
value that this Clob
object
represents, at position pos
.pos
- the position at which to start writing to the
CLOB
valuejava.sql.SQLException
- if there is an error accessing the
CLOB
valuegetCharacterStream()
public void truncate(long len) throws java.sql.SQLException
CLOB
value that this Clob
designates to have a length of len
characters.len
- the length, in bytes, to which the CLOB
value
should be truncatedjava.sql.SQLException
- if there is an error accessing the
CLOB
valuepublic char[] getMaterializedCharArray() throws java.sql.SQLException
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |