public class IfxCblob
extends java.lang.Object
implements java.sql.NClob, java.sql.Clob
By default, a CLOB is a transaction duration reference to a character large object.
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
blobBuffer |
protected java.lang.String |
BlobFileName |
protected long |
blobSize |
protected java.io.InputStream |
blobStream |
protected com.informix.jdbc.IfxConnection |
conn |
protected short |
ifxType |
protected boolean |
isBlob_loaded |
protected IfxLocator |
locatorPointer |
protected static short |
MODE_CLIENT_ONLY |
protected static short |
MODE_READ_WRITE |
protected static short |
MODE_RW_BUFF |
protected int |
smartBlobMode |
protected IfxSmartBlob |
smb |
protected com.informix.jdbc.IfxTmpFile |
tempBlobFile |
protected static short |
TYPE_IS_BLOB |
protected static short |
TYPE_IS_CLOB |
| Modifier | Constructor and Description |
|---|---|
|
IfxCblob()
Creates an IfxCblob instance.
|
protected |
IfxCblob(byte[] buffer)
Creates an IfxCblob instance with the given byte[].
|
|
IfxCblob(java.sql.Connection c,
byte[] buffer)
Creates an IfxCblob instance with the given connection and a buffer
containing data.
|
|
IfxCblob(java.sql.Connection connection,
IfxLocator locator)
Creates an IfxCblob instance with a given connection and a locator.
|
|
IfxCblob(java.sql.Connection connection,
IfxLocator locator,
int mode) |
|
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(com.informix.jdbc.IfxConnection con) |
|
IfxCblob(com.informix.jdbc.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(com.informix.jdbc.IfxTmpFile tempFile) |
|
IfxCblob(java.io.InputStream fin)
Creates an IfxCblob instance with the given input stream.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIfFreed() |
void |
close() |
com.informix.jdbc.IfxLob |
disableFinalize(boolean arg0) |
void |
free() |
protected byte[] |
getAll() |
java.io.InputStream |
getAsciiStream()
Gets the smart large object contents as an ASCII stream.
|
java.io.InputStream |
getBinaryStream(long arg0,
long arg1) |
protected byte[] |
getBytes() |
java.io.Reader |
getCharacterStream()
Gets the smart large object contents as a Unicode stream.
|
java.io.Reader |
getCharacterStream(long pos,
long length) |
protected short |
getIfxLobType() |
IfxLocator |
getLocator() |
IfxLoStat |
getLoStat() |
protected byte[] |
getPortion(long arg0,
long arg1) |
protected byte[] |
getPortion(long arg0,
long arg1,
long arg2) |
protected java.io.InputStream |
getStream() |
protected java.io.InputStream |
getStream(long arg0,
long arg1) |
protected java.io.InputStream |
getStreamImd() |
java.lang.String |
getSubString(long position,
int length) |
long |
length() |
protected void |
loadSmBlob() |
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.
|
long |
seek(long arg0,
int arg1) |
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.
|
protected int |
setBuffer(byte[] arg0) |
protected int |
setBuffer(byte[] arg0,
int arg1,
int arg2) |
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.
|
protected void |
setConnection(com.informix.jdbc.IfxConnection arg0) |
protected void |
setIfxLobType(short arg0) |
protected void |
setLoadFlag() |
protected void |
setLocator(IfxLocator arg0) |
protected void |
setMode(int arg0) |
protected void |
setSize(long arg0) |
protected void |
setStream(java.io.InputStream arg0,
int arg1) |
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 arg0) |
void |
upgradeToWriteLock() |
protected void |
verifySmbMode() |
protected void |
verifySmbMode(boolean arg0) |
long |
where() |
protected static final short TYPE_IS_BLOB
protected static final short TYPE_IS_CLOB
protected static final short MODE_READ_WRITE
protected static final short MODE_RW_BUFF
protected static final short MODE_CLIENT_ONLY
protected IfxSmartBlob smb
protected IfxLocator locatorPointer
protected com.informix.jdbc.IfxConnection conn
protected boolean isBlob_loaded
protected com.informix.jdbc.IfxTmpFile tempBlobFile
protected java.io.InputStream blobStream
protected byte[] blobBuffer
protected java.lang.String BlobFileName
protected long blobSize
protected short ifxType
protected int smartBlobMode
public IfxCblob()
public IfxCblob(IfxLocator locator)
locator - The locator that references the smart large objectpublic IfxCblob(com.informix.jdbc.IfxConnection con)
throws java.sql.SQLException
java.sql.SQLExceptionpublic IfxCblob(com.informix.jdbc.IfxConnection connection,
IfxLocator locator,
int mode)
throws java.sql.SQLException
connection - The IfxConnection objectlocator - The locator that references the smart large objectmode - Mode from com.informix.jdbc.IfxLobjava.sql.SQLException - if there is a database access errorpublic IfxCblob(java.sql.Connection connection,
IfxLocator locator)
throws java.sql.SQLException
connection - The IfxConnection objectlocator - The locator that references the smart large objectjava.sql.SQLException - if there is a database access errorpublic IfxCblob(java.sql.Connection connection,
IfxLocator locator,
int mode)
throws java.sql.SQLException
java.sql.SQLExceptionprotected IfxCblob(byte[] buffer)
buffer - The data bufferpublic IfxCblob(java.sql.Connection c,
byte[] buffer)
throws java.sql.SQLException
c - the Connection objectbuffer - the data bufferjava.sql.SQLException - if object instance cannot be instantiatedpublic IfxCblob(java.io.InputStream fin)
fin - The input stream for this smart large objectprotected IfxCblob(com.informix.jdbc.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
position - 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 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.SQLException - if there is an error accessing smart large objectpublic 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.SQLExceptionpublic IfxLocator getLocator() throws java.sql.SQLException
java.sql.SQLExceptionprotected void setLocator(IfxLocator arg0) throws java.sql.SQLException
java.sql.SQLExceptionprotected void setIfxLobType(short arg0)
protected void setSize(long arg0)
protected void setConnection(com.informix.jdbc.IfxConnection arg0)
protected void setLoadFlag()
protected short getIfxLobType()
protected void setMode(int arg0)
protected byte[] getBytes()
throws java.sql.SQLException
java.sql.SQLExceptionprotected byte[] getPortion(long arg0,
long arg1)
throws java.sql.SQLException
java.sql.SQLExceptionprotected byte[] getAll()
throws java.sql.SQLException
java.sql.SQLExceptionprotected byte[] getPortion(long arg0,
long arg1,
long arg2)
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.io.InputStream getStreamImd()
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.io.InputStream getStream()
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.io.InputStream getStream(long arg0,
long arg1)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getBinaryStream(long arg0,
long arg1)
throws java.sql.SQLException
java.sql.SQLExceptionprotected void setStream(java.io.InputStream arg0,
int arg1)
throws java.sql.SQLException
java.sql.SQLExceptionprotected int setBuffer(byte[] arg0)
throws java.sql.SQLException
java.sql.SQLExceptionprotected int setBuffer(byte[] arg0,
int arg1,
int arg2)
throws java.sql.SQLException
java.sql.SQLExceptionpublic long seek(long arg0,
int arg1)
throws java.sql.SQLException
java.sql.SQLExceptionpublic long where()
throws java.sql.SQLException
java.sql.SQLExceptionpublic IfxLoStat getLoStat() throws java.sql.SQLException
java.sql.SQLExceptionpublic void truncate(long arg0)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
close in interface java.lang.AutoCloseablejava.sql.SQLExceptionprotected void loadSmBlob()
throws java.sql.SQLException
java.sql.SQLExceptionprotected void verifySmbMode()
throws java.sql.SQLException
java.sql.SQLExceptionprotected void verifySmbMode(boolean arg0)
throws java.sql.SQLException
java.sql.SQLExceptionprotected void checkIfFreed()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void upgradeToWriteLock()
throws java.sql.SQLException
java.sql.SQLExceptionpublic com.informix.jdbc.IfxLob disableFinalize(boolean arg0)