public class BlobFromLocator
extends java.lang.Object
implements java.sql.Blob
Modifier and Type | Class and Description |
---|---|
(package private) class |
BlobFromLocator.LocatorInputStream |
Constructor and Description |
---|
BlobFromLocator(ResultSetImpl creatorResultSetToSet,
int blobColumnIndex,
ExceptionInterceptor exceptionInterceptor)
Creates an updatable BLOB that can update in-place
|
Modifier and Type | Method and Description |
---|---|
(package private) java.sql.PreparedStatement |
createGetBytesStatement() |
void |
free() |
java.io.InputStream |
getBinaryStream()
Retrieves the BLOB designated by this Blob instance as a stream.
|
java.io.InputStream |
getBinaryStream(long pos,
long length) |
byte[] |
getBytes(long pos,
int length)
Returns as an array of bytes, part or all of the BLOB value that this
Blob object designates.
|
(package private) byte[] |
getBytesInternal(java.sql.PreparedStatement pStmt,
long pos,
int length) |
long |
length()
Returns the number of bytes in the BLOB value designated by this Blob
object.
|
long |
position(java.sql.Blob pattern,
long start)
Finds the position of the given pattern in this BLOB.
|
long |
position(byte[] pattern,
long start) |
java.io.OutputStream |
setBinaryStream(long indexToWriteAt) |
int |
setBytes(long writeAt,
byte[] bytes) |
int |
setBytes(long writeAt,
byte[] bytes,
int offset,
int length) |
void |
truncate(long length) |
BlobFromLocator(ResultSetImpl creatorResultSetToSet, int blobColumnIndex, ExceptionInterceptor exceptionInterceptor) throws java.sql.SQLException
java.sql.SQLException
public java.io.OutputStream setBinaryStream(long indexToWriteAt) throws java.sql.SQLException
setBinaryStream
in interface java.sql.Blob
java.sql.SQLException
Blob.setBinaryStream(long)
public java.io.InputStream getBinaryStream() throws java.sql.SQLException
getBinaryStream
in interface java.sql.Blob
java.sql.SQLException
- if a database error occurspublic int setBytes(long writeAt, byte[] bytes, int offset, int length) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
java.sql.SQLException
Blob.setBytes(long, byte[], int, int)
public int setBytes(long writeAt, byte[] bytes) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
java.sql.SQLException
Blob.setBytes(long, byte[])
public byte[] getBytes(long pos, int length) throws java.sql.SQLException
getBytes
in interface java.sql.Blob
pos
- where to start the part of the BLOBlength
- the length of the part of the BLOB you want returned.pos
and having a length of length
.java.sql.SQLException
- if a database error occurspublic long length() throws java.sql.SQLException
length
in interface java.sql.Blob
java.sql.SQLException
- if a database error occurspublic long position(java.sql.Blob pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Blob
pattern
- the pattern to findstart
- where to start finding the patternjava.sql.SQLException
- if a database error occurspublic long position(byte[] pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Blob
java.sql.SQLException
Blob.position(byte[], long)
public void truncate(long length) throws java.sql.SQLException
truncate
in interface java.sql.Blob
java.sql.SQLException
Blob.truncate(long)
java.sql.PreparedStatement createGetBytesStatement() throws java.sql.SQLException
java.sql.SQLException
byte[] getBytesInternal(java.sql.PreparedStatement pStmt, long pos, int length) throws java.sql.SQLException
java.sql.SQLException
public void free() throws java.sql.SQLException
free
in interface java.sql.Blob
java.sql.SQLException
public java.io.InputStream getBinaryStream(long pos, long length) throws java.sql.SQLException
getBinaryStream
in interface java.sql.Blob
java.sql.SQLException