|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.sql.Datum oracle.sql.DatumWithConnection oracle.sql.BFILE
public class BFILE
A class for Oracle specific data type BFILE.
Field Summary | |
---|---|
static java.lang.String |
BUILD_DATE
|
static int |
MAX_CHUNK_SIZE
|
static int |
MODE_READONLY
|
static int |
MODE_READWRITE
|
static boolean |
TRACE
|
Method Summary | |
---|---|
java.io.InputStream |
asciiStreamValue()
Convert to an ascii stream representation of the datum object |
void |
close()
Close a previously opened external LOB. |
void |
closeFile()
Close the FILE. |
boolean |
fileExists()
Find out if a given BFILE (whose locator) points to a file that actually exists on the server's filesystem. |
java.io.InputStream |
getBinaryStream()
Retrieve the entire BFILE as a stream. |
java.io.InputStream |
getBinaryStream(long pos)
Read from the external LOB as a stream at the requested position. |
byte[] |
getBytes(long pos,
int length)
Return a copy of the contents of the BFILE at the requested position. |
int |
getBytes(long pos,
int length,
byte[] buf)
Copy the contents of the BFILE at the requested position to suppied buffer. |
java.lang.String |
getDirAlias()
Gets the Bfile's directory alias. |
java.sql.Connection |
getJavaSqlConnection()
Oracle extension Return the java.sql.Connection associated with the receiver. |
java.lang.String |
getName()
Gets the Bfile's file name. |
boolean |
isConvertibleTo(java.lang.Class jClass)
Test whether this data object can be converted to the specified Java data type. |
boolean |
isFileOpen()
Find out whether a BFILE was opened with the give BFILE. |
boolean |
isOpen()
Check whether the external LOB is opened. |
long |
length()
The length of the BFILE in bytes. |
void |
open()
Open a external LOB in the readonly mode. |
void |
open(int mode)
Open a external LOB in the indicated mode. |
void |
open(LargeObjectAccessMode mode)
Public method using enum instead of int |
void |
openFile()
Open the FILE. |
long |
position(BFILE pattern,
long start)
Determine the byte position at which the given pattern |
long |
position(byte[] pattern,
long start)
Determine the byte position at which the given byte pattern |
long |
position(OracleBfile pattern,
long start)
Determine the byte position at which the given pattern |
java.lang.Object |
toJdbc()
Convert this data object into its default Java object type. |
Methods inherited from class oracle.sql.DatumWithConnection |
---|
assertNotNull, assertNotNull, getConnection, getOracleConnection |
Methods inherited from class oracle.sql.Datum |
---|
bigDecimalValue, booleanValue, byteValue, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, longValue, setBytes, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jdbc.internal.OracleDatumWithConnection |
---|
bigDecimalValue, booleanValue, byteValue, dateValue, doubleValue, floatValue, getBytes, getConnection, getInternalConnection, getLength, getOracleConnection, getStream, intValue, longValue, setBytes, setPhysicalConnectionOf, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue |
Field Detail |
---|
public static final int MAX_CHUNK_SIZE
public static final int MODE_READONLY
public static final int MODE_READWRITE
public static final java.lang.String BUILD_DATE
public static final boolean TRACE
Method Detail |
---|
public long length() throws java.sql.SQLException
length
in interface OracleBfile
java.sql.SQLException
public byte[] getBytes(long pos, int length) throws java.sql.SQLException
getBytes
in interface OracleBfile
pos
- is the first byte of the bfile to be extracted.(1-based)length
- is the number of consecutive bytes to be copied.
java.sql.SQLException
public int getBytes(long pos, int length, byte[] buf) throws java.sql.SQLException
getBytes
in interface OracleBfile
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.
java.sql.SQLException
public java.io.InputStream getBinaryStream() throws java.sql.SQLException
getBinaryStream
in interface OracleBfile
java.sql.SQLException
public long position(byte[] pattern, long start) throws java.sql.SQLException
position
in interface OracleBfile
pattern
- is the pattern to search for.start
- is the position at which to begin searching. (1-based)
java.sql.SQLException
public long position(BFILE pattern, long start) throws java.sql.SQLException
pattern
- is the pattern to search for.start
- is the position at which to begin searching. (1-based)
java.sql.SQLException
public long position(OracleBfile pattern, long start) throws java.sql.SQLException
position
in interface OracleBfile
pattern
- is the pattern to search for.start
- is the position at which to begin searching. (1-based)
java.sql.SQLException
public java.lang.String getName() throws java.sql.SQLException
getName
in interface OracleBfile
bfile
- The Bfile for which to get the file name.
java.sql.SQLException
public java.lang.String getDirAlias() throws java.sql.SQLException
getDirAlias
in interface OracleBfile
bfile
- The Bfile for which to get the directory alias.
java.sql.SQLException
public void openFile() throws java.sql.SQLException
openFile
in interface OracleBfile
bfile
- The BFILE object to be opened.
java.sql.SQLException
public boolean isFileOpen() throws java.sql.SQLException
isFileOpen
in interface OracleBfile
bfile
- The Bfile to be tested.
java.sql.SQLException
public boolean fileExists() throws java.sql.SQLException
fileExists
in interface OracleBfile
bfile
- The Bfile to be tested.
java.sql.SQLException
public void closeFile() throws java.sql.SQLException
closeFile
in interface OracleBfile
bfile
- The Bfile to be closed.
java.sql.SQLException
public java.io.InputStream getBinaryStream(long pos) throws java.sql.SQLException
getBinaryStream
in interface OracleBfile
pos
- is the position data to be read.
java.sql.SQLException
public void open() throws java.sql.SQLException
java.sql.SQLException
public void open(LargeObjectAccessMode mode) throws java.sql.SQLException
open
in interface OracleBfile
java.sql.SQLException
public void open(int mode) throws java.sql.SQLException
java.sql.SQLException
public void close() throws java.sql.SQLException
close
in interface OracleBfile
java.sql.SQLException
public boolean isOpen() throws java.sql.SQLException
isOpen
in interface OracleBfile
java.sql.SQLException
public java.lang.Object toJdbc() throws java.sql.SQLException
toJdbc
in interface oracle.jdbc.internal.OracleDatumWithConnection
toJdbc
in class Datum
java.sql.SQLException
- if any of the lower layer code throws an exception.public boolean isConvertibleTo(java.lang.Class jClass)
isConvertibleTo
in interface oracle.jdbc.internal.OracleDatumWithConnection
isConvertibleTo
in class Datum
jClass
- specifies the Java data type to test against.
public java.io.InputStream asciiStreamValue() throws java.sql.SQLException
asciiStreamValue
in interface oracle.jdbc.internal.OracleDatumWithConnection
asciiStreamValue
in class Datum
SQLException,
- if no ascii stream representation exists
java.sql.SQLException
public java.sql.Connection getJavaSqlConnection() throws java.sql.SQLException
DatumWithConnection
getJavaSqlConnection
in interface oracle.jdbc.internal.OracleDatumWithConnection
getJavaSqlConnection
in class DatumWithConnection
java.sql.SQLException
- if an error occurs
|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |