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.SQLExceptionbyte[] 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.SQLExceptionint 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.SQLExceptionjava.io.InputStream getBinaryStream()
throws java.sql.SQLException
java.sql.SQLExceptionjava.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.SQLExceptionlong 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.SQLExceptionlong 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.SQLExceptionjava.lang.String getName()
throws java.sql.SQLException
java.sql.SQLExceptionjava.lang.String getDirAlias()
throws java.sql.SQLException
java.sql.SQLExceptionvoid openFile()
throws java.sql.SQLException
java.sql.SQLExceptionboolean isFileOpen()
throws java.sql.SQLException
java.sql.SQLExceptionboolean fileExists()
throws java.sql.SQLException
java.sql.SQLExceptionvoid closeFile()
throws java.sql.SQLException
java.sql.SQLExceptionvoid open(LargeObjectAccessMode mode) throws java.sql.SQLException
java.sql.SQLExceptionvoid close()
throws java.sql.SQLException
java.sql.SQLExceptionboolean isOpen()
throws java.sql.SQLException
java.sql.SQLException