SequoiaDB
 All Classes Namespaces Files Functions Variables Enumerations Properties Pages
Classes | Public Member Functions | Public Attributes | List of all members
SequoiaDB.DBLob Class Reference

Database operation interfaces of large object. More...

Public Member Functions

void Close ()
 Close the lob.
 
int Read (byte[] b)
 Reads up to b.length bytes of data from this lob into an array of bytes.
 
int Read (byte[] b, int off, int len)
 Reads up to.
 
void Write (byte[] b)
 Writes b.length bytes from the specified byte array to this lob.
 
void Write (byte[] b, int off, int len)
 Writes len bytes from the specified byte array to this lob.
 
void Seek (long size, int seekType)
 Change the read/write position of the lob. The new position is obtained by adding.
 
void Lock (long offset, long length)
 Lock LOB section for writing.
 
void LockAndSeek (long offset, long length)
 Lock LOB section for writing and seek to the offset position.
 
bool IsClosed ()
 Test whether lob has been closed or not.
 
ObjectId GetID ()
 Get the lob's id.
 
long GetSize ()
 Get the size of lob.
 
long GetCreateTime ()
 get the create time of lob
 
long GetModificationTime ()
 get the last modification time of lob
 
bool IsEof ()
 Check whether current offset has reached to the max size of current lob.
 

Public Attributes

const int SDB_LOB_SEEK_SET = 0
 Change the position from the beginning of lob.
 
const int SDB_LOB_SEEK_CUR = 1
 Change the position from the current position of lob.
 
const int SDB_LOB_SEEK_END = 2
 Change the position from the end of lob.
 
const int SDB_LOB_READ = 0x00000004
 LOB open mode for reading.
 
const int SDB_LOB_WRITE = 0x00000008
 LOB open mode for writing.
 

Detailed Description

Database operation interfaces of large object.

Member Function Documentation

SequoiaDB.DBLob.Close ( )
inline

Close the lob.

Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
long SequoiaDB.DBLob.GetCreateTime ( )
inline

get the create time of lob

Returns
The lob's create time
Exceptions
SequoiaDB.BaseException
System.Exception
ObjectId SequoiaDB.DBLob.GetID ( )
inline

Get the lob's id.

Returns
the lob's id
long SequoiaDB.DBLob.GetModificationTime ( )
inline

get the last modification time of lob

Returns
The lob's last modification time
Exceptions
SequoiaDB.BaseException
System.Exception
long SequoiaDB.DBLob.GetSize ( )
inline

Get the size of lob.

Returns
the lob's size
bool SequoiaDB.DBLob.IsClosed ( )
inline

Test whether lob has been closed or not.

Returns
true for lob has been closed, false for not
bool SequoiaDB.DBLob.IsEof ( )
inline

Check whether current offset has reached to the max size of current lob.

Returns
Return true if yes while false for not.
void SequoiaDB.DBLob.Lock ( long  offset,
long  length 
)
inline

Lock LOB section for writing.

Parameters
offsetLock start position.
lengthLock length, -1 means lock to the end of lob.
Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.DBLob.LockAndSeek ( long  offset,
long  length 
)
inline

Lock LOB section for writing and seek to the offset position.

Parameters
offsetLock start position.
lengthLock length, -1 means lock to the end of lob.
Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
SequoiaDB.DBLob.Read ( byte[]  b)
inline

Reads up to b.length bytes of data from this lob into an array of bytes.

Parameters
bthe buffer into which the data is read.
Returns
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached, or 0 if b.length is Zero.
Exceptions
SequoiaDB.BaseException
System.Exception
SequoiaDB.DBLob.Read ( byte[]  b,
int  off,
int  len 
)
inline

Reads up to.

len bytes of data from this lob into an array of bytes.

Parameters
bthe buffer into which the data is read.
offthe start offset in the destination array b.
lenthe maximum number of bytes read.
Returns
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached, or 0 if b.length is Zero.
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.DBLob.Seek ( long  size,
int  seekType 
)
inline

Change the read/write position of the lob. The new position is obtained by adding.

size to the position specified by seekType. If seekType is set to SDB_LOB_SEEK_SET, SDB_LOB_SEEK_CUR, or SDB_LOB_SEEK_END, the offset is relative to the start of the lob, the current position of lob, or the end of lob.

Parameters
sizethe adding size.
seekTypeSDB_LOB_SEEK_SET/SDB_LOB_SEEK_CUR/SDB_LOB_SEEK_END
Returns
void
Exceptions
SequoiaDB.BaseException
System.Exception
SequoiaDB.DBLob.Write ( byte[]  b)
inline

Writes b.length bytes from the specified byte array to this lob.

Parameters
bThe data.
Exceptions
SequoiaDB.BaseException
System.Exception
SequoiaDB.DBLob.Write ( byte[]  b,
int  off,
int  len 
)
inline

Writes len bytes from the specified byte array to this lob.

Parameters
bThe data.
offThe offset of the data buffer.
lenThe lenght to write.
Exceptions
SequoiaDB.BaseException
System.Exception

Member Data Documentation

const int SDB_LOB_READ = 0x00000004

LOB open mode for reading.

0x00000004

const int SDB_LOB_SEEK_CUR = 1

Change the position from the current position of lob.

1

const int SDB_LOB_SEEK_END = 2

Change the position from the end of lob.

2

const int SDB_LOB_SEEK_SET = 0

Change the position from the beginning of lob.

0

const int SDB_LOB_WRITE = 0x00000008

LOB open mode for writing.

0x00000008


The documentation for this class was generated from the following file: