| java.lang.Object org.continuent.sequoia.common.protocol.ByteArrayBlob
ByteArrayBlob | public class ByteArrayBlob implements java.sql.Blob,Serializable(Code) | | The representation (mapping) in the Java TM
programming language of an SQL BLOB value. By default drivers
implement Blob using an SQL locator(BLOB) ,
which means that a Blob object contains a logical pointer to
the SQL BLOB data rather than the data itself. But since this
is highly database-specific, we are unable to do that and implement Blobs
using a simple private byte array copy instead. This may consume a lot of
memory but this is both portable across databases and even legal from a JDBC
standard point of view as long as our method
org.continuent.sequoia.driver.DatabaseMetaData.locatorsUpdateCopy returns true.
See Also: java.sql.Blob author: Marc Herbert since: JDK 1.2 |
Field Summary | |
byte[] | internalArray The binary data that makes up this BLOB . |
internalArray | byte[] internalArray(Code) | | The binary data that makes up this BLOB .
|
ByteArrayBlob | public ByteArrayBlob(byte[] src)(Code) | | Creates a new Blob object built from a copy of the given
byte array.
Parameters: src - the array to copy |
checkSQLRangeIsSupported | static void checkSQLRangeIsSupported(long sqlStart, int len) throws SQLException(Code) | | Checks that we can handle SQL indexes (sqlStart) and (sqlEnd =
sqlStart+len-1). Valid sqlStart begins at 1 (SQL-style). A reasonable
sqlEnd of Blob is no more than Integer.MAX_VALUE+1 because we implement
using Java arrays. This method is basically a check to use before casting
from long to int.
Parameters: sqlStart - start index Parameters: len - length throws: SQLException - |
free | public void free()(Code) | | This method frees the Blob object and releases the resources that it holds.
|
getInternalByteArray | byte[] getInternalByteArray()(Code) | | BlobOutputStream needs it
|
|
|