|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlite.jdbc.JdbcBlob
public class JdbcBlob
Constructor Summary | |
---|---|
JdbcBlob(Statement stmt,
int columnIndex)
default constructor. |
Method Summary | |
---|---|
void |
close()
Closes this BLOB object. |
BlobInputStream |
getBinaryStream()
Retrieves the BLOB value designated by this Blob instance as a stream. |
byte[] |
getBytes(long pos,
int len)
Retrieves all or part of the BLOB value that this Blob object represents, as an array of bytes. |
boolean |
isClosed()
Retrieves whether this BLOB object has been closed. |
long |
length()
Returns the number of bytes in the BLOB value designated by this Blob object. |
long |
position(java.sql.Blob pattern,
long start)
invoke position(byte[], long) method. |
long |
position(byte[] pattern,
long start)
Retrieves by the Boyer-Moore algorithm. |
java.io.OutputStream |
setBinaryStream(long pos)
Not supporetd yet. |
int |
setBytes(long pos,
byte[] bytes)
Not supporetd yet. |
int |
setBytes(long pos,
byte[] bytes,
int offset,
int len)
Not supporetd yet. |
void |
truncate(long len)
Not supporetd yet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcBlob(Statement stmt, int columnIndex) throws java.sql.SQLException
stmt
- the owner Statement objectcolumnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.Statement.getBlob(int)
,
Statement.getByteLength(int)
Method Detail |
---|
public long length() throws java.sql.SQLException
length
in interface java.sql.Blob
java.sql.SQLException
- SQLException is not generated.public byte[] getBytes(long pos, int len) throws java.sql.SQLException
getBytes
in interface java.sql.Blob
pos
- the ordinal position of the first byte in the BLOB value to be extracted; the first byte is at position 1len
- the number of consecutive bytes to be copied; the value for length must be 0 or greater
java.sql.SQLException
- When this method is called on a closed connection. When pos is less than 1 or length is less than 0public BlobInputStream getBinaryStream() throws java.sql.SQLException
getBinaryStream
in interface java.sql.Blob
java.sql.SQLException
- SQLException is not generated.public long position(byte[] pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Blob
pattern
- the byte array for which to searchstart
- the position at which to begin searching; the first position is 1
java.sql.SQLException
- When this method is called on a closed connection.getBytes(long, int)
public long position(java.sql.Blob pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Blob
pattern
- the Blob object designating the BLOB value for which to searchstart
- the position in the BLOB value at which to begin searching; the first position is 1
java.sql.SQLException
- When this method is called on a closed connection.position(byte[], long)
public int setBytes(long pos, byte[] bytes) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
java.lang.UnsupportedOperationException
java.sql.SQLException
public int setBytes(long pos, byte[] bytes, int offset, int len) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
java.lang.UnsupportedOperationException
java.sql.SQLException
public java.io.OutputStream setBinaryStream(long pos) throws java.sql.SQLException
setBinaryStream
in interface java.sql.Blob
java.lang.UnsupportedOperationException
java.sql.SQLException
public void truncate(long len) throws java.sql.SQLException
truncate
in interface java.sql.Blob
java.lang.UnsupportedOperationException
java.sql.SQLException
public void close()
public boolean isClosed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |