A JDBC Blob
. For documentation of this class, see java.sql.Blob
.
Methods
Method | Return type | Brief description |
---|---|---|
free() | void | For documentation of this method, see java.sql.Blob#free() . |
getAppsScriptBlob() | Blob | Gets the content of this JdbcBlob as an Apps Script blob. |
getAs(contentType) | Blob | Return the data inside this object as a blob converted to the specified content type. |
getBytes(position, length) | Byte[] | For documentation of this method, see java.sql.Blob#getBytes(long, int) . |
length() | Integer | For documentation of this method, see java.sql.Blob#length() . |
position(pattern, start) | Integer | For documentation of this method, see java.sql.Blob#position(byte[], long) . |
position(pattern, start) | Integer | For documentation of this method, see java.sql.Blob#position(java.sql.Blob, long) . |
setBytes(position, blobSource) | Integer | Convenience method for BlobSources. |
setBytes(position, blobSource, offset, length) | Integer | Convenience method for BlobSources. |
setBytes(position, bytes) | Integer | For documentation of this method, see java.sql.Blob#setBytes(long, byte[]) . |
setBytes(position, bytes, offset, length) | Integer | For documentation of this method, see java.sql.Blob#setBytes(long, byte[], int, int) . |
truncate(length) | void | For documentation of this method, see java.sql.Blob#truncate(long) . |
Detailed documentation
free()
For documentation of this method, see java.sql.Blob#free()
.
getAppsScriptBlob()
getAs(contentType)
Return the data inside this object as a blob converted to the specified content type. This method adds the appropriate extension to the filename—for example, "myfile.pdf". However, it assumes that the part of the filename that follows the last period (if any) is an existing extension that should be replaced. Consequently, "ShoppingList.12.25.2014" becomes "ShoppingList.12.25.pdf".
Parameters
Name | Type | Description |
---|---|---|
contentType | String | the MIME type to convert to. For most blobs, 'application/pdf' is
the only valid option. For images in BMP, GIF, JPEG, or PNG format, any of 'image/bmp' , 'image/gif' , 'image/jpeg' , or 'image/png' are also
valid. |
Return
Blob
— the data as a blob
getBytes(position, length)
For documentation of this method, see java.sql.Blob#getBytes(long, int)
.
Parameters
Name | Type | Description |
---|---|---|
position | Integer | |
length | Integer |
Return
Byte[]
length()
position(pattern, start)
For documentation of this method, see java.sql.Blob#position(byte[], long)
.
Parameters
Name | Type | Description |
---|---|---|
pattern | Byte[] | |
start | Integer |
Return
Integer
position(pattern, start)
For documentation of this method, see java.sql.Blob#position(java.sql.Blob, long)
.
Parameters
Name | Type | Description |
---|---|---|
pattern | JdbcBlob | |
start | Integer |
Return
Integer
setBytes(position, blobSource)
Convenience method for BlobSources.
Parameters
Name | Type | Description |
---|---|---|
position | Integer | |
blobSource | BlobSource |
Return
Integer
setBytes(position, blobSource, offset, length)
Convenience method for BlobSources.
Parameters
Name | Type | Description |
---|---|---|
position | Integer | |
blobSource | BlobSource | |
offset | Integer | |
length | Integer |
Return
Integer
setBytes(position, bytes)
For documentation of this method, see java.sql.Blob#setBytes(long, byte[])
.
Parameters
Name | Type | Description |
---|---|---|
position | Integer | |
bytes | Byte[] |
Return
Integer
setBytes(position, bytes, offset, length)
For documentation of this method, see java.sql.Blob#setBytes(long, byte[], int, int)
.
Parameters
Name | Type | Description |
---|---|---|
position | Integer | |
bytes | Byte[] | |
offset | Integer | |
length | Integer |
Return
Integer
truncate(length)
For documentation of this method, see java.sql.Blob#truncate(long)
.
Parameters
Name | Type | Description |
---|---|---|
length | Integer |