Class FSShallowDirectory
- java.lang.Object
-
- lumis.portal.serialization.persistency.fs.FSDirectory
-
- lumis.portal.serialization.persistency.fs.FSShallowDirectory
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IDirectory
,IFSDirectory
public class FSShallowDirectory extends FSDirectory
FSDirectory
variant that stores all files in the root directory, mapping each file path to a GUID.- Since:
- 4.0.10
- Version:
- $Revision: 6376 $ $Date: 2007-04-10 17:55:53 -0300 (Tue, 10 Apr 2007) $
-
-
Field Summary
-
Fields inherited from class lumis.portal.serialization.persistency.fs.FSDirectory
rootFile
-
-
Constructor Summary
Constructors Constructor Description FSShallowDirectory(File root)
FSShallowDirectory(String rootPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
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.InputStream
getInputStream(String filePath)
Get anInputStream
to a repository file.OutputStream
getOutputStream(String filePath)
Get anOutputStream
to a repository file.-
Methods inherited from class lumis.portal.serialization.persistency.fs.FSDirectory
delete, getDirectoryPath
-
-
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFSDirectory
- Throws:
IOException
-
exists
public boolean exists(String filePath) throws IOException
Description copied from interface:IDirectory
Check the existence of a file.- Specified by:
exists
in interfaceIDirectory
- Overrides:
exists
in classFSDirectory
- Parameters:
filePath
- path to the file to be checked.- Returns:
- true, if the specified file exists.
- Throws:
IOException
- if an I/O error occurs.
-
getDescription
public String getDescription()
Description copied from interface:IDirectory
Generate a general description of the directory, used mainly to compose exception messages.- Specified by:
getDescription
in interfaceIDirectory
- Overrides:
getDescription
in classFSDirectory
- Returns:
- directory description.
-
getInputStream
public InputStream getInputStream(String filePath) throws FileNotFoundException, IOException
Description copied from interface:IDirectory
Get anInputStream
to a repository file.- Specified by:
getInputStream
in interfaceIDirectory
- Overrides:
getInputStream
in classFSDirectory
- Parameters:
filePath
- path to the file.- Returns:
InputStream
to file found in specified filePath.- Throws:
FileNotFoundException
- if no file was found in specified filePath.IOException
- if an I/O error occurs.
-
getOutputStream
public OutputStream getOutputStream(String filePath) throws IOException
Description copied from interface:IDirectory
Get anOutputStream
to a repository file.- Specified by:
getOutputStream
in interfaceIDirectory
- Overrides:
getOutputStream
in classFSDirectory
- Parameters:
filePath
- path to the file.- Returns:
OutputStream
to the new file- Throws:
IOException
- if an I/O error occurs.
-
-