|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.informix.jdbc.IfxSmartBlob
The IfxSmartBlob class provides smart large object access. This class provides open, close, read, write, and other Informix smart blob access methods.
Field Summary | |
static int |
LO_APPEND
Indicates if the open or create mode of the smart large object is append mode. |
static int |
LO_BUFFER
Indicates if the open or create mode of the smart large object is buffer. |
static int |
LO_CLIENT_FILE
to be used in parameter flags for IFX_LO_COPY_TO_LO and IFX_LO_COPY_TO_FILE |
static int |
LO_CURRENT_END
to be used with IfxLoLock/IfxLoUnlock |
static int |
LO_DIRTY_READ
Indicates if the open or create mode of the smart large object is dirty read. |
static int |
LO_EXCLUSIVE_MODE
to be used with IfxLoLock/IfxLoUnlock |
static int |
LO_FORWARD
Indicates if the open or create mode of the smart large object is forward. |
static int |
LO_LOCKALL
Indicates if the open or create mode of the smart large object is lock all. |
static int |
LO_LOCKRANGE
Indicates if the open or create mode of the smart large object is lock range. |
static int |
LO_MAX_END
to be used with IfxLoLock/IfxLoUnlock |
static int |
LO_NOBUFFER
Indicates if the open or create mode of the smart large object is no buffer. |
static int |
LO_NODIRTY_READ
Indicates if the open or create mode of the smart large object is no dirty read. |
static int |
LO_RANDOM
Indicates if the open or create mode of the smart large object is random. |
static int |
LO_RDONLY
Indicates if the open or create mode of the smart large object is read only. |
static int |
LO_RDWR
Indicates if the open or create mode of the smart large object is read/write. |
static int |
LO_REVERSE
Indicates if the open or create mode of the smart large object is reverse. |
static int |
LO_SEEK_CUR
Indicates that seeking starts from the current position plus the set position. |
static int |
LO_SEEK_END
Indicates that seeking starts from the end of file plus the set position. |
static int |
LO_SEEK_SET
Indicates that seeking starts from the set position. |
static int |
LO_SEQUENTIAL
Indicates if the open or create mode of the smart large object is sequential. |
static int |
LO_SERVER_FILE
to be used in parameter flags for IFX_LO_COPY_TO_LO and IFX_LO_COPY_TO_FILE |
static int |
LO_SHARED_MODE
to be used with IfxLoLock/IfxLoUnlock |
static int |
LO_WRONLY
Indicates if the open or create mode of the large object is write only. |
Constructor Summary | |
IfxSmartBlob(java.sql.Connection conn)
Creates an IfxSmartBlob object. |
Method Summary | |
int |
IfxLoAlter(IfxBblob blob,
IfxLobDescriptor lodesc)
IfxLoAlter() alters this blob using the new large object IfxLobDescriptor. |
int |
IfxLoAlter(IfxCblob clob,
IfxLobDescriptor lodesc)
IfxLoAlter() alters this clob using the new large object IfxLobDescriptor. |
int |
IfxLoAlter(IfxLocator locator,
IfxLobDescriptor lodesc)
IfxLoAlter() alter the smartblob from this locator using the new IfxLobDescriptor lodesc. |
void |
IfxLoClose(int lofd)
Closes the smart large object referenced by the given locator. |
IfxLobDescriptor |
IfxLoColInfo(java.lang.String name)
Gets the smart large object characteristics for the specified column. |
int |
IfxLoCreate(IfxLobDescriptor lodesc,
int mode,
IfxBblob blob)
Creates a new smart large object and opens it on the server. |
int |
IfxLoCreate(IfxLobDescriptor lodesc,
int mode,
IfxCblob clob)
Creates a new large object and opens it on the server. |
int |
IfxLoCreate(IfxLobDescriptor lodesc,
int mode,
IfxLocator locator)
Creates a new smart large object and opens it on the server. |
int |
IfxLoFromFile(int lofd,
java.lang.String name,
int flag,
int offset,
int amount)
IfxLoFromFile() copies a smart large object from a file on server or client into a smart large object file descriptor. |
IfxLoStat |
IfxLoGetStat(int lofd)
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. |
int |
IfxLoLock(int lofd,
long offset,
int whence,
long range,
int lockmode)
IfxLoLock() lock a range of bytes in the given large object file descriptor in a requested mode. |
int |
IfxLoOpen(IfxBblob blob,
int mode)
Opens the smart large object that is referenced by the specified IfxBblob object. |
int |
IfxLoOpen(IfxCblob clob,
int mode)
Opens the smart large object that is referenced by the specified IfxCblob object. |
int |
IfxLoOpen(IfxLocator locator,
int mode)
Opens the smart large object that is referenced by the specified locator. |
int |
IfxLoRead(int lofd,
byte[] buffer,
int nbytes)
Reads nbytes of data from the smart large object into the give byte array. |
int |
IfxLoRead(int lofd,
byte[] buffer,
int nbytes,
int off)
Reads nbytes of data from the smart large object into the give byte array. |
int |
IfxLoRead(int lofd,
java.io.FileOutputStream fout,
int nbytes)
Reads nbytes of data from the smart large object into the file stream. |
byte[] |
IfxLoRead(int lofd,
int nbytes)
Reads nbytes of data from the smart large object. |
void |
IfxLoRelease()
Releases the smart large object resources associated with the locator. |
void |
IfxLoRelease(IfxBblob blob)
Releases the smart large object resources assoicated with the smart blob object. |
void |
IfxLoRelease(IfxCblob clob)
Releases the smart large object resources assoicated with the smart clob object. |
void |
IfxLoRelease(IfxLocator locator)
Releases the smart large object resources associated with the locator. |
long |
IfxLoSeek(int lofd,
long offset,
int whence)
Sets the position for the next read and write operation of the smart large object referenced by the given locator. |
long |
IfxLoSize(int lofd)
Returns the size of the smart large object. |
long |
IfxLoTell(int lofd)
Returns the current seek position, which is the offset for the next read or write operation on the smart large object. |
int |
IfxLoToFile(IfxBblob blob,
java.lang.String name,
int flag)
IfxLoToFile() copies a large object blob to a file on the client or server. |
int |
IfxLoToFile(IfxCblob clob,
java.lang.String name,
int flag)
IfxLoToFile() copies a large object clob to a file on the client or server. |
int |
IfxLoToFile(IfxLocator locator,
java.lang.String name,
int flag)
IfxLoToFile() copies the source locator of a large object to a file on the client or server. |
void |
IfxLoTruncate(int lofd,
long size)
Truncates the smart large object to the specific size. |
int |
IfxLoUnLock(int lofd,
long offset,
int whence,
long range)
IfxLoUnLock() unlock a range of bytes in the given large object file descriptor. |
int |
IfxLoWrite(int lofd,
byte[] buffer)
Writes the given data into the smart large object. |
int |
IfxLoWrite(int lofd,
byte[] buffer,
int offset,
int length)
|
int |
IfxLoWrite(int lofd,
java.io.InputStream fin,
int length)
Writes the given data into the smart large object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LO_APPEND
public static final int LO_WRONLY
public static final int LO_RDONLY
public static final int LO_RDWR
public static final int LO_DIRTY_READ
public static final int LO_RANDOM
public static final int LO_SEQUENTIAL
public static final int LO_FORWARD
public static final int LO_REVERSE
public static final int LO_BUFFER
public static final int LO_NOBUFFER
public static final int LO_NODIRTY_READ
public static final int LO_LOCKALL
public static final int LO_LOCKRANGE
public static final int LO_SEEK_SET
public static final int LO_SEEK_CUR
public static final int LO_SEEK_END
public static final int LO_CLIENT_FILE
public static final int LO_SERVER_FILE
public static final int LO_SHARED_MODE
public static final int LO_EXCLUSIVE_MODE
public static final int LO_MAX_END
public static final int LO_CURRENT_END
Constructor Detail |
public IfxSmartBlob(java.sql.Connection conn) throws java.sql.SQLException
Creates an IfxSmartBlob object.
conn
- the java.sql.Connection object for this Informix database
java.sql.SQLException
- if there is an error accessing databaseMethod Detail |
public IfxLobDescriptor IfxLoColInfo(java.lang.String name) throws java.sql.SQLException
Gets the smart large object characteristics for the specified column.
name
- the name of the column
java.sql.SQLException
- if there is an error accessing databaseIfxLobDescriptor
public int IfxLoCreate(IfxLobDescriptor lodesc, int mode, IfxLocator locator) throws java.sql.SQLException
Creates a new smart large object and opens it on the server.
lodesc
- - the large object descriptor for the smart large objectmode
- - the access mode for creating the large objectlocator
- - reference to where the smart large object is stored
It is populated upon successful creation of the smart large object.
java.sql.SQLException
- if there is an error accessing databaseLO_APPEND
,
LO_RDONLY
,
LO_WRONLY
,
LO_RDWR
,
IfxLobDescriptor
,
IfxLocator
public int IfxLoCreate(IfxLobDescriptor lodesc, int mode, IfxBblob blob) throws java.sql.SQLException
Creates a new smart large object and opens it on the server.
lodesc
- - the large object descriptor for the smart large objectmode
- - the access mode for creating the large objectblob
- - This is populated upon successful
creation of the smart large object.
java.sql.SQLException
- if there is an error accessing databaseLO_APPEND
,
LO_RDONLY
,
LO_WRONLY
,
LO_RDWR
,
IfxLobDescriptor
,
IfxBblob
public int IfxLoCreate(IfxLobDescriptor lodesc, int mode, IfxCblob clob) throws java.sql.SQLException
Creates a new large object and opens it on the server.
lodesc
- - the large object descriptormode
- - the access mode for creating the large objectclob
- - This is populated upon successful
creation of the smart large object.
java.sql.SQLException
- if there is an error accessing databaseLO_APPEND
,
LO_RDONLY
,
LO_WRONLY
,
LO_RDWR
,
IfxLobDescriptor
,
IfxCblob
public int IfxLoOpen(IfxLocator locator, int mode) throws java.sql.SQLException
Opens the smart large object that is referenced by the specified locator.
locator
- - the locator that identifies the smart blob object
to be openedmode
- - the access mode for opening the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectLO_APPEND
,
LO_RDONLY
,
LO_WRONLY
,
LO_RDWR
public int IfxLoOpen(IfxBblob blob, int mode) throws java.sql.SQLException
Opens the smart large object that is referenced by the specified IfxBblob object.
blob
- the IfxBblob that identifies the smart blob object
to be openedmode
- the access mode for opening the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectLO_APPEND
,
LO_RDONLY
,
LO_WRONLY
,
LO_RDWR
public int IfxLoOpen(IfxCblob clob, int mode) throws java.sql.SQLException
Opens the smart large object that is referenced by the specified IfxCblob object.
clob
- The IfxCblob that identifies the smart clob object
to be openedmode
- The access mode for opening the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectLO_APPEND
,
LO_RDONLY
,
LO_WRONLY
,
LO_RDWR
public void IfxLoRelease() throws java.sql.SQLException
Releases the smart large object resources associated with the locator.
java.sql.SQLException
- if there is an error accessing smart
large objectpublic void IfxLoRelease(IfxLocator locator) throws java.sql.SQLException
Releases the smart large object resources associated with the locator.
locator
- the locator that references the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectpublic void IfxLoRelease(IfxBblob blob) throws java.sql.SQLException
Releases the smart large object resources assoicated with the smart blob object.
blob
- the IfxBblob that identifies the smart blob object
whose locator has to be released
java.sql.SQLException
- if there is an error accessing smart
large objectpublic void IfxLoRelease(IfxCblob clob) throws java.sql.SQLException
Releases the smart large object resources assoicated with the smart clob object.
clob
- the IfxCblob that identifies the smart clob object
whose locator has to be released
java.sql.SQLException
- if there is an error accessing smart
large objectpublic void IfxLoClose(int lofd) throws java.sql.SQLException
Closes the smart large object referenced by the given locator.
lofd
- the locator handle that references the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectpublic long IfxLoSeek(int lofd, long offset, int whence) throws java.sql.SQLException
Sets the position for the next read and write operation of the smart large object referenced by the given locator.
lofd
- the locator handle that references this smart large objectoffset
- the offset from the location specified in the
whence parameterwhence
- 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 smart
large objectpublic void IfxLoTruncate(int lofd, long size) throws java.sql.SQLException
Truncates the smart large object to the specific size.
lofd
- the handle that references the smart large objectsize
- the size to which the smart large object is truncated
java.sql.SQLException
- if there is an error accessing smart
large objectpublic long IfxLoSize(int lofd) throws java.sql.SQLException
Returns the size of the smart large object.
lofd
- the handle that references the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectpublic IfxLoStat IfxLoGetStat(int lofd) throws java.sql.SQLException
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.
lofd
- The handle that references the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectIfxLoStat
public long IfxLoTell(int lofd) throws java.sql.SQLException
Returns the current seek position, which is the offset for the next read or write operation on the smart large object.
lofd
- the locator handle that references the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectpublic byte[] IfxLoRead(int lofd, int nbytes) throws java.sql.SQLException
Reads nbytes of data from the smart large object.
lofd
- the locator handle that references the smart large objectnbytes
- the number of bytes to be read
java.sql.SQLException
- if there is an error accessing smart
large objectpublic int IfxLoRead(int lofd, byte[] buffer, int nbytes) throws java.sql.SQLException
Reads nbytes of data from the smart large object into the give byte array.
lofd
- the locator handle that references the smart large objectbuffer
- the buffer into which the data is readnbytes
- the number of bytes of data to be read
java.sql.SQLException
- if there is an error accessing smart
large objectpublic int IfxLoRead(int lofd, java.io.FileOutputStream fout, int nbytes) throws java.sql.SQLException
Reads nbytes of data from the smart large object into the file stream.
lofd
- the locator handle that references the smart large objectfout
- the file stream into which the data is readnbytes
- the number of bytes to be read
java.sql.SQLException
- if there is an error accessing smart
large objectpublic int IfxLoRead(int lofd, byte[] buffer, int nbytes, int off) throws java.sql.SQLException
Reads nbytes of data from the smart large object into the give byte array.
lofd
- the handle that references the smart large objectbuffer
- the buffer into which the data is readnbytes
- the number of bytes of data to be readoff
- the start offset of the data
java.sql.SQLException
- if there is an error accessing smart
large objectpublic int IfxLoWrite(int lofd, byte[] buffer) throws java.sql.SQLException
Writes the given data into the smart large object.
lofd
- the locator handle that references the smart large objectbuffer
- the data to write to the smart large object
java.sql.SQLException
- if there is an error accessing smart
large objectpublic int IfxLoWrite(int lofd, byte[] buffer, int offset, int length) throws java.sql.SQLException
java.sql.SQLException
public int IfxLoWrite(int lofd, java.io.InputStream fin, int length) throws java.sql.SQLException
Writes the given data into the smart large object.
lofd
- the locator handle that references the smart large objectfin
- the file stream from which the data is writtenlength
- the number of bytes to be written
java.sql.SQLException
- if there is an error accessing smart
large objectpublic int IfxLoLock(int lofd, long offset, int whence, long range, int lockmode) throws java.sql.SQLException
IfxLoLock() lock a range of bytes in the given large object file descriptor in a requested mode.
lofd
- - given open large object file descriptor.offset
- - offset indicated by whence.whence
- - indicating starting pointrange
- - size of rangelockmode
- - LO_SHARED_MODE or LO_EXCLUSIVE_MODE
java.sql.SQLException
public int IfxLoUnLock(int lofd, long offset, int whence, long range) throws java.sql.SQLException
IfxLoUnLock() unlock a range of bytes in the given large object file descriptor.
lofd
- - given large object file descriptor.offset
- - offset indicated by whence.whence
- - indicating starting pointrange
- - size of range
java.sql.SQLException
public int IfxLoAlter(IfxLocator locator, IfxLobDescriptor lodesc) throws java.sql.SQLException
IfxLoAlter() alter the smartblob from this locator using the new IfxLobDescriptor lodesc.
locator
- - the smartblob locatorlodesc
- - the new specification.
java.sql.SQLException
public int IfxLoAlter(IfxBblob blob, IfxLobDescriptor lodesc) throws java.sql.SQLException
IfxLoAlter() alters this blob using the new large object IfxLobDescriptor.
blob
- - the smartbloblodesc
- - the new specification
java.sql.SQLException
public int IfxLoAlter(IfxCblob clob, IfxLobDescriptor lodesc) throws java.sql.SQLException
IfxLoAlter() alters this clob using the new large object IfxLobDescriptor.
clob
- - the smartbloblodesc
- - the new specification
java.sql.SQLException
public int IfxLoFromFile(int lofd, java.lang.String name, int flag, int offset, int amount) throws java.sql.SQLException
IfxLoFromFile() copies a smart large object from a file on server or client into a smart large object file descriptor.
lofd
- - an open file descriptor for the target smart
large object.name
- - name of the source file on server or client.flag
- - LO_SERVER_FILE or LO_CLIENT_FILEoffset
- - offset into smartblob starting positionamount
- - amount to copy
java.sql.SQLException
public int IfxLoToFile(IfxLocator locator, java.lang.String name, int flag) throws java.sql.SQLException
IfxLoToFile() copies the source locator of a large object to a file on the client or server.
locator
- - source locator of large object to be copiedname
- - destination of file name of the large object.flag
- - LO_SERVER_FILE or LO_CLIENT_FILE
java.sql.SQLException
public int IfxLoToFile(IfxBblob blob, java.lang.String name, int flag) throws java.sql.SQLException
IfxLoToFile() copies a large object blob to a file on the client or server.
blob
- - source large object to be copiedname
- - destination of file name of the large object.flag
- - LO_SERVER_FILE or LO_CLIENT_FILE
java.sql.SQLException
public int IfxLoToFile(IfxCblob clob, java.lang.String name, int flag) throws java.sql.SQLException
IfxLoToFile() copies a large object clob to a file on the client or server.
clob
- - source large object to be copiedname
- - destination of file name of the large object.flag
- - LO_SERVER_FILE or LO_CLIENT_FILE
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |