|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.serialization.persistency.fs.FSDirectory
public class FSDirectory
IDirectory
implementation that uses a file system's directory as the concrete repository.
Field Summary | |
---|---|
protected File |
rootFile
|
Constructor Summary | |
---|---|
FSDirectory(File root)
|
|
FSDirectory(String rootPath)
|
Method Summary | |
---|---|
void |
close()
|
void |
delete()
Delete the repository. |
boolean |
exists(String filePath)
Check the existence of a file. |
String |
getDescription()
Generate a general description of the directory, used mainly to compose exception messages. |
String |
getDirectoryPath()
|
InputStream |
getInputStream(String filePath)
Get an InputStream to a repository file. |
OutputStream |
getOutputStream(String filePath)
Get an OutputStream to a repository file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File rootFile
Constructor Detail |
---|
public FSDirectory(String rootPath)
public FSDirectory(File root)
Method Detail |
---|
public InputStream getInputStream(String filePath) throws FileNotFoundException, IOException
IDirectory
InputStream
to a repository file.
getInputStream
in interface IDirectory
filePath
- path to the file.
InputStream
to file found in specified filePath.
FileNotFoundException
- if no file was found in specified filePath.
IOException
- if an I/O error occurs.public OutputStream getOutputStream(String filePath) throws IOException
IDirectory
OutputStream
to a repository file.
getOutputStream
in interface IDirectory
filePath
- path to the file.
OutputStream
to the new file
IOException
- if an I/O error occurs.public void close() throws IOException
close
in interface Closeable
IOException
public boolean exists(String filePath) throws IOException
IDirectory
exists
in interface IDirectory
filePath
- path to the file to be checked.
IOException
- if an I/O error occurs.public String getDescription()
IDirectory
getDescription
in interface IDirectory
public void delete() throws IOException
IDirectory
delete
in interface IDirectory
IOException
- if an I/O error occurs.public String getDirectoryPath()
getDirectoryPath
in interface IFSDirectory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |