Class BFILE
- All Implemented Interfaces:
Serializable,oracle.jdbc.internal.ACProxyable,oracle.jdbc.internal.OracleBfile,oracle.jdbc.internal.OracleConcreteProxy,oracle.jdbc.internal.OracleDatumWithConnection,OracleBfile
OracleBfile interface for declaration instead of using
concrete class oracle.sql.BFILE. OracleBfile has methods
declared for all opertions.
Obtaining OracleBfile from a ResultSet
oracle.jdbc.OracleBfile bfile = ((OracleResultSet)resultSet).getBFILE(...);
There is no way to create OracleBfile on the client
side.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.static final intDeprecated.protected oracle.jdbc.driver.OracleBfileDeprecated.Fields inherited from class oracle.sql.DatumWithConnection
targetDatumWithConnectionFields inherited from class oracle.sql.Datum
ojiOracleDatumWithConnection, targetDatum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Convert to an ascii stream representation of the datum objectvoidDeprecated.Close the FILE.voidcloseLob()Deprecated.Close a previously opened external LOB.booleanDeprecated.Find out if a given BFILE (whose locator) points to a file that actually exists on the server's filesystem.Deprecated.Retrieve the entire BFILE as a stream.getBinaryStream(long pos) Deprecated.Read from the external LOB as a stream at the requested position.byte[]getBytes(long pos, int length) Deprecated.Return a copy of the contents of the BFILE at the requested position.intgetBytes(long pos, int length, byte[] buf) Deprecated.Copy the contents of the BFILE at the requested position to suppied buffer.Deprecated.Gets the Bfile's directory alias.Deprecated.Oracle extension Return the java.sql.Connection associated with the receiver.getName()Deprecated.Gets the Bfile's file name.oracle.jdbc.driver.OracleBfileDeprecated.booleanisConvertibleTo(Class<?> jClass) Deprecated.Test whether this data object can be converted to the specified Java data type.booleanDeprecated.Find out whether a BFILE was opened with the give BFILE.booleanDeprecated.Check whether the external LOB is opened.longlength()Deprecated.The length of the BFILE in bytes.voidopen()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.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.voidopenFile()Deprecated.Open the FILE.voidopenLob()Deprecated.Open a external LOB in the readonly mode.voidopenLob(int mode) Deprecated.Open a external LOB in the indicated mode.voidopenLob(LargeObjectAccessMode mode) Deprecated.Public method using enum instead of intlongposition(byte[] pattern, long start) Deprecated.Determine the byte position at which the given byte patternlongposition(OracleBfile pattern, long start) Deprecated.Determine the byte position at which the given patternlongDeprecated.Determine the byte position at which the given patternfinal Flow.Publisher<byte[]>publisherOracle(long position, ErrorSet continueOnErrorSet) Deprecated.Returns aPublisherthat publishes the content of thisBFilebeginning at the specified position.voidsetBytes(byte[] locator) Deprecated.Sets datum value using a byte array.toJdbc()Deprecated.Convert this data object into its default Java object type.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.OracleBfile
publisherOracleMethods inherited from interface oracle.jdbc.OracleBfile
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.- 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.OracleBfile targetDeprecated.
-
-
Constructor Details
-
BFILE
Deprecated.- Throws:
SQLException
-
-
Method Details
-
getTarget
public oracle.jdbc.driver.OracleBfile getTarget()Deprecated. -
length
Deprecated.The length of the BFILE in bytes.- Specified by:
lengthin interfaceOracleBfile- Returns:
- length of the BFILE in bytes
- Throws:
SQLException
-
getBytes
Deprecated.Return a copy of the contents of the BFILE at the requested position.- Specified by:
getBytesin interfaceOracleBfile- Parameters:
pos- is the first byte of the bfile to be extracted.(1-based)length- is the number of consecutive bytes to be copied.- Returns:
- a byte array containing a portion of the BFILE
- Throws:
SQLException
-
getBytes
Deprecated.Copy the contents of the BFILE at the requested position to suppied buffer.- Specified by:
getBytesin interfaceOracleBfile- Parameters:
pos- is the first byte of the bfile to be extracted. (1-based)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 BFILE
- Throws:
SQLException
-
getBinaryStream
Deprecated.Retrieve the entire BFILE as a stream.- Specified by:
getBinaryStreamin interfaceOracleBfile- Returns:
- a stream containing the BFILE data
- Throws:
SQLException
-
position
Deprecated.Determine the byte position at which the given byte pattern- Specified by:
positionin interfaceOracleBfile- Parameters:
pattern- is the pattern to search for.start- is the position at which to begin searching. (1-based)- Returns:
- the position at which the pattern appears, else -1.
- Throws:
SQLException
-
position
Deprecated.Determine the byte position at which the given pattern- Specified by:
positionin interfaceoracle.jdbc.internal.OracleBfile- Parameters:
pattern- is the pattern to search for.start- is the position at which to begin searching. (1-based)- Returns:
- the position at which the pattern appears, else -1.
- Throws:
SQLException
-
position
Deprecated.Determine the byte position at which the given pattern- Specified by:
positionin interfaceOracleBfile- Parameters:
pattern- is the pattern to search for.start- is the position at which to begin searching. (1-based)- Returns:
- the position at which the pattern appears, else -1.
- Throws:
SQLException
-
getName
Deprecated.Gets the Bfile's file name.- Specified by:
getNamein interfaceOracleBfile- Parameters:
bfile- The Bfile for which to get the file name.- Returns:
- The file name.
- Throws:
SQLException
-
getDirAlias
Deprecated.Gets the Bfile's directory alias.- Specified by:
getDirAliasin interfaceOracleBfile- Parameters:
bfile- The Bfile for which to get the directory alias.- Returns:
- The directory alias name.
- Throws:
SQLException
-
openFile
Deprecated.Open the FILE.- Specified by:
openFilein interfaceOracleBfile- Parameters:
bfile- The BFILE object to be opened.- Throws:
SQLException
-
isFileOpen
Deprecated.Find out whether a BFILE was opened with the give BFILE.- Specified by:
isFileOpenin interfaceOracleBfile- Parameters:
bfile- The Bfile to be tested.- Returns:
- true if the BFILE was opened, false if it was not opened.
- Throws:
SQLException
-
fileExists
Deprecated.Find out if a given BFILE (whose locator) points to a file that actually exists on the server's filesystem.- Specified by:
fileExistsin interfaceOracleBfile- Parameters:
bfile- The Bfile to be tested.- Returns:
- true if the physical file exists, false if it does not exist.
- Throws:
SQLException
-
closeFile
Deprecated.Close the FILE.- Specified by:
closeFilein interfaceOracleBfile- Parameters:
bfile- The Bfile to be closed.- Throws:
SQLException
-
getBinaryStream
Deprecated.Read from the external LOB as a stream at the requested position.- Specified by:
getBinaryStreamin interfaceOracleBfile- Parameters:
pos- is the position data to be read.- Returns:
- a input stream to read data from the BFILE
- Throws:
SQLException- Since:
- 8.2.0
-
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(), which provides the exact same behavior.Open a external LOB in the readonly mode. It is an error to open the same LOB twice.- Throws:
SQLException- Since:
- 8.2.0
-
openLob
Deprecated.Open a external LOB in the readonly mode. It is an error to open the same LOB twice.- Throws:
SQLException- Since:
- 23.5
-
openLob
Deprecated.Public method using enum instead of int- Specified by:
openLobin interfaceOracleBfile- 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 external LOB in the indicated mode. Valid modes include MODE_READONLY only. It is an error to open the same LOB twice.- Throws:
SQLException- Since:
- 8.2.0
-
openLob
Deprecated.Open a external LOB in the indicated mode. Valid modes include MODE_READONLY only. It is an error to open the same LOB twice.- Throws:
SQLException- Since:
- 23.5
-
closeLob
Deprecated.Close a previously opened external LOB.- Specified by:
closeLobin interfaceOracleBfile- Throws:
SQLException- Since:
- 23.5
-
isOpenLob
Deprecated.Check whether the external LOB is opened.- Specified by:
isOpenLobin interfaceOracleBfile- Returns:
- true if the LOB is opened.
- Throws:
SQLException- Since:
- 23.5
-
toJdbc
Deprecated.Convert this data object into its default Java object type.- Specified by:
toJdbcin interfaceoracle.jdbc.internal.OracleBfile- 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.Test whether this data object can be converted to the specified Java data type.- Specified by:
isConvertibleToin interfaceoracle.jdbc.internal.OracleBfile- 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.
-
asciiStreamValue
Deprecated.Convert to an ascii stream representation of the datum object- Specified by:
asciiStreamValuein interfaceoracle.jdbc.internal.OracleBfile- Specified by:
asciiStreamValuein interfaceoracle.jdbc.internal.OracleDatumWithConnection- Overrides:
asciiStreamValuein classDatum- Returns:
- ascii stream representation of the datum object
- Throws:
SQLException
-
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.OracleBfile- Specified by:
getJavaSqlConnectionin interfaceoracle.jdbc.internal.OracleDatumWithConnection- Overrides:
getJavaSqlConnectionin classDatumWithConnection- Returns:
- the connection
- Throws:
SQLException- if an error occurs
-
setBytes
public void setBytes(byte[] locator) Deprecated.Description copied from class:DatumSets datum value using a byte array. The byte array is copied. -
publisherOracle
public final Flow.Publisher<byte[]> publisherOracle(long position, ErrorSet continueOnErrorSet) throws SQLException Deprecated.Description copied from interface:OracleBfileReturns aPublisherthat publishes the content of thisBFilebeginning at the specified position. The argument to each call toSubscriber.onNextwill contain an implementation defined number of bytes.Calling any method of this
BFileexceptfileExists(),getDirAlias(),getName(), 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 interfaceOracleBfile- Parameters:
position- the position at which to start reading from the BFILE value that thisBfileobject 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 thisBFile - Throws:
SQLException- if a database error occurs or ifpositionis less than 1
-