|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.sql.Datum | +--oracle.sql.DatumWithConnection | +--oracle.sql.BLOB
Field Summary | |
static int |
DURATION_CALL
|
static int |
DURATION_SESSION
|
static int |
MAX_CHUNK_SIZE
1907584: Changed MAX_CHUNK_SIZE from 32512 to 32768. |
static int |
MODE_READONLY
|
static int |
MODE_READWRITE
|
Method Summary | |
void |
close()
Close a previously opened BLOB. |
static BLOB |
createTemporary(java.sql.Connection conn,
boolean cache,
int duration)
Create a temporary blob. |
static BLOB |
empty_lob()
Return a empty lob. |
void |
freeTemporary()
Free the contents and the locator of the temporary blob. |
static void |
freeTemporary(BLOB temp_lob)
Free the contents and the locator of the temporary blob. |
java.io.OutputStream |
getBinaryOutputStream()
Oracle extension. |
java.io.OutputStream |
getBinaryOutputStream(long pos)
Write to the BLOB from a stream at the requested position. |
java.io.InputStream |
getBinaryStream()
Implements the Blob interface function. |
java.io.InputStream |
getBinaryStream(long pos)
Read from the BLOB as a stream at the requested position. |
int |
getBufferSize()
Oracle extension. |
byte[] |
getBytes(long pos,
int length)
Implements the Blob interface function. |
int |
getBytes(long pos,
int length,
byte[] buf)
Oracle extension. |
int |
getChunkSize()
Oracle extension. |
OracleConnection |
getConnection()
|
java.sql.Connection |
getJavaSqlConnection()
|
boolean |
isConvertibleTo(java.lang.Class jClass)
Oracle extension. |
boolean |
isEmptyLob()
Return true if the lob locator points to a empty blob. |
boolean |
isOpen()
Check whether the BLOB is opened. |
boolean |
isTemporary()
Return true if the lob locator points to a temporary blob. |
static boolean |
isTemporary(BLOB lob)
Return true if the lob locator points to a temporary blob. |
long |
length()
Implements the Blob interface function. |
void |
open(int mode)
Open a BLOB in the indicated mode. |
long |
position(java.sql.Blob pattern,
long start)
Implements the Blob interface function. |
long |
position(byte[] pattern,
long start)
Implements the Blob interface function. |
int |
putBytes(long pos,
byte[] bytes)
Oracle extension. |
int |
putBytes(long pos,
byte[] bytes,
int length)
Oracle extension. |
java.io.OutputStream |
setBinaryStream(long pos)
JDBC 3.0 Retrieves a stream that can be used to write to the BLOB
value that this Blob object represents. |
int |
setBytes(long pos,
byte[] bytes)
JDBC 3.0 Writes the given array of bytes to the BLOB value that
this Blob object represents, starting at position
pos , and returns the number of bytes written. |
int |
setBytes(long pos,
byte[] bytes,
int offset,
int len)
JDBC 3.0 Writes all or part of the given byte array to the
BLOB value that this Blob object represents
and returns the number of bytes written. |
java.lang.Object |
toJdbc()
Oracle extension. |
void |
trim(long newlen)
Trim the value of the BLOB to the length you specify in the newlen parameter. |
void |
truncate(long len)
JDBC 3.0 Truncates the BLOB value that this Blob
object represents to be len bytes in length. |
Methods inherited from class oracle.sql.DatumWithConnection |
assertNotNull,
assertNotNull,
getOracleConnection |
Methods inherited from class oracle.sql.Datum |
asciiStreamValue,
bigDecimalValue,
binaryStreamValue,
booleanValue,
byteValue,
characterStreamValue,
dateValue,
doubleValue,
equals,
floatValue,
getBytes,
getLength,
getStream,
intValue,
longValue,
makeJdbcArray,
setBytes,
setShareBytes,
shareBytes,
stringValue,
timestampValue,
timeValue |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int MAX_CHUNK_SIZE
public static final int DURATION_SESSION
public static final int DURATION_CALL
public static final int MODE_READONLY
public static final int MODE_READWRITE
Method Detail |
public long length() throws java.sql.SQLException
public byte[] getBytes(long pos, int length) throws java.sql.SQLException
pos
- is the first byte of the blob to be extracted.length
- is the number of consecutive bytes to be copied.public java.io.InputStream getBinaryStream() throws java.sql.SQLException
public 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.public long position(java.sql.Blob pattern, long start) throws java.sql.SQLException
searchstr
- is the pattern to search for.start
- is the position at which to begin searching.public int getBytes(long pos, int length, byte[] buf) throws java.sql.SQLException
pos
- is the first byte of the blob to be extracted.length
- is the number of consecutive bytes to be copied.buf
- is the buffer to had the extracted bytes.public int putBytes(long pos, byte[] bytes) throws java.sql.SQLException
pos
- is the position data to be put.bytes
- is the data to be written into BLOB.public int putBytes(long pos, byte[] bytes, int length) throws java.sql.SQLException
pos
- is the position data to be put.bytes
- is the data to be written into BLOB.length
- is the length of the data to be written into BLOB.public java.io.OutputStream getBinaryOutputStream() throws java.sql.SQLException
public int getChunkSize() throws java.sql.SQLException
public int getBufferSize() throws java.sql.SQLException
public static BLOB empty_lob() throws java.sql.SQLException
public boolean isEmptyLob() throws java.sql.SQLException
public java.io.OutputStream getBinaryOutputStream(long pos) throws java.sql.SQLException
pos
- is the position data to be put.public java.io.InputStream getBinaryStream(long pos) throws java.sql.SQLException
pos
- is the position data to be read.public void trim(long newlen) throws java.sql.SQLException
newlen
- the new length of the BLOB.public static BLOB createTemporary(java.sql.Connection conn, boolean cache, int duration) throws java.sql.SQLException
cache
- Specifies if LOB should be read into buffer cache or not.duration
- The duration of the temporary LOB. The following are
valid values: DURATION_SESSION, DURATION_CALL.public static void freeTemporary(BLOB temp_lob) throws java.sql.SQLException
temp_lob
- A temporary blob to be freeed.public static boolean isTemporary(BLOB lob) throws java.sql.SQLException
lob
- the blob to test.public void freeTemporary() throws java.sql.SQLException
public boolean isTemporary() throws java.sql.SQLException
public void open(int mode) throws java.sql.SQLException
public void close() throws java.sql.SQLException
public boolean isOpen() throws java.sql.SQLException
public int setBytes(long pos, byte[] bytes) throws java.sql.SQLException
BLOB
value that
this Blob
object represents, starting at position
pos
, and returns the number of bytes written.pos
- the position in the BLOB
object at which
to start writingbytes
- the array of bytes to be written to the BLOB
value that this Blob
object representsBLOB
valuegetBytes(long, int)
public int setBytes(long pos, byte[] bytes, int offset, int len) throws java.sql.SQLException
byte
array to the
BLOB
value that this Blob
object represents
and returns the number of bytes written.
Writing starts at position pos
in the BLOB
value; len
bytes from the given byte array are written.pos
- the position in the BLOB
object at which
to start writingbytes
- the array of bytes to be written to this BLOB
objectoffset
- the offset into the array bytes
at which
to start reading the bytes to be setlen
- the number of bytes to be written to the BLOB
value from the array of bytes bytes
BLOB
valuegetBytes(long, int)
public java.io.OutputStream setBinaryStream(long pos) throws java.sql.SQLException
BLOB
value that this Blob
object represents. The stream begins
at position pos
.pos
- the position in the BLOB
value at which
to start writingjava.io.OutputStream
object to which data can
be writtenBLOB
valuegetBinaryStream()
public void truncate(long len) throws java.sql.SQLException
BLOB
value that this Blob
object represents to be len
bytes in length.len
- the length, in bytes, to which the BLOB
value
that this Blob
object represents should be truncatedBLOB
valuepublic java.lang.Object toJdbc() throws java.sql.SQLException
public boolean isConvertibleTo(java.lang.Class jClass)
jClass
- specifies the Java data type to test against.public java.sql.Connection getJavaSqlConnection() throws java.sql.SQLException
public OracleConnection getConnection() throws java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |