Class ProjectFileStore
java.lang.Object
com.pnfsoftware.jeb.core.dao.impl.ProjectFileStore
- All Implemented Interfaces:
IFileDatabase
A project store backed by the file system.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeleteFile(String key) Delete a file.getDatabaseReader(String key) Get a database record reader.getDatabaseWriter(String key) Get a database record writer.getFileObject(String key) Attempt to get the filesystem object backing this db file entry.getFileReader(String key) Get an input stream reader for low-level reading from a file.getFileWriter(String key) Get an output stream reader for low-level writing to a file.booleanDetermine if the database contains the given file (the file must exist).byte[]Retrieve the contents of a file.booleanStore the contents of a file.
-
Constructor Details
-
ProjectFileStore
-
-
Method Details
-
hasFile
Description copied from interface:IFileDatabaseDetermine if the database contains the given file (the file must exist).- Specified by:
hasFilein interfaceIFileDatabase- Parameters:
key- file key- Returns:
- presence indicator
-
saveFile
Description copied from interface:IFileDatabaseStore the contents of a file.- Specified by:
saveFilein interfaceIFileDatabase- Parameters:
key- file keydata- file data- Returns:
- success indicator
-
loadFile
Description copied from interface:IFileDatabaseRetrieve the contents of a file.- Specified by:
loadFilein interfaceIFileDatabase- Parameters:
key- file key- Returns:
- file data, null on error
-
deleteFile
Description copied from interface:IFileDatabaseDelete a file.- Specified by:
deleteFilein interfaceIFileDatabase- Parameters:
key- file key- Returns:
- success indicator
-
getFileObject
Description copied from interface:IFileDatabaseAttempt 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.- Specified by:
getFileObjectin interfaceIFileDatabase- Returns:
-
getFileWriter
Description copied from interface:IFileDatabaseGet 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.- Specified by:
getFileWriterin interfaceIFileDatabase- Returns:
- Throws:
IOException
-
getFileReader
Description copied from interface:IFileDatabaseGet 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.- Specified by:
getFileReaderin interfaceIFileDatabase- Returns:
- Throws:
IOException
-
getDatabaseWriter
Description copied from interface:IFileDatabaseGet a database record writer.This method may not be implemented, in which case the implementation may throw an
UnsupportedOperationException.- Specified by:
getDatabaseWriterin interfaceIFileDatabase- Returns:
- Throws:
IOException
-
getDatabaseReader
Description copied from interface:IFileDatabaseGet a database record reader.This method may not be implemented, in which case the implementation may throw an
UnsupportedOperationException.- Specified by:
getDatabaseReaderin interfaceIFileDatabase- Returns:
- Throws:
IOException
-