lumis.portal.serialization.persistency
Interface IDirectory

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

public interface IDirectory
extends Closeable

Abstraction of a file repository.

Since:
4.0.10

Method Summary
 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.
 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 interface java.io.Closeable
close
 

Method Detail

getInputStream

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

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

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

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

exists

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

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

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

Returns:
directory description.

delete

void delete()
            throws IOException
Delete the repository.

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


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.