# Interface: com.pnfsoftware.jeb.core.dao.IFileDatabase

Database of binary blobs. Each entry is identified by a unique key. Two main implementations exist:
 \- [in\-memory blogs](ProjectFileStore)
 \- [JDB2 file \(on\-disk\) backed database](JDB2Manager)

## Method: deleteFile
- parameter: `key`, type: `java.lang.String`
- return type: `boolean`

Description: Delete a file.
parameter: key: file key
return: success indicator

## Method: getDatabaseReader
- parameter: `key`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.dao.IFileDatabaseReader`

Description: Get a database record reader. 

 This method may not be implemented, in which case the implementation may throw an [UnsupportedOperationException](UnsupportedOperationException).
parameter: key: 
return: 
throws: 

## Method: getDatabaseWriter
- parameter: `key`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.dao.IFileDatabaseWriter`

Description: Get a database record writer. 

 This method may not be implemented, in which case the implementation may throw an [UnsupportedOperationException](UnsupportedOperationException).
parameter: key: 
return: 
throws: 

## Method: getFileObject
- parameter: `key`, type: `java.lang.String`
- return type: `java.io.File`

Description: 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](UnsupportedOperationException).
parameter: key: 
return: 

## Method: getFileReader
- parameter: `key`, type: `java.lang.String`
- return type: `java.io.InputStream`

Description: 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](UnsupportedOperationException).
parameter: key: 
return: 
throws: 

## Method: getFileWriter
- parameter: `key`, type: `java.lang.String`
- return type: `java.io.OutputStream`

Description: 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](UnsupportedOperationException).
parameter: key: 
return: 
throws: 

## Method: hasFile
- parameter: `key`, type: `java.lang.String`
- return type: `boolean`

Description: Determine if the database contains the given file \(the file must exist\).
parameter: key: file key
return: presence indicator

## Method: loadFile
- parameter: `key`, type: `java.lang.String`
- return type: `byte[]`

Description: Retrieve the contents of a file.
parameter: key: file key
return: file data, null on error

## Method: saveFile
- parameter: `key`, type: `java.lang.String`
- parameter: `data`, type: `byte[]`
- return type: `boolean`

Description: Store the contents of a file.
parameter: key: file key
parameter: data: file data
return: success indicator

