BFILE
public interface OracleBfile
Modifier and Type | Method | 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.
|
InputStream |
getBinaryStream() |
Retrieve the entire BFILE as a stream.
|
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.
|
String |
getDirAlias() |
Gets the Bfile's directory alias.
|
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 a 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 SQLException
SQLException
byte[] getBytes(long pos, int length) throws SQLException
pos
- is the first byte of the bfile to be extracted.(1-based)length
- is the number of consecutive bytes to be copied.SQLException
int getBytes(long pos, int length, byte[] buf) throws 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 had the extracted bytes.SQLException
InputStream getBinaryStream() throws SQLException
SQLException
InputStream getBinaryStream(long pos) throws SQLException
pos
- is the position data to be read.SQLException
long position(byte[] pattern, long start) throws SQLException
pattern
- is the pattern to search for.start
- is the position at which to begin searching. (1-based)SQLException
long position(OracleBfile pattern, long start) throws SQLException
pattern
- is the pattern to search for.start
- is the position at which to begin searching. (1-based)SQLException
String getName() throws SQLException
bfile
- The Bfile for which to get the file name.SQLException
String getDirAlias() throws SQLException
bfile
- The Bfile for which to get the directory alias.SQLException
void openFile() throws SQLException
SQLException
boolean isFileOpen() throws SQLException
SQLException
boolean fileExists() throws SQLException
SQLException
void closeFile() throws SQLException
SQLException
void open(LargeObjectAccessMode mode) throws SQLException
SQLException
void close() throws SQLException
SQLException
boolean isOpen() throws SQLException
SQLException