java.sql.Blob, java.sql.Clob, java.sql.NClobVirtuosoClobpublic class VirtuosoBlob
extends java.lang.Object
implements java.sql.Blob, java.sql.Clob, java.sql.NClob
Blob| Modifier and Type | Field | Description |
|---|---|---|
protected long |
bh_timestamp |
|
protected long |
dir_page |
|
protected int |
dtp |
|
protected long |
frag_no |
|
protected long |
key_id |
|
protected java.lang.Object |
pages |
| Modifier and Type | Method | Description |
|---|---|---|
void |
free() |
This method frees the
Blob object and releases the resources that
it holds. |
java.io.InputStream |
getAsciiStream() |
Gets the
CLOB value designated by this Clob
object as a stream of Ascii bytes. |
java.io.InputStream |
getBinaryStream() |
Retrieves the
BLOB designated by this
Blob instance as a stream. |
java.io.InputStream |
getBinaryStream(long pos,
long len) |
Returns an
InputStream object that contains a partial Blob value,
starting with the byte specified by pos, which is length bytes in 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. |
java.io.Reader |
getCharacterStream() |
Gets the
Clob contents as a Unicode stream. |
java.io.Reader |
getCharacterStream(long pos,
long len) |
|
java.lang.String |
getSubString(long pos,
int length) |
Returns a copy of the specified substring
in the
CLOB value
designated by this Clob object. |
int |
hashCode() |
Returns a hash code value for the object.
|
long |
length() |
Returns the number of bytes in the BLOB value
designated by this Blob object.
|
long |
position(byte[] pattern,
long start) |
Determines the byte position at which the specified byte
pattern begins within the BLOB
value that this Blob object represents. |
long |
position(java.lang.String searchstr,
long start) |
Determines the character position at which the specified substring
searchstr appears in the CLOB. |
long |
position(java.sql.Blob pattern,
long start) |
Determines the byte position in the
BLOB value
designated by this Blob object at which
pattern begins. |
long |
position(java.sql.Clob searchstr,
long start) |
Determines the character position at which the specified
Clob object searchstr appears in this
Clob object. |
java.io.OutputStream |
setAsciiStream(long pos) |
|
java.io.OutputStream |
setBinaryStream(long pos) |
|
int |
setBytes(long pos,
byte[] bytes) |
|
int |
setBytes(long pos,
byte[] bytes,
int offset,
int len) |
|
java.io.Writer |
setCharacterStream(long pos) |
|
protected void |
setInputStream(java.io.InputStream is,
long length) |
Set the input stream.
|
protected void |
setObject(java.lang.Object obj) |
Set the object.
|
protected void |
setReader(java.io.Reader rd,
long length) |
Set the reader.
|
int |
setString(long pos,
java.lang.String str) |
|
int |
setString(long pos,
java.lang.String str,
int offset,
int len) |
|
java.lang.String |
toString() |
Returns th String of the object.
|
void |
truncate(long len) |
protected int dtp
protected long key_id
protected long frag_no
protected long dir_page
protected long bh_timestamp
protected java.lang.Object pages
protected void setInputStream(java.io.InputStream is,
long length)
is - The new InputStream to consider.length - And its new length.protected void setReader(java.io.Reader rd,
long length)
rd - The new Reader to consider.length - And its new length.protected void setObject(java.lang.Object obj)
obj - The new Object to consider.public byte[] getBytes(long pos,
int length)
throws VirtuosoException
BLOB
value that this Blob object designates. The byte
array contains up to length consecutive bytes
starting at position pos.getBytes in interface java.sql.Blobpos - the ordinal position of the first byte in the
BLOB value to be extracted; the first byte is at
position 1length - is the number of consecutive bytes to be copiedlength
consecutive bytes from the BLOB value designated
by this Blob object, starting with the
byte at position pos.VirtuosoException - An internal error occurred.public java.lang.String getSubString(long pos,
int length)
throws VirtuosoException
CLOB value
designated by this Clob object.
The substring begins at position
pos and has up to length consecutive
characters.getSubString in interface java.sql.Clobpos - the first character of the substring to be extracted.
The first character is at position 1.length - the number of consecutive characters to be copiedString that is the specified substring in
the CLOB value designated by this Clob objectVirtuosoException - An internal error occurred.public long length()
throws VirtuosoException
length in interface java.sql.Bloblength in interface java.sql.ClobVirtuosoException - An internal error occurred.public java.io.InputStream getBinaryStream()
throws VirtuosoException
BLOB designated by this
Blob instance as a stream.getBinaryStream in interface java.sql.BlobBLOB dataVirtuosoException - An internal error occurred.public java.io.Reader getCharacterStream()
throws VirtuosoException
Clob contents as a Unicode stream.getCharacterStream in interface java.sql.ClobCLOB dataVirtuosoException - An internal error occurred.public java.io.InputStream getAsciiStream()
throws VirtuosoException
CLOB value designated by this Clob
object as a stream of Ascii bytes.getAsciiStream in interface java.sql.ClobCLOB dataVirtuosoException - An internal error occurred.public long position(byte[] pattern,
long start)
throws VirtuosoException
pattern begins within the BLOB
value that this Blob object represents. The
search for pattern. begins at position
start.position in interface java.sql.Blobpattern - the byte array for which to searchstart - the position at which to begin searching; the
first position is 1VirtuosoException - An internal error occurred.public long position(java.sql.Blob pattern,
long start)
throws VirtuosoException
BLOB value
designated by this Blob object at which
pattern begins. The search begins at position
start.position in interface java.sql.Blobpattern - 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 1VirtuosoException - An internal error occurred.public long position(java.lang.String searchstr,
long start)
throws VirtuosoException
searchstr appears in the CLOB. The search
begins at position start.position in interface java.sql.Clobsearchstr - the substring for which to searchstart - the position at which to begin searching; the first position
is 1VirtuosoException - An internal error occurred.public long position(java.sql.Clob searchstr,
long start)
throws VirtuosoException
Clob object searchstr appears in this
Clob object. The search begins at position
start.position in interface java.sql.Clobsearchstr - the Clob object for which to searchstart - the position at which to begin searching; the first
position is 1Clob object appears,
else -1; the first position is 1VirtuosoException - An internal error occurred.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int setString(long pos,
java.lang.String str,
int offset,
int len)
throws java.sql.SQLException
setString in interface java.sql.Clobjava.sql.SQLExceptionpublic int setString(long pos,
java.lang.String str)
throws java.sql.SQLException
setString in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.OutputStream setAsciiStream(long pos)
throws java.sql.SQLException
setAsciiStream in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.Writer setCharacterStream(long pos)
throws java.sql.SQLException
setCharacterStream in interface java.sql.Clobjava.sql.SQLExceptionpublic void truncate(long len)
throws java.sql.SQLException
truncate in interface java.sql.Blobtruncate in interface java.sql.Clobjava.sql.SQLExceptionpublic int setBytes(long pos,
byte[] bytes)
throws java.sql.SQLException
setBytes in interface java.sql.Blobjava.sql.SQLExceptionpublic int setBytes(long pos,
byte[] bytes,
int offset,
int len)
throws java.sql.SQLException
setBytes in interface java.sql.Blobjava.sql.SQLExceptionpublic java.io.OutputStream setBinaryStream(long pos)
throws java.sql.SQLException
setBinaryStream in interface java.sql.Blobjava.sql.SQLExceptionpublic java.io.InputStream getBinaryStream(long pos,
long len)
throws java.sql.SQLException
InputStream object that contains a partial Blob value,
starting with the byte specified by pos, which is length bytes in length.getBinaryStream in interface java.sql.Blobpos - the offset to the first byte of the partial value to be retrieved.
The first byte in the Blob is at position 1len - the length in bytes of the partial value to be retrievedInputStream through which the partial Blob value can be read.java.sql.SQLException - if pos is less than 1 or if pos is greater than the number of bytes
in the Blob or if pos + length is greater than the number of bytes
in the Blobjava.sql.SQLFeatureNotSupportedException - if the JDBC driver does not support
this methodpublic void free()
throws java.sql.SQLException
Blob object and releases the resources that
it holds. The object is invalid once the free
method is called.
After free has been called, any attempt to invoke a
method other than free will result in a SQLException
being thrown. If free is called multiple times, the subsequent
calls to free are treated as a no-op.
free in interface java.sql.Blobfree in interface java.sql.Clobjava.sql.SQLException - if an error occurs releasing
the Blob's resourcesjava.sql.SQLFeatureNotSupportedException - if the JDBC driver does not support
this methodpublic java.io.Reader getCharacterStream(long pos,
long len)
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobjava.sql.SQLException