com.pnfsoftware.jeb.core.dao.IFileDatabase |
Known Indirect Subclasses |
Database of binary blobs. Each entry is identified by a unique key. Two main implementations
exist:
- in-memory blogs
- JDB2 file (on-disk) backed database
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
deleteFile(String key)
Delete a file.
| ||||||||||
abstract IFileDatabaseReader |
getDatabaseReader(String key)
Get a database record reader.
| ||||||||||
abstract IFileDatabaseWriter |
getDatabaseWriter(String key)
Get a database record writer.
| ||||||||||
abstract File |
getFileObject(String key)
Attempt to get the filesystem object backing this db file entry.
| ||||||||||
abstract InputStream |
getFileReader(String key)
Get an input stream reader for low-level reading from a file.
| ||||||||||
abstract OutputStream |
getFileWriter(String key)
Get an output stream reader for low-level writing to a file.
| ||||||||||
abstract boolean |
hasFile(String key)
Determine if the database contains the given file (the file must exist).
| ||||||||||
abstract byte[] |
loadFile(String key)
Retrieve the contents of a file.
| ||||||||||
abstract boolean |
saveFile(String key, byte[] data)
Store the contents of a file.
|
Delete a file.
key | file key |
---|
Get a database record reader.
This method may not be implemented, in which case the implementation may throw an UnsupportedOperationException.@return
IOException |
---|
Get a database record writer.
This method may not be implemented, in which case the implementation may throw an UnsupportedOperationException.@return
IOException |
---|
Attempt to get the filesystem object backing this db file entry.
This method may not be implemented (e.g. if this database is not backed by on-disk files), in which case the implementation may throw an UnsupportedOperationException.
Get an input stream reader for low-level reading from a file. The client is responsible for closing the stream after usage.
This method may not be implemented, in which case the implementation may throw an UnsupportedOperationException.@return
IOException |
---|
Get an output stream reader for low-level writing to a file. The client is responsible for closing the stream after usage.
This method may not be implemented, in which case the implementation may throw an UnsupportedOperationException.@return
IOException |
---|
Determine if the database contains the given file (the file must exist).
key | file key |
---|
Retrieve the contents of a file.
key | file key |
---|
Store the contents of a file.
key | file key |
---|---|
data | file data |