public interface DBLob extends Closeable
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
SDB_LOB_READ
LOB open mode for reading
|
static int |
SDB_LOB_SEEK_CUR
Change the position from the current position of lob
|
static int |
SDB_LOB_SEEK_END
Change the position from the end of lob
|
static int |
SDB_LOB_SEEK_SET
Change the position from the beginning of lob
|
static int |
SDB_LOB_WRITE
LOB open mode for writing
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close the lob.
|
long |
getCreateTime()
Get the create time of lob.
|
ObjectId |
getID()
Get the lob's id.
|
long |
getModificationTime()
Get the last modification time of lob.
|
long |
getSize()
Get the size of lob.
|
boolean |
isEof()
Check whether current offset has reached to the max size of the current lob.
|
void |
lock(long offset,
long length)
Lock LOB section for write mode.
|
void |
lockAndSeek(long offset,
long length)
Lock LOB section for write mode and seek to the offset position.
|
int |
read(byte[] b)
Read up to
b.length bytes of data from this lob into
an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Read up to
len bytes of data from this lob into
an array of bytes. |
void |
read(OutputStream out)
Read the content to the output stream.
|
void |
seek(long size,
int seekType)
Change the read or write position of the lob.
|
void |
write(byte[] b)
Write
b.length bytes from the specified
byte array to this lob. |
void |
write(byte[] b,
int off,
int len)
Write
len bytes from the specified
byte array starting at offset off to this lob. |
void |
write(InputStream in)
Write bytes from the input stream to this lob.
|
static final int SDB_LOB_READ
static final int SDB_LOB_SEEK_CUR
static final int SDB_LOB_SEEK_END
static final int SDB_LOB_SEEK_SET
static final int SDB_LOB_WRITE
void close()
throws BaseException
close 在接口中 AutoCloseableclose 在接口中 CloseableBaseException - If error happens.long getCreateTime()
ObjectId getID()
long getModificationTime()
long getSize()
boolean isEof()
void lock(long offset,
long length)
throws BaseException
offset - lock start positionlength - lock length, -1 means lock to the end of lobBaseException - If error happens..void lockAndSeek(long offset,
long length)
throws BaseException
offset - lock start positionlength - lock length, -1 means lock to the end of lobBaseException - If error happens..int read(byte[] b) throws BaseException
b.length bytes of data from this lob into
an array of bytes.b - the buffer into which the data is read.-1 if
there is no more data because the end of the file has been
reached, or 0 if b.length is Zero.BaseException - If error happens.int read(byte[] b,
int off,
int len)
throws BaseException
len bytes of data from this lob into
an array of bytes.b - the buffer into which the data is read.off - the start offset in the destination array b.len - the maximum number of bytes read.-1 if
there is no more data because the end of the file has been
reached, or 0 if len is Zero.BaseException - If error happens.void read(OutputStream out) throws BaseException
out - the output stream.BaseException - If error happens.void seek(long size,
int seekType)
throws BaseException
size - the adding size.seekType - SDB_LOB_SEEK_SET/SDB_LOB_SEEK_CUR/SDB_LOB_SEEK_ENDBaseException - If error happens..void write(byte[] b)
throws BaseException
b.length bytes from the specified
byte array to this lob.b - the data.BaseException - If error happens.void write(byte[] b,
int off,
int len)
throws BaseException
len bytes from the specified
byte array starting at offset off to this lob.b - the data.off - the start offset in the data.len - the number of bytes to write.BaseException - If error happens.void write(InputStream in) throws BaseException
in - the input stream.BaseException - If error happens.Copyright © 2021. All rights reserved.