|
db4o 7.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Blob
the db4o Blob type to store blobs independent of the main database
file and allows to perform asynchronous upload and download operations.
Usage:
- Define Blob fields on your user classes.
- As soon as an object of your class is stored, db4o automatically
takes care that the Blob field is set.
- Call readFrom to read a blob file into the db4o system.
- Call writeTo to write a blob file from within the db4o system.
- getStatus may help you to determine, whether data has been
previously stored. It may also help you to track the completion
of the current process.
db4o client/server carries out all blob operations in a separate
thread on a specially dedicated socket. One socket is used for
all blob operations and operations are queued. Your application
may continue to access db4o while a blob is transferred in the
background.
Method Summary | |
---|---|
void |
deleteFile()
Deletes the current file stored in this BLOB. |
java.lang.String |
getFileName()
returns the name of the file the blob was stored to. |
double |
getStatus()
returns the status after the last read- or write-operation. |
void |
readFrom(java.io.File file)
reads a file into the db4o system and stores it as a blob. |
void |
readLocal(java.io.File file)
reads a file into the db4o system and stores it as a blob. |
void |
writeLocal(java.io.File file)
writes stored blob data to a file. |
void |
writeTo(java.io.File file)
writes stored blob data to a file. |
Method Detail |
---|
java.lang.String getFileName()
double getStatus()
STATUS constants
void readFrom(java.io.File file) throws java.io.IOException
file
- the file the blob is to be read from.
java.io.IOException
- in case of errorsvoid readLocal(java.io.File file) throws java.io.IOException
file
- the file the blob is to be read from.
java.io.IOException
- in case of errorsvoid writeLocal(java.io.File file) throws java.io.IOException
file
- the file the blob is to be written to.
java.io.IOException
- in case of errors and in case no blob
data was storedvoid writeTo(java.io.File file) throws java.io.IOException
file
- the file the blob is to be written to.
java.io.IOException
- in case of errors and in case no blob
data was storedvoid deleteFile() throws java.io.IOException
java.io.IOException
- in case of errors and in case no
data was stored
|
db4o 7.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |