lumis.portal.serialization.persistency.fs
Class FSShallowDirectory
java.lang.Object
lumis.portal.serialization.persistency.fs.FSDirectory
lumis.portal.serialization.persistency.fs.FSShallowDirectory
- All Implemented Interfaces:
- java.io.Closeable, 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
Method Summary |
void |
close()
|
boolean |
exists(java.lang.String filePath)
Check the existence of a file. |
java.lang.String |
getDescription()
Generate a general description of the directory, used mainly to compose exception messages. |
java.io.InputStream |
getInputStream(java.lang.String filePath)
Get an InputStream to a repository file. |
java.io.OutputStream |
getOutputStream(java.lang.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 |
FSShallowDirectory
public FSShallowDirectory(java.lang.String rootPath)
FSShallowDirectory
public FSShallowDirectory(java.io.File root)
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class FSDirectory
- Throws:
java.io.IOException
exists
public boolean exists(java.lang.String filePath)
throws java.io.IOException
- Description copied from interface:
IDirectory
- Check the existence of a file.
- Specified by:
exists
in interface IDirectory
- Overrides:
exists
in class FSDirectory
- Parameters:
filePath
- path to the file to be checked.
- Returns:
- true, if the specified file exists.
- Throws:
java.io.IOException
- if an I/O error occurs.
getDescription
public java.lang.String getDescription()
- Description copied from interface:
IDirectory
- Generate a general description of the directory, used mainly to compose exception messages.
- Specified by:
getDescription
in interface IDirectory
- Overrides:
getDescription
in class FSDirectory
- Returns:
- directory description.
getInputStream
public java.io.InputStream getInputStream(java.lang.String filePath)
throws java.io.FileNotFoundException,
java.io.IOException
- Description copied from interface:
IDirectory
- Get an
InputStream
to a repository file.
- Specified by:
getInputStream
in interface IDirectory
- Overrides:
getInputStream
in class FSDirectory
- Parameters:
filePath
- path to the file.
- Returns:
InputStream
to file found in specified filePath.
- Throws:
java.io.FileNotFoundException
- if no file was found in specified filePath.
java.io.IOException
- if an I/O error occurs.
getOutputStream
public java.io.OutputStream getOutputStream(java.lang.String filePath)
throws java.io.IOException
- Description copied from interface:
IDirectory
- Get an
OutputStream
to a repository file.
- Specified by:
getOutputStream
in interface IDirectory
- Overrides:
getOutputStream
in class FSDirectory
- Parameters:
filePath
- path to the file.
- Returns:
OutputStream
to the new file
- Throws:
java.io.IOException
- if an I/O error occurs.
Lumisportal 6.1.0.111014 - Copyright © 2001-2007, Lumis. All Rights Reserved.