一个 JDBC Blob
。如需查看此类的文档,请参阅 java.sql.Blob
。
方法
方法 | 返回类型 | 简介 |
---|---|---|
free() | void | 如需查看此方法的文档,请参阅
java.sql.Blob#free() 。 |
getAppsScriptBlob() | Blob | 获取作为 Apps 脚本 blob 的此 JdbcBlob 的内容。 |
getAs(contentType) | Blob | 返回此对象内的数据,并将其作为 blob 转换为指定内容类型。 |
getBytes(position, length) | Byte[] | 如需查看此方法的文档,请参阅
java.sql.Blob#getBytes(long, int) 。 |
length() | Integer | 如需查看此方法的文档,请参阅
java.sql.Blob#length() 。 |
position(pattern, start) | Integer | 如需查看此方法的文档,请参阅
java.sql.Blob#position(byte[], long) 。 |
position(pattern, start) | Integer | 如需查看此方法的文档,请参阅
java.sql.Blob#position(blob, long) 。 |
setBytes(position, blobSource) | Integer | 将 JdbcBlob 写入此 blob 的简便方法。 |
setBytes(position, blobSource, offset, length) | Integer | 将 JdbcBlob 写入此 blob 的简便方法。 |
setBytes(position, bytes) | Integer | 如需查看此方法的文档,请参阅
java.sql.Blob#setBytes(long, byte[]) 。 |
setBytes(position, bytes, offset, length) | Integer | 如需查看此方法的文档,请参阅
java.sql.Blob#setBytes(long, byte[], int, int) 。 |
truncate(length) | void | 如需查看此方法的文档,请参阅
java.sql.Blob#truncate(long) 。 |
详细文档
free()
如需查看此方法的文档,请参阅
java.sql.Blob#free()
。
getAs(contentType)
返回此对象内的数据,并将其作为 blob 转换为指定内容类型。此方法会为文件名添加适当的扩展名,例如“myfile.pdf”。不过,它假设最后一个英文句点后面的文件名部分(如果有)是应该替换的现有扩展名。因此,“ShoppingList.12.25.2014”将变为“ShoppingList.12.25.pdf”。
如需查看转化次数的每日配额,请参阅 Google 服务的配额。新创建的 Google Workspace 网域可能会暂时受到更严格的配额限制。
参数
名称 | 类型 | 说明 |
---|---|---|
contentType | String | 要转换为的 MIME 类型。对于大多数 blob,'application/pdf' 是唯一有效的选项。对于 BMP、GIF、JPEG 或 PNG 格式的图片,'image/bmp' 、'image/gif' 、'image/jpeg' 或 'image/png' 中的任何一个也都有效。 |
弃踢回攻
Blob
- 作为 blob 的数据。
getBytes(position, length)
如需查看此方法的文档,请参阅
java.sql.Blob#getBytes(long, int)
。
参数
名称 | 类型 | 说明 |
---|---|---|
position | Integer | 要提取的 blob 值中第一个字节的序数位置;第一个字节位于位置 1。 |
length | Integer | 要复制的连续字节数;长度值必须等于或大于零。 |
弃踢回攻
Byte[]
- 一个字节数组,最多可包含 blob 值中的指定连续字节数。
length()
position(pattern, start)
如需查看此方法的文档,请参阅
java.sql.Blob#position(byte[], long)
。
参数
名称 | 类型 | 说明 |
---|---|---|
pattern | Byte[] | 要搜索的字节数组。 |
start | Integer | 开始搜索的 blob 值中的位置;第一个位置为 1。 |
弃踢回攻
Integer
- 指定模式开始的位置,如果未找到,则为 -1。
position(pattern, start)
如需查看此方法的文档,请参阅
java.sql.Blob#position(blob, long)
。
参数
名称 | 类型 | 说明 |
---|---|---|
pattern | JdbcBlob | JdbcBlob ,表示要搜索的值, |
start | Integer | 开始搜索的 blob 值中的位置;第一个位置为 1。 |
弃踢回攻
Integer
- 指定模式开始的位置,如果未找到,则为 -1。
setBytes(position, blobSource)
将 JdbcBlob
写入此 blob 的简便方法。
参数
名称 | 类型 | 说明 |
---|---|---|
position | Integer | 在 blob 中开始写入的位置;第一个位置为 1。 |
blobSource | BlobSource | 要写入此 blob 的数据源。 |
弃踢回攻
Integer
- 写入的字节数。
setBytes(position, blobSource, offset, length)
将 JdbcBlob
写入此 blob 的简便方法。
参数
名称 | 类型 | 说明 |
---|---|---|
position | Integer | 在 blob 中开始写入的位置;第一个位置为 1。 |
blobSource | BlobSource | 要写入此 blob 的数据源。 |
offset | Integer | 所提供的字节数组的偏移量,从这里开始读取要设置的字节。 |
length | Integer | 要写入 blob 的字节数。 |
弃踢回攻
Integer
- 写入的字节数。
setBytes(position, bytes)
如需查看此方法的文档,请参阅
java.sql.Blob#setBytes(long, byte[])
。
参数
名称 | 类型 | 说明 |
---|---|---|
position | Integer | 在 blob 中开始写入的位置;第一个位置为 1。 |
bytes | Byte[] | 要写入此 Blob 的字节数组。 |
弃踢回攻
Integer
- 写入的字节数。
setBytes(position, bytes, offset, length)
如需查看此方法的文档,请参阅
java.sql.Blob#setBytes(long, byte[], int, int)
。
参数
名称 | 类型 | 说明 |
---|---|---|
position | Integer | 在 blob 中开始写入的位置;第一个位置为 1。 |
bytes | Byte[] | 要写入此 Blob 的字节数组。 |
offset | Integer | 所提供的字节数组的偏移量,从这里开始读取要设置的字节。 |
length | Integer | 要写入 blob 的字节数。 |
弃踢回攻
Integer
- 写入的字节数。