|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Blob
Represents a stream based interface to a "binary large-object" (or blob for short.)
In general we cannot assume that large-objects (lobs) are entirely in memory
at any point in time, which is why stream based interfaces are provided.
The actual lob may be in a file on disk, in a database or even being streamed
in from a network connection. This is why all of the methods in this interface
throw LobException
s as connections with these external resources may
fail at any time.
Method Summary | |
---|---|
java.io.InputStream |
getBinaryStream()
Retrieves the blob instance as a stream. |
byte[] |
getBytes(long pos,
int length)
Returns as an array of bytes, part or all of the blob. |
long |
length()
Returns the number of bytes in the underlying blob object. |
Method Detail |
---|
long length() throws LobException
LobException
- if there is an error accessing the
length of the blobbyte[] getBytes(long pos, int length) throws LobException
length
consecutive bytes
starting at position pos
.
pos
- the ordinal position of the first byte in the
blob value to be extracted; the first byte is at
position 0length
- the number of consecutive bytes to be copied
length
consecutive bytes from the blob, starting with the
byte at position pos
LobException
- if there is an error accessing the
blobjava.io.InputStream getBinaryStream() throws LobException
LobException
- if there is an error accessing the blob
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |