lumis.portal.serialization.persistency
Interface IDirectory

Package class diagram package IDirectory
All Superinterfaces:
java.io.Closeable
All Known Subinterfaces:
IFSDirectory
All Known Implementing Classes:
FSDirectory, FSShallowDirectory, SubDirectory, ZipDirectory

public interface IDirectory
extends java.io.Closeable

Abstraction of a file repository.

Since:
4.0.10

Method Summary
 void delete()
          Delete the repository.
 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 interface java.io.Closeable
close
 

Method Detail

getInputStream

java.io.InputStream getInputStream(java.lang.String filePath)
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException
Get an InputStream to a repository file.

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

java.io.OutputStream getOutputStream(java.lang.String filePath)
                                     throws java.io.IOException
Get an OutputStream to a repository file.

Parameters:
filePath - path to the file.
Returns:
OutputStream to the new file
Throws:
java.io.IOException - if an I/O error occurs.

exists

boolean exists(java.lang.String filePath)
               throws java.io.IOException
Check the existence of a file.

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

java.lang.String getDescription()
Generate a general description of the directory, used mainly to compose exception messages.

Returns:
directory description.

delete

void delete()
            throws java.io.IOException
Delete the repository.

Throws:
java.io.IOException - if an I/O error occurs.


Lumisportal  6.1.0.111014 - Copyright © 2001-2007, Lumis. All Rights Reserved.