public interface OracleBfile
Modifier and Type | Method and Description |
---|---|
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 supplied
buffer.
|
java.lang.String |
getDirAlias()
Gets the Bfile's directory alias.
|
java.lang.String |
getName()
Gets the Bfile's file name.
|
boolean |
isFileOpen()
Find out whether a BFILE was opened
|
boolean |
isOpen()
Check whether the external LOB is opened.
|
long |
length()
The length of the BFILE in bytes.
|
void |
open(LargeObjectAccessMode mode)
Open an external LOB in the indicated mode.
|
void |
openFile()
Open the FILE.
|
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
|
long length() throws java.sql.SQLException
java.sql.SQLException
byte[] getBytes(long pos, int length) throws java.sql.SQLException
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
int getBytes(long pos, int length, byte[] buf) throws java.sql.SQLException
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 have the extracted bytes.java.sql.SQLException
java.io.InputStream getBinaryStream() throws java.sql.SQLException
java.sql.SQLException
java.io.InputStream getBinaryStream(long pos) throws java.sql.SQLException
pos
- is the position of data to be read. The first position is 1.java.sql.SQLException
long position(byte[] 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
long position(OracleBfile 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
java.lang.String getName() throws java.sql.SQLException
java.sql.SQLException
java.lang.String getDirAlias() throws java.sql.SQLException
java.sql.SQLException
void openFile() throws java.sql.SQLException
java.sql.SQLException
boolean isFileOpen() throws java.sql.SQLException
java.sql.SQLException
boolean fileExists() throws java.sql.SQLException
java.sql.SQLException
void closeFile() throws java.sql.SQLException
java.sql.SQLException
void open(LargeObjectAccessMode mode) throws java.sql.SQLException
java.sql.SQLException
void close() throws java.sql.SQLException
java.sql.SQLException
boolean isOpen() throws java.sql.SQLException
java.sql.SQLException