|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.informix.jdbc.IfxLob
com.informix.jdbc.IfxBblob
By default, a Blob is a transaction duration reference to a binary large object. By default, a Blob is implemented using a LOCATOR(blob) internally.
Constructor Summary | |
IfxBblob()
Creates an IfxBblob instance. |
|
IfxBblob(java.sql.Connection conn,
byte[] buffer)
Creates an IfxBblob instance with a given connection and a buffer containing data. |
|
IfxBblob(java.sql.Connection conn,
byte[] buffer,
IfxLobDescriptor loDesc)
Creates an IfxBblob instance with a given connection and a buffer containing data and a specified lob descriptor. |
|
IfxBblob(java.sql.Connection conn,
byte[] buffer,
java.lang.String sbspaceName)
Creates an IfxBblob instance with a given connection and a buffer containing data and a specified smart blob space. |
|
IfxBblob(java.sql.Connection conn,
java.io.InputStream fin,
int length)
Creates an IfxBblob instance with a given connection, an inputStream and number of bytes to write. |
|
IfxBblob(java.sql.Connection conn,
java.io.InputStream fin,
int length,
IfxLobDescriptor loDesc)
Creates an IfxBblob instance with a given connection, an inputStream, number of bytes to write and a specified lob descriptor. |
|
IfxBblob(java.sql.Connection conn,
java.io.InputStream fin,
int length,
java.lang.String sbspaceName)
Creates an IfxBblob instance with a given connection, an inputStream and number of bytes to write to a specified smart blob space. |
|
IfxBblob(com.informix.jdbc.IfxConnection connection,
IfxLocator locator)
Creates an IfxBblob instance with a given connection and a locator. |
|
IfxBblob(IfxLocator locator)
Creates an IfxBblob instance with the given locator. |
|
IfxBblob(java.io.InputStream fin)
Creates an IfxBblob instance with the given input stream. |
Method Summary | |
void |
close()
This method will release the resources used by the object |
java.io.InputStream |
getBinaryStream()
Retrieves the entire smart large object as a stream. |
byte[] |
getBytes(long position,
int length)
Returns a copy of the contents of the smart large object at the requested position. |
IfxLocator |
getLocator()
Gets the smart large object locator from the blob object. |
IfxLoStat |
getLoStat()
This method returns an IfxLoStat object, which provides statistical information, such as the last access time, the last update status time, the last modification time, and the reference count of the smart large object. |
long |
length()
Gets the length of the binary smart large object in bytes. |
long |
position(java.sql.Blob pattern,
long start)
Determines the byte position at which the given pattern occurs. |
long |
position(byte[] pattern,
long start)
Determines the byte position at which the given byte pattern occurs. |
long |
seek(long offset,
int whence)
This method sets the position for the next read and write operation of the smart large object. |
java.io.OutputStream |
setBinaryStream(long pos)
Retrieves a stream that can be used to write to the BLOB value that this Blob object represents. |
void |
setBinaryStream(long position,
java.io.InputStream fin,
int length)
Writes binary stream of data from an InputStream to an already existing smart large blob object. |
int |
setBytes(long position,
byte[] buffer)
Writes binary data from a buffer to an existing smart large blob object. |
int |
setBytes(long position,
byte[] bytes,
int offset,
int len)
Writes all or part of the given byte array to the BLOB value that this Blob object represents and returns the number of bytes written. |
void |
truncate(long size)
This method truncates the smart large object at the given position. |
long |
where()
This method returns the current seek position within the large object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IfxBblob()
public IfxBblob(IfxLocator locator)
locator
- the locator that references the smart large objectpublic IfxBblob(com.informix.jdbc.IfxConnection connection, IfxLocator locator) throws java.sql.SQLException
connection
- the IfxConnection objectlocator
- the locator that references the smart large objectpublic IfxBblob(java.io.InputStream fin)
fin
- the input stream to use for this smart large objectpublic IfxBblob(java.sql.Connection conn, java.io.InputStream fin, int length) throws java.sql.SQLException
conn
- the Connection objectfin
- the input stream from which the data will be written into
the smart large objectlength
- number of bytes to be written
java.sql.SQLException
- if object instance cannot be instantiatedpublic IfxBblob(java.sql.Connection conn, java.io.InputStream fin, int length, java.lang.String sbspaceName) throws java.sql.SQLException
conn
- the Connection object.fin
- the input stream from which the data will be written into
the smart large objectlength
- number of bytes to be writtensbspaceName
- specified smart blob space name
java.sql.SQLException
- if object instance cannot be instantiatedpublic IfxBblob(java.sql.Connection conn, java.io.InputStream fin, int length, IfxLobDescriptor loDesc) throws java.sql.SQLException
conn
- the Connection objectfin
- the input stream from which the data will be written into
the smart large objectlength
- number of bytes to be writtenloDesc
- user created lob descriptor
java.sql.SQLException
- if object instance cannot be instantiatedpublic IfxBblob(java.sql.Connection conn, byte[] buffer) throws java.sql.SQLException
conn
- the Connection objectbuffer
- from which the data will be written to smart blob
java.sql.SQLException
- if object instance cannot be instantiatedpublic IfxBblob(java.sql.Connection conn, byte[] buffer, java.lang.String sbspaceName) throws java.sql.SQLException
conn
- the Connection objectbuffer
- from which the data will be written to smart blobsbspaceName
- specified smart blob space name
java.sql.SQLException
- if object instance cannot be instantiatedpublic IfxBblob(java.sql.Connection conn, byte[] buffer, IfxLobDescriptor loDesc) throws java.sql.SQLException
conn
- the Connection objectbuffer
- from which the data will be written to smart blobloDesc
- user defined lob descriptor
java.sql.SQLException
- if object instance cannot be instantiatedMethod Detail |
public IfxLocator getLocator() throws java.sql.SQLException
java.sql.SQLException
- if there is an error accessing the BLOBpublic long length() throws java.sql.SQLException
length
in interface java.sql.Blob
java.sql.SQLException
- if there is an error accessing the length of
the BLOBpublic byte[] getBytes(long position, int length) throws java.sql.SQLException
getBytes
in interface java.sql.Blob
position
- the offset from the start of the smart large objectlength
- the number of consecutive bytes to be copied
java.sql.SQLException
- if there is an error accessing the BLOBpublic java.io.InputStream getBinaryStream() throws java.sql.SQLException
getBinaryStream
in interface java.sql.Blob
java.sql.SQLException
- if there is an error accessing the BLOBpublic long position(byte[] pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Blob
pattern
- the pattern to search forstart
- the position at which to begin searching
java.sql.SQLException
- if there is an error accessing the BLOBpublic long position(java.sql.Blob pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Blob
pattern
- the pattern to search forstart
- the position at which to begin searching
java.sql.SQLException
- if there is an error accessing the BLOBpublic void setBinaryStream(long position, java.io.InputStream fin, int length) throws java.sql.SQLException
fin
- InputStreamlength
- number of bytes to be written from the input stream
java.sql.SQLException
- if there is an error accessing the BLOBpublic int setBytes(long position, byte[] buffer) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
buffer
- contain the data
java.sql.SQLException
- if there is an error accessing the BLOBpublic void close() throws java.sql.SQLException
java.sql.SQLException
- if there is an error accessing the BLOBpublic long seek(long offset, int whence) throws java.sql.SQLException
offset
- From the location specified in the whence parameterwhence
- Define the offset value more specifically;
LO_SEEK_SET, from begining; LO_SEEK_CUR, relative from current
position; LO_SEEK_END, from the end.
java.sql.SQLException
- if there is an error accessing the BLOBpublic long where() throws java.sql.SQLException
java.sql.SQLException
- if there is an error accessing the BLOBpublic IfxLoStat getLoStat() throws java.sql.SQLException
java.sql.SQLException
- if there is an error accessing the BLOBpublic void truncate(long size) throws java.sql.SQLException
truncate
in interface java.sql.Blob
size
- at which the truncation will occur
java.sql.SQLException
- if there is an error accessing the BLOBpublic int setBytes(long position, byte[] bytes, int offset, int len) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
position
- the position in the BLOB object at which to start writingbytes
- the array of bytes to be written to this BLOB objectoffset
- the offset into the array bytes at which to start reading the bytes to be setlen
- the number of bytes to be written to the BLOB value from the array of bytes bytes
java.sql.SQLException
- if there is an error accessing the BLOB valuepublic java.io.OutputStream setBinaryStream(long pos) throws java.sql.SQLException
setBinaryStream
in interface java.sql.Blob
pos
- the position in the BLOB value at which to start writing
java.sql.SQLException
- if there is an error accessing the BLOB value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |