Class BLOB
- All Implemented Interfaces:
Serializable,Blob,oracle.jdbc.internal.ACProxyable,oracle.jdbc.internal.OracleBlob,oracle.jdbc.internal.OracleConcreteProxy,oracle.jdbc.internal.OracleDatumWithConnection,oracle.jdbc.internal.OracleLargeObject<byte[]>,OracleBlob
Blob interface for declaration instead of using
concrete class oracle.sql.BLOB. java.sql.Blob has methods declared for
all opertions. For Oracle specific methods use the interface
OracleBlob.
Obtaining Blob from ResultSet
java.sql.Blob blob = resultSet.getBlob(...);
Creating temporary Blob from factory method, java.sql.Connection#crateBlob()
java.sql.Blob blob = connection.createBlob();
- See Also:
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.1907584: Changed MAX_CHUNK_SIZE from 32512 to 32768.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.protected oracle.jdbc.driver.OracleBlobDeprecated.Fields inherited from class oracle.sql.DatumWithConnection
targetDatumWithConnectionFields inherited from class oracle.sql.Datum
ojiOracleDatumWithConnection, targetDatum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Can the lob data be read directly from the locator?voidcloseLob()Deprecated.Close a previously opened BLOB.static BLOBcreateTemporary(Connection conn, boolean cache, int _duration) Deprecated.Create a temporary blob.static BLOBDeprecated.use getEmptyBLOB insteadvoidfree()Deprecated.Free the resources the blob holds.final Flow.Publisher<Void>Deprecated.Returns aPublisherthat publishes the result of freeing theBlobobject and the resources that it holds.voidfreeLOB()Deprecated.voidDeprecated.Free the contents and the locator of the temporary blob.static voidfreeTemporary(BLOB temp_lob) Deprecated.Free the contents and the locator of the temporary blob.Deprecated.This method is deprecated.getBinaryOutputStream(long pos) Deprecated.This method is deprecated -- use setBinaryStreamDeprecated.Implements the Blob interface function.getBinaryStream(boolean isInternal) Deprecated.Implements the Blob interface function.getBinaryStream(long pos) Deprecated.Read from the BLOB as a stream at the requested position.getBinaryStream(long pos, long length) Deprecated.Return a binary stream beginning at the specified position and ofthe specified length.intDeprecated.Oracle extension.byte[]getBytes(long pos, int length) Deprecated.Implements the Blob interface function.intgetBytes(long pos, int length, byte[] buf) Deprecated.Oracle extension.intDeprecated.Oracle extension.shortDeprecated.return the duration of a temporary LOBstatic shortgetDuration(BLOB lob) Deprecated.return the duration of a temporary LOBstatic BLOBDeprecated.Return a empty lob.Deprecated.Oracle extension Return the java.sql.Connection associated with the receiver.final oracle.jdbc.internal.OracleLargeObject.PrefetchData<byte[]>Deprecated.final intDeprecated.oracle.jdbc.driver.OracleBlobDeprecated.booleanisConvertibleTo(Class<?> jClass) Deprecated.Oracle extension.booleanDeprecated.Return true if the lob locator points to a empty blob.final booleanisFree()Deprecated.booleanDeprecated.Check whether the BLOB is opened.booleanDeprecated.Returnstrueif this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).booleanDeprecated.Return true if the lob locator points to a temporary blob.static booleanisTemporary(BLOB lob) Deprecated.Return true if the lob locator points to a temporary blob.longlength()Deprecated.Implements the Blob interface function.voidopen(int mode) Deprecated, for removal: This API element is subject to removal in a future version.The name of this method is anticipated to conflict with a future version of the JDBC Specification.voidopenLob(int mode) Deprecated.Open a BLOB in the indicated mode.voidopenLob(LargeObjectAccessMode mode) Deprecated.Public method using enum instead of intlongposition(byte[] pattern, long start) Deprecated.Implements the Blob interface function.longDeprecated.Implements the Blob interface function.final Flow.Publisher<byte[]>publisherOracle(long position, ErrorSet continueOnErrorSet) Deprecated.Returns aPublisherthat publishes the content of thisBlobbeginning at the specified position.intputBytes(long pos, byte[] bytes) Deprecated.This method is deprecated -- use setBytesintputBytes(long pos, byte[] bytes, int length) Deprecated.This method is deprecated -- use setBytessetBinaryStream(long pos) Deprecated.JDBC 3.0 Retrieves a stream that can be used to write to theBLOBvalue that thisBlobobject represents.voidsetBytes(byte[] locator) Deprecated.Sets datum value using a byte array.intsetBytes(long pos, byte[] bytes) Deprecated.JDBC 3.0 Writes the given array of bytes to theBLOBvalue that thisBlobobject represents, starting at positionpos, and returns the number of bytes written.intsetBytes(long pos, byte[] bytes, int offset, int len) Deprecated.JDBC 3.0 Writes all or part of the givenbytearray to theBLOBvalue that thisBlobobject represents and returns the number of bytes written.final voidsetPrefetchData(oracle.jdbc.internal.OracleLargeObject.PrefetchData<byte[]> prefetchData) Deprecated.final Flow.Subscriber<byte[]>subscriberOracle(long position, Flow.Subscriber<Long> outcomeSubscriber, ErrorSet continueOnErrorSet) Deprecated.Returns aSubscriberthat will append the published bytes to thisBlobbeginning at the specified position.final Flow.Subscriber<byte[]>subscriberOracle(long position, ErrorSet continueOnErrorSet) Deprecated.Returns aSubscriberthat will append the published bytes to thisBlobbeginning at the specified position.toJdbc()Deprecated.Oracle extension.toSQLXML()Deprecated.Returns an object which impements java.sql.SQLXML with content take from this Clob.toSQLXML(int csid) Deprecated.Returns an object which impements java.sql.SQLXML with content taken from this Blob.voidtrim(long newlen) Deprecated.This method id deprecated -- use truncatevoidtruncate(long len) Deprecated.JDBC 3.0 Truncates theBLOBvalue that thisBlobobject represents to belenbytes in length.Methods inherited from class oracle.sql.DatumWithConnection
assertNotNull, assertNotNull, getConnection, getConnectionDuringExceptionHandling, getOracleConnectionMethods inherited from class oracle.sql.Datum
bigDecimalValue, booleanValue, bytesEqual, bytesHashCode, byteValue, compareBytes, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, isNull, longValue, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue, toClassMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface oracle.jdbc.internal.OracleBlob
publisherOracle, subscriberOracle, subscriberOracleMethods inherited from interface oracle.jdbc.OracleBlob
close, isOpen, openMethods inherited from interface oracle.jdbc.internal.OracleDatumWithConnection
bigDecimalValue, booleanValue, byteValue, dateValue, doubleValue, floatValue, getBytes, getConnection, getInternalConnection, getLength, getOracleConnection, getStream, intValue, longValue, setPhysicalConnectionOf, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue
-
Field Details
-
MAX_CHUNK_SIZE
public static final int MAX_CHUNK_SIZEDeprecated.1907584: Changed MAX_CHUNK_SIZE from 32512 to 32768. This was done to accommodate larger DB_BLOCK_SIZEs. Using 32512 would cause getBufferSize() to return 32512 for DB_BLOCK_SIZEs from 8192-32768. For these block sizes getBufferSize() should return getChunkSize(); not 32512. By using 32768 as the MAX_CHUNK_SIZE, getBufferSize() returns the correct chunk size. Please see bug for details.- See Also:
-
DURATION_INVALID
public static final int DURATION_INVALIDDeprecated.- See Also:
-
DURATION_SESSION
public static final int DURATION_SESSIONDeprecated.- See Also:
-
DURATION_CALL
public static final int DURATION_CALLDeprecated.- See Also:
-
OLD_WRONG_DURATION_SESSION
public static final int OLD_WRONG_DURATION_SESSIONDeprecated.- See Also:
-
OLD_WRONG_DURATION_CALL
public static final int OLD_WRONG_DURATION_CALLDeprecated.- See Also:
-
MODE_READONLY
public static final int MODE_READONLYDeprecated.- See Also:
-
MODE_READWRITE
public static final int MODE_READWRITEDeprecated.- See Also:
-
target
protected oracle.jdbc.driver.OracleBlob targetDeprecated.
-
-
Constructor Details
-
BLOB
Deprecated.- Throws:
SQLException
-
BLOB
Deprecated.Call from empty lob static method- Throws:
SQLException
-
-
Method Details
-
getTarget
public oracle.jdbc.driver.OracleBlob getTarget()Deprecated. -
length
Deprecated.Implements the Blob interface function. Return the length of the Binary Large OBject in bytes.- Specified by:
lengthin interfaceBlob- Returns:
- length of the BLOB in bytes
- Throws:
SQLException
-
publisherOracle
public final Flow.Publisher<byte[]> publisherOracle(long position, ErrorSet continueOnErrorSet) throws SQLException Deprecated.Description copied from interface:OracleBlobReturns aPublisherthat publishes the content of thisBlobbeginning at the specified position. The argument to each call toSubscriber.onNextwill contain an implementation defined number of bytes.Calling any method of this
BlobexceptisEmptyLob(),isSecureFile(),isTemporary(), or one defined byObjectbetween the time this method is called and the time when the returned publisher terminates will block.The returned publisher terminates once all subscribers have received
Subscriber.onComplete, receivedSubscriber.onError, or cancelled their subscription.Upon signalling demand to the returned
Publisher, LOB read operations will enter into the execution pipeline of this LOB's connection. If an operation fails with an error not in thecontinueOnErrorSet, the pipeline will abort all subsequent asynchronous operations, up to the next#resume().- Specified by:
publisherOraclein interfaceOracleBlob- Parameters:
position- the position at which to start reading from the BLOB value that thisBlobobject represents; The first position is 1continueOnErrorSet- Set of errors which do not cause subsequent operations to be aborted. Not null.- Returns:
- a
Publisherof the content of thisBlob - Throws:
SQLException- if a database error occurs, or if this method is called on aBlobthat has been freed, or ifpositionis less than 1
-
subscriberOracle
public final Flow.Subscriber<byte[]> subscriberOracle(long position, ErrorSet continueOnErrorSet) throws SQLException Deprecated.Description copied from interface:OracleBlobReturns aSubscriberthat will append the published bytes to thisBlobbeginning at the specified position.Calling any method of this
BlobexceptisEmptyLob(),isSecureFile(),isTemporary(), or one defined byObjectbetween the time this method is called and the time when the returnedSubscriberterminates will block.The returned
Subscriberterminates onceSubscriber.onCompleteis received,Subscriber.onErroris received, or its subscription is cancelled.Upon receiving bytes from an upstream
Publisher, LOB write operations will enter into the execution pipeline of this LOB's connection. If an operation fails with an error not in thecontinueOnErrorSet, the pipeline will abort all subsequent asynchronous operations, up to the next#resume().- Specified by:
subscriberOraclein interfaceOracleBlob- Parameters:
position- the position at which to start reading from the BLOB value that thisBlobobject represents; The first position is 1continueOnErrorSet- Set of errors which do not cause subsequent operations to be aborted. Not null.- Returns:
- a
Subscriberthat appends bytes to thisBlob - Throws:
SQLException- if a database error occurs, or if this method is called on aBlobthat has been freed, or ifpositionis less than 1
-
subscriberOracle
public final Flow.Subscriber<byte[]> subscriberOracle(long position, Flow.Subscriber<Long> outcomeSubscriber, ErrorSet continueOnErrorSet) throws SQLException Deprecated.Description copied from interface:OracleBlobReturns aSubscriberthat will append the published bytes to thisBlobbeginning at the specified position.Calling any method of this
BlobexceptisEmptyLob(),isSecureFile(),isTemporary(), or one defined byObjectbetween the time this method is called and the time when the returnedSubscriberterminates will block.The returned
Subscriberterminates onceSubscriber.onCompleteis received,Subscriber.onErroris received, or its subscription is cancelled.The outcome of writing published bytes to the BLOB value that this Blob object represents is published to the
outcomeSubscriber:-
The
outcomeSubscriberreceives anonNextsignal each time a write to the BLOB value is successful. The number of bytes transferred in each successful write is the argument to each invocation ofonNext. -
The
outcomeSubscriberreceives anonCompletesignal after the last published byte has been written successfully. -
The
outcomeSubscriberreceives anonErrorsignal with aSQLExceptionif a failure occurs when writing published bytes.
The
outcomeSubscribermust signal demand in order to receive any of the signals listed above. If more thanFlow.defaultBufferSize()writes have succeeded without demand from theoutcomeSubscriber, then the returned subscriber will not signal further demand until theoutcomeSubscriberhas also signalled demand.The number of writes used to transfer published bytes to the BLOB value is implementation defined, and may be different from the number of byte arrays published to the returned
Subscriber.Upon receiving bytes from an upstream
Publisher, LOB write operations will enter into the execution pipeline of this LOB's connection. If an operation fails with an error not in thecontinueOnErrorSet, the pipeline will abort all subsequent asynchronous operations, up to the next#resume().- Specified by:
subscriberOraclein interfaceOracleBlob- Parameters:
position- the position at which to start reading from the BLOB value that thisBlobobject represents; The first position is 1outcomeSubscriber- aSubscriberof write outcomes.continueOnErrorSet- Set of errors which do not cause subsequent operations to be aborted. Not null.- Returns:
- a
Subscriberthat appends bytes to thisBlob - Throws:
SQLException- if a database error occurs, or if this method is called on aBlobthat has been freed, or ifpositionis less than 1
-
The
-
freeAsyncOracle
Deprecated.Returns aPublisherthat publishes the result of freeing theBlobobject and the resources that it holds. The object is invalid after the returnedPublisherterminates withonComplete.After the returned
Publisherterminates withonComplete, any attempt to invoke a method other thanBlob.free()orfreeAsyncOraclewill result in an SQLException being thrown. CallingfreeAsyncOracleon aBlobobject that has already been freed is treated as a no-op.Calling any method of this
BlobexceptisEmptyLob(),isSecureFile(),isTemporary(), or one defined byObjectbetween the time this method is called and the time when the returnedSubscriberterminates will block.The returned publisher terminates once all subscribers have received
Subscriber.onComplete, receivedSubscriber.onError, or cancelled their subscription.The returned publisher will only emit
onCompleteoronError; No items are emitted toonNext.Implements the Reactive Extensions API by delegating to the
ojiOracleBlob's implemenation.- Specified by:
freeAsyncOraclein interfaceOracleBlob- Returns:
- a
Publisherof the result of freeing thisBlob - Throws:
SQLException- if a database error occurs
-
getBytes
Deprecated.Implements the Blob interface function. Return a copy of the contents of the BLOB at the requested position.- Specified by:
getBytesin interfaceBlob- Parameters:
pos- is the first byte of the blob to be extracted.length- is the number of consecutive bytes to be copied.- Returns:
- a byte array containing a portion of the BLOB
If the
posargument is larger than the length of the data the result is null. If theposargument is less than the length of the data, but the sum ofposargument and thelengthis greater than the length of the data, the result will be smaller than the length requested. If thelengthis zero return and empty array - Throws:
SQLException
-
getBinaryStream
Deprecated.Implements the Blob interface function. Retrieve the entire BLOB as a stream.- Specified by:
getBinaryStreamin interfaceBlob- Returns:
- a stream containing the BLOB data
- Throws:
SQLException
-
getBinaryStream
Deprecated.Implements the Blob interface function. Retrieve the entire BLOB as a stream.- Returns:
- a stream containing the BLOB data
- Throws:
SQLException
-
position
Deprecated.Implements the Blob interface function. Determine the byte position at which the given byte pattern- Specified by:
positionin interfaceBlob- Parameters:
pattern- is the pattern to search for.start- is the position at which to begin searching.- Returns:
- the position at which the pattern appears, else -1.
- Throws:
SQLException
-
position
Deprecated.Implements the Blob interface function. Determine the byte position at which the given pattern- Specified by:
positionin interfaceBlob- Parameters:
pattern- is the pattern to search for.start- is the position at which to begin searching.- Returns:
- the position at which the pattern appears, else -1.
- Throws:
SQLException
-
getBytes
Deprecated.Oracle extension. Copy the contents of the BLOB at the requested position to suppied buffer.- Specified by:
getBytesin interfaceOracleBlob- Parameters:
pos- is the first byte of the blob to be extracted.length- is the number of consecutive bytes to be copied.buf- is the buffer to had the extracted bytes.- Returns:
- a byte array containing a portion of the BLOB
- Throws:
SQLException
-
putBytes
Deprecated.This method is deprecated -- use setBytesOracle extension. Put data to the BLOB at the requested position.- Specified by:
putBytesin interfaceoracle.jdbc.internal.OracleBlob- Parameters:
pos- is the position data to be put.bytes- is the data to be written into BLOB.- Returns:
- the number of bytes actually written.
- Throws:
SQLException
-
putBytes
Deprecated.This method is deprecated -- use setBytesOracle extension. Put data to the BLOB at the requested position.- Specified by:
putBytesin interfaceoracle.jdbc.internal.OracleBlob- Parameters:
pos- is the position data to be put.bytes- is the data to be written into BLOB.length- is the length of the data to be written into BLOB.- Returns:
- the number of bytes actually written.
- Throws:
SQLException
-
getBinaryOutputStream
Deprecated.This method is deprecated. Use setBinaryStream(1L).Oracle extension. Write to the BLOB from a stream.- Specified by:
getBinaryOutputStreamin interfaceoracle.jdbc.internal.OracleBlob- Returns:
- a output stream to write data to the BLOB
- Throws:
SQLException
-
getChunkSize
Deprecated.Oracle extension. Get database LOB storage chunk size in database.- Specified by:
getChunkSizein interfaceoracle.jdbc.internal.OracleBlob- Returns:
- size in bytes
- Throws:
SQLException
-
getBufferSize
Deprecated.Oracle extension. Get ideal LOB db access buffer size.- Specified by:
getBufferSizein interfaceoracle.jdbc.internal.OracleBlob- Returns:
- size in bytes
- Throws:
SQLException
-
empty_lob
Deprecated.use getEmptyBLOB insteadReturn a empty lob. An empty lob is used initialize a LOB column/attribute. Note: an empty lob can not be read or written- Returns:
- a empty lob
- Throws:
SQLException- Since:
- 8.1.7
-
getEmptyBLOB
Deprecated.Return a empty lob. An empty lob is used initialize a BLOB column/attribute. Note: an empty lob can not be read or written- Returns:
- a empty lob
- Throws:
SQLException- Since:
- 10.2
-
isEmptyLob
Deprecated.Return true if the lob locator points to a empty blob. False if it does not. This method supports only Blobs that are not returned from the database. For Blobs returned from the database, use length(), i.e. check for zero length.- Specified by:
isEmptyLobin interfaceOracleBlob- Returns:
- true if the lob locator points to a empty blob. False if it does not.
- Throws:
SQLException- Since:
- 8.1.7
-
isSecureFile
Deprecated.Returnstrueif this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).- Specified by:
isSecureFilein interfaceOracleBlob- Returns:
trueif this is a SecureFile andfalseotherwise.- Throws:
SQLException
-
getBinaryOutputStream
Deprecated.This method is deprecated -- use setBinaryStreamWrite to the BLOB from a stream at the requested position.- Specified by:
getBinaryOutputStreamin interfaceoracle.jdbc.internal.OracleBlob- Parameters:
pos- is the position data to be put.- Returns:
- a output stream to write data to the BLOB
- Throws:
SQLException- Since:
- 8.2.0
-
getBinaryStream
Deprecated.Read from the BLOB as a stream at the requested position.- Specified by:
getBinaryStreamin interfaceOracleBlob- Parameters:
pos- is the position data to be read, should be greater than 0.- Returns:
- a input stream to read data from the BLOB
- Throws:
SQLException- Since:
- 8.2.0
-
trim
Deprecated.This method id deprecated -- use truncateTrim the value of the BLOB to the length you specify in the newlen parameter.- Specified by:
trimin interfaceoracle.jdbc.internal.OracleBlob- Parameters:
newlen- the new length of the BLOB.- Throws:
SQLException- Since:
- 8.2.0
-
createTemporary
public static BLOB createTemporary(Connection conn, boolean cache, int _duration) throws SQLException Deprecated.Create a temporary blob.- Parameters:
cache- Specifies if LOB should be read into buffer cache or not._duration- The duration of the temporary LOB. The following are valid values: DURATION_SESSION, DURATION_CALL.- Returns:
- A temporary blob.
- Throws:
SQLException- Since:
- 8.2.0
-
freeTemporary
Deprecated.Free the contents and the locator of the temporary blob.- Parameters:
temp_lob- A temporary blob to be freeed.- Throws:
SQLException- if temp_lob is a permanent lob or temp_lob has already been freed.- Since:
- 8.2.0
-
isTemporary
Deprecated.Return true if the lob locator points to a temporary blob. False if it does not.- Parameters:
lob- the blob to test.- Returns:
- true if the lob locator points to a temporary blob. False if it does not.
- Throws:
SQLException- Since:
- 8.2.0
-
getDuration
Deprecated.return the duration of a temporary LOB- Returns:
- the duration of a temporary LOB
- Throws:
SQLException- Since:
- 18.1
-
freeTemporary
Deprecated.Free the contents and the locator of the temporary blob.- Specified by:
freeTemporaryin interfaceoracle.jdbc.internal.OracleLargeObject<byte[]>- Throws:
SQLException- if self is a permanent lob or self has already been freed.- Since:
- 8.2.0
-
isTemporary
Deprecated.Return true if the lob locator points to a temporary blob. False if it does not.- Specified by:
isTemporaryin interfaceOracleBlob- Specified by:
isTemporaryin interfaceoracle.jdbc.internal.OracleLargeObject<byte[]>- Returns:
- true if the lob locator points to a temporary blob. False if it does not.
- Throws:
SQLException- Since:
- 8.2.0
-
getDuration
Deprecated.return the duration of a temporary LOB- Specified by:
getDurationin interfaceoracle.jdbc.internal.OracleLargeObject<byte[]>- Returns:
- the duration of a temporary LOB
- Throws:
SQLException- Since:
- 18.1
-
openLob
Deprecated.Public method using enum instead of int- Specified by:
openLobin interfaceOracleBlob- Throws:
SQLException- Since:
- 23.5
-
open
Deprecated, for removal: This API element is subject to removal in a future version.The name of this method is anticipated to conflict with a future version of the JDBC Specification. This method will be removed in a future version of the Oracle JDBC Driver. Any calls to this method should be replaced with a call toopenLob(int), which provides the exact same behavior.Open a BLOB in the indicated mode. Valid modes include MODE_READONLY, and MODE_READWRITE. It is an error to open the same LOB twice.- Throws:
SQLException- Since:
- 8.2.0
-
openLob
Deprecated.Open a BLOB in the indicated mode. Valid modes include MODE_READONLY, and MODE_READWRITE. It is an error to open the same LOB twice.- Throws:
SQLException- Since:
- 23.5
-
closeLob
Deprecated.Close a previously opened BLOB.- Specified by:
closeLobin interfaceOracleBlob- Throws:
SQLException- Since:
- 23.5
-
isOpenLob
Deprecated.Check whether the BLOB is opened.- Specified by:
isOpenLobin interfaceOracleBlob- Returns:
- true if the LOB is opened.
- Throws:
SQLException- Since:
- 23.5
-
setBytes
Deprecated.JDBC 3.0 Writes the given array of bytes to theBLOBvalue that thisBlobobject represents, starting at positionpos, and returns the number of bytes written.- Specified by:
setBytesin interfaceBlob- Parameters:
pos- the position in theBLOBobject at which to start writingbytes- the array of bytes to be written to theBLOBvalue that thisBlobobject represents- Returns:
- the number of bytes written
- Throws:
SQLException- if there is an error accessing theBLOBvalue- Since:
- 9.0.2
-
setBytes
Deprecated.JDBC 3.0 Writes all or part of the givenbytearray to theBLOBvalue that thisBlobobject represents and returns the number of bytes written. Writing starts at positionposin theBLOBvalue;lenbytes from the given byte array are written.- Specified by:
setBytesin interfaceBlob- Parameters:
pos- the position in theBLOBobject at which to start writingbytes- the array of bytes to be written to thisBLOBobjectoffset- the offset into the arraybytesat which to start reading the bytes to be setlen- the number of bytes to be written to theBLOBvalue from the array of bytesbytes- Returns:
- the number of bytes written
- Throws:
SQLException- if there is an error accessing theBLOBvalue- Since:
- 9.0.2
-
setBinaryStream
Deprecated.JDBC 3.0 Retrieves a stream that can be used to write to theBLOBvalue that thisBlobobject represents. The stream begins at positionpos.- Specified by:
setBinaryStreamin interfaceBlob- Parameters:
pos- the position in theBLOBvalue at which to start writing- Returns:
- a
java.io.OutputStreamobject to which data can be written - Throws:
SQLException- if there is an error accessing theBLOBvalue- Since:
- 9.0.2
- See Also:
-
truncate
Deprecated.JDBC 3.0 Truncates theBLOBvalue that thisBlobobject represents to belenbytes in length.- Specified by:
truncatein interfaceBlob- Parameters:
len- the length, in bytes, to which theBLOBvalue that thisBlobobject represents should be truncated- Throws:
SQLException- if there is an error accessing theBLOBvalue- Since:
- 9.0.2
-
toJdbc
Deprecated.Oracle extension. Convert this data object into its default Java object type.- Specified by:
toJdbcin interfaceoracle.jdbc.internal.OracleBlob- Specified by:
toJdbcin interfaceoracle.jdbc.internal.OracleDatumWithConnection- Specified by:
toJdbcin classDatum- Returns:
- this object.
- Throws:
SQLException- if any of the lower layer code throws an exception.
-
isConvertibleTo
Deprecated.Oracle extension. Test whether this data object can be converted to the specified Java data type.- Specified by:
isConvertibleToin interfaceoracle.jdbc.internal.OracleBlob- Specified by:
isConvertibleToin interfaceoracle.jdbc.internal.OracleDatumWithConnection- Specified by:
isConvertibleToin classDatum- Parameters:
jClass- specifies the Java data type to test against.- Returns:
- true if this data object is convertible to the specified Java class, and a corresponding xxxValue() method is available; otherwise, a false is returned.
-
getJavaSqlConnection
Deprecated.Description copied from class:DatumWithConnectionOracle extension Return the java.sql.Connection associated with the receiver. Since 9.0.0 not all Oracle JDBC connection objects are assignment compatible with oracle.jdbc.driver.OracleConnection. If the connection is wrapped, return the outermost wrapper.- Specified by:
getJavaSqlConnectionin interfaceoracle.jdbc.internal.OracleBlob- Specified by:
getJavaSqlConnectionin interfaceoracle.jdbc.internal.OracleDatumWithConnection- Overrides:
getJavaSqlConnectionin classDatumWithConnection- Returns:
- the connection
- Throws:
SQLException- if an error occurs
-
setPrefetchData
public final void setPrefetchData(oracle.jdbc.internal.OracleLargeObject.PrefetchData<byte[]> prefetchData) Deprecated.- Specified by:
setPrefetchDatain interfaceoracle.jdbc.internal.OracleLargeObject<byte[]>
-
getPrefetchData
public final oracle.jdbc.internal.OracleLargeObject.PrefetchData<byte[]> getPrefetchData()Deprecated.- Specified by:
getPrefetchDatain interfaceoracle.jdbc.internal.OracleLargeObject<byte[]>
-
getPrefetchedDataSize
public final int getPrefetchedDataSize()Deprecated. -
canReadBasicLobDataInLocator
Deprecated.Can the lob data be read directly from the locator?- Specified by:
canReadBasicLobDataInLocatorin interfaceoracle.jdbc.internal.OracleBlob- Returns:
- True if we can; false otherwise.
- Throws:
SQLException
-
freeLOB
Deprecated.- Specified by:
freeLOBin interfaceoracle.jdbc.internal.OracleLargeObject<byte[]>- Throws:
SQLException
-
free
Deprecated.Free the resources the blob holds.- Specified by:
freein interfaceBlob- Throws:
SQLException- Since:
- 11.0
-
getBinaryStream
Deprecated.Return a binary stream beginning at the specified position and ofthe specified length.- Specified by:
getBinaryStreamin interfaceBlob- Parameters:
pos- start positionlength- number of bytes in the result- Throws:
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 Blob.- Since:
- 11.0
-
setBytes
public void setBytes(byte[] locator) Deprecated.Description copied from class:DatumSets datum value using a byte array. The byte array is copied. -
toSQLXML
Deprecated.Returns an object which impements java.sql.SQLXML with content take from this Clob.- Specified by:
toSQLXMLin interfaceOracleBlob- Returns:
- the new SQLXML object
- Throws:
SQLException- Since:
- 12.2
-
toSQLXML
Deprecated.Returns an object which impements java.sql.SQLXML with content taken from this Blob.- Specified by:
toSQLXMLin interfaceOracleBlob- Returns:
- the new SQLXML object
- Throws:
SQLException- Since:
- 12.2
-
isFree
public final boolean isFree()Deprecated.- Specified by:
isFreein interfaceoracle.jdbc.internal.OracleLargeObject<byte[]>
-