public class IfxCblob
extends IfxLob
implements java.sql.NClob, java.sql.Clob
By default, a CLOB is a transaction duration reference to a character large object.
| Modifier | Constructor and Description |
|---|---|
|
IfxCblob()
Creates an IfxCblob instance.
|
|
IfxCblob(java.sql.Connection c,
byte[] buffer)
Creates an IfxCblob instance with the given connection and a buffer
containing data.
|
|
IfxCblob(java.sql.Connection conn,
java.io.InputStream fin,
int length)
Creates an IfxCblob instance with a given connection, an inputStream
and number of bytes to write.
|
|
IfxCblob(java.sql.Connection conn,
java.io.InputStream fin,
int length,
IfxLobDescriptor loDesc)
Creates an IfxCblob instance with a given connection, an inputStream,
number of bytes to write and a specified lob descriptor.
|
|
IfxCblob(java.sql.Connection conn,
java.io.InputStream fin,
int length,
java.lang.String sbspaceName)
Creates an IfxCblob instance with a given connection, an inputStream
and number of bytes to write to a specified smart blob space.
|
|
IfxCblob(java.sql.Connection conn,
java.lang.String str)
Creates an IfxCblob instance with a given connection and a string
of data.
|
|
IfxCblob(java.sql.Connection conn,
java.lang.String str,
IfxLobDescriptor loDesc)
Creates an IfxCblob instance with a given connection and a string
of data and a specified lob descriptor.
|
|
IfxCblob(java.sql.Connection conn,
java.lang.String str,
java.lang.String sbspaceName)
Creates an IfxCblob instance with a given connection and a string
of data and a specified smart blob space.
|
|
IfxCblob(IfxConnection con) |
|
IfxCblob(IfxConnection connection,
IfxLocator locator)
Creates an IfxCblob instance with a given connection and a locator.
|
|
IfxCblob(IfxConnection connection,
IfxLocator locator,
int mode)
Creates an IfxCblob instance with a given connection and a locator.
|
|
IfxCblob(IfxLocator locator)
Creates an IfxCblob instance with the given locator.
|
protected |
IfxCblob(IfxTmpFile tempFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
free() |
java.io.InputStream |
getAsciiStream()
Gets the smart large object contents as an ASCII stream.
|
java.io.Reader |
getCharacterStream()
Gets the smart large object contents as a Unicode stream.
|
java.io.Reader |
getCharacterStream(long pos,
long length) |
java.lang.String |
getSubString(long position,
int length) |
long |
length() |
long |
position(java.sql.Clob searchstr,
long start)
Determines the character position at which the given substring occurs.
|
long |
position(java.lang.String searchstr,
long start)
Determines the character position at which the given substring occurs.
|
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.
|
void |
setAsciiStream(long position,
java.io.InputStream fin,
int length)
Writes ascii stream of data from an InputStream to an already existing
smart large blob object.
|
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 |
setSubString(long position,
java.lang.String str,
int length)
Writes data from a string to an already existing
smart large blob object.
|
public IfxCblob()
public IfxCblob(IfxLocator locator)
locator - The locator that references the smart large objectpublic IfxCblob(IfxConnection con)
throws java.sql.SQLException
java.sql.SQLExceptionpublic IfxCblob(IfxConnection connection,
IfxLocator locator,
int mode)
throws java.sql.SQLException
connection - The IfxConnection objectlocator - The locator that references the smart large objectjava.sql.SQLExceptionpublic IfxCblob(IfxConnection connection,
IfxLocator locator)
throws java.sql.SQLException
connection - The IfxConnection objectlocator - The locator that references the smart large objectjava.sql.SQLExceptionpublic IfxCblob(java.sql.Connection c,
byte[] buffer)
throws java.sql.SQLException
conn - the Connection objectbuffer - the data bufferjava.sql.SQLException - if object instance cannot be instantiatedprotected IfxCblob(IfxTmpFile tempFile)
public IfxCblob(java.sql.Connection conn,
java.io.InputStream fin,
int length)
throws java.sql.SQLException
conn - The IfxConnection object.fin - The input stream from which the data will be written into
the smart large object.length - Number of bytes to be written.java.sql.SQLException - if object instance cannot be instantiated.public IfxCblob(java.sql.Connection conn,
java.io.InputStream fin,
int length,
java.lang.String sbspaceName)
throws java.sql.SQLException
conn - The IfxConnection object.fin - The input stream from which the data will be written into
the smart large object.length - Number of bytes to be written.sbspaceName - specified smart blob space name.java.sql.SQLException - if object instance cannot be instantiated.public IfxCblob(java.sql.Connection conn,
java.io.InputStream fin,
int length,
IfxLobDescriptor loDesc)
throws java.sql.SQLException
conn - The IfxConnection object.fin - The input stream from which the data will be written into
the smart large object.length - Number of bytes to be written.loDesc - user created lob descriptor.java.sql.SQLException - if object instance cannot be instantiated.public IfxCblob(java.sql.Connection conn,
java.lang.String str)
throws java.sql.SQLException
conn - The IfxConnection object.str - The String from which the data will be written to smart blob.java.sql.SQLException - if object instance cannot be instantiated.public IfxCblob(java.sql.Connection conn,
java.lang.String str,
java.lang.String sbspaceName)
throws java.sql.SQLException
conn - The IfxConnection object.str - The String from which the data will be written to smart blob.sbspaceName - specified smart blob space name.java.sql.SQLException - if object instance cannot be instantiated.public IfxCblob(java.sql.Connection conn,
java.lang.String str,
IfxLobDescriptor loDesc)
throws java.sql.SQLException
conn - The IfxConnection object.str - The string from which the data will be written to smart blob.loDesc - user defined lob descriptor.java.sql.SQLException - if object instance cannot be instantiated.public long length()
throws java.sql.SQLException
length in interface java.sql.Clobjava.sql.SQLExceptionpublic java.lang.String getSubString(long position,
int length)
throws java.sql.SQLException
getSubString in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.Reader getCharacterStream()
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.Reader getCharacterStream(long pos,
long length)
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.InputStream getAsciiStream()
throws java.sql.SQLException
getAsciiStream in interface java.sql.Clobjava.sql.SQLException - if there is a problem getting the stream.public long position(java.lang.String searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobsearchstr - The substring for which you want to search.start - The position at which searching begins.java.sql.SQLException - if the string cannot be read or the the index
is out of bounds.public long position(java.sql.Clob searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobsearchstr - The substring for which you want to search.start - The position at which searching begins.java.sql.SQLException - if there is an error accessing the CLOBpublic void setAsciiStream(long position,
java.io.InputStream fin,
int length)
throws java.sql.SQLException
postion - Position at which smart large object will be written.fin - InputStreamlength - Number of bytes to be written from the input stream.java.sql.SQLException - if the type is not a CLOB, the large object
is invalid or the large object cannot be opened.public void setSubString(long position,
java.lang.String str,
int length)
throws java.sql.SQLException
postion - Position at which smart large object will be written.str - The string which the data will be written.length - Number of bytes to be written into smart large object.java.sql.SQLException - if the type is not a CLOB, the large object
is invalid or the large object cannot be opened.public int setString(long pos,
java.lang.String str)
throws java.sql.SQLException
setString in interface java.sql.Clobstr - 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
setString in interface java.sql.Clobpos - 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.SQLExceptionpublic java.io.OutputStream setAsciiStream(long pos)
throws java.sql.SQLException
setAsciiStream in interface java.sql.Clobpos - the position at which to start writing to this CLOB objectjava.sql.SQLException - if there is an error accessing the CLOB valuepublic java.io.Writer setCharacterStream(long pos)
throws java.sql.SQLException
setCharacterStream in interface java.sql.Clobpos - the position at which to start writing to the CLOB valuejava.sql.SQLException - if there is an error accessing the CLOB valuepublic void free()
throws java.sql.SQLException
free in interface java.sql.Clobjava.sql.SQLException