public class Blob extends LobClass implements Blob, Serializable
| 构造器和说明 |
|---|
Blob(byte[] data)
构造方法
此构造方法只用于构造往数据库中插入的BLOB对象
|
Blob(InputStream in)
HP迁移工具需要使用的构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Blob |
createTemporary(Connection blobConnection,
boolean cache,
int duration) |
void |
free()
释放 Blob 的资源
|
void |
freeTemporary() |
static void |
freeTemporary(Blob temBlob) |
protected byte[] |
getBinaryData(long start,
long len)
得到Blob对象存放数据的字节数组
|
InputStream |
getBinaryStream()
以流的形式检索此 Blob 实例指定的 BLOB 值
|
InputStream |
getBinaryStream(long pos,
long length)
以流的形式检索此 Blob 实例指定的 BLOB 值,根据位置与长度
|
String |
getBlobDesciptor()
Blob对象的描述符和长度
"get lob '"+clobDesciptor+"' offset 0 limit "+blobLen;
|
byte[] |
getBytes(long pos,
int length)
以字节数组的形式检索此 Blob 对象表示的全部或部分 BLOB 值。
|
static Blob |
getEmptyBLOB()
空Clob对象
|
long |
length()
检索Blob的长度
|
long |
position(Blob pattern,
long start)
检索此 Blob 对象指定的 BLOB 值中 pattern 开始处的字节位置。
|
long |
position(byte[] pattern,
long start)
检索此 Blob 对象表示的 BLOB 值中指定字节数组 pattern 开始处的字节位置。
|
OutputStream |
setBinaryStream(long indexToWriteAt)
检索用于写入此 Blob 对象表示的 BLOB 值的流。
|
int |
setBytes(long writeAt,
byte[] bytes)
将给定字节数组写入此 Blob 对象表示的 BLOB 值(从位置 pos 处开始),并返回写入的字节数
|
int |
setBytes(long writeAt,
byte[] bytes,
int offset,
int length)
将所有或部分给定的 byte 数组写入此 Blob 对象表示的 BLOB 值中,并返回写入的字节数。
|
void |
streamClosed(byte[] byteData)
OutputStreamWatcher#streamClosed(byte[])
重载了streamClosed()方法
|
void |
streamClosed(com.xugu.cloudjdbc.WatchableOutputStream out)
实现接口OutputStreamWatcher中唯一的方法
|
void |
truncate(long length)
截取此 Blob 对象表示的 BLOB 值,使其长度为 length 个字节
|
public Blob(byte[] data)
public Blob(InputStream in)
protected byte[] getBinaryData(long start,
long len)
throws SQLException
SQLExceptionpublic InputStream getBinaryStream() throws SQLException
getBinaryStream 在接口中 BlobSQLExceptionpublic byte[] getBytes(long pos,
int length)
throws SQLException
getBytes 在接口中 BlobSQLExceptionpublic long length()
throws SQLException
length 在接口中 Bloblength 在类中 LobClassSQLExceptionpublic long position(byte[] pattern,
long start)
throws SQLException
position 在接口中 BlobSQLExceptionpublic long position(Blob pattern, long start) throws SQLException
position 在接口中 BlobSQLExceptionpublic OutputStream setBinaryStream(long indexToWriteAt) throws SQLException
setBinaryStream 在接口中 BlobSQLExceptionpublic int setBytes(long writeAt,
byte[] bytes)
throws SQLException
setBytes 在接口中 BlobSQLExceptionpublic int setBytes(long writeAt,
byte[] bytes,
int offset,
int length)
throws SQLException
setBytes 在接口中 BlobSQLExceptionpublic void truncate(long length)
throws SQLException
truncate 在接口中 BlobSQLExceptionpublic void free()
throws SQLException
free 在接口中 BlobSQLExceptionpublic InputStream getBinaryStream(long pos, long length) throws SQLException
getBinaryStream 在接口中 BlobSQLExceptionpublic void streamClosed(byte[] byteData)
public void streamClosed(com.xugu.cloudjdbc.WatchableOutputStream out)
OutputStreamWatcher.streamClosed(WatchableOutputStream)public static Blob getEmptyBLOB()
public String getBlobDesciptor()
public static Blob createTemporary(Connection blobConnection, boolean cache, int duration)
public static void freeTemporary(Blob temBlob) throws SQLException
SQLExceptionpublic void freeTemporary()
throws SQLException
SQLExceptionCopyright © 2025. All rights reserved.