org.openmobileis.synchro.openmsp.server.util
Class MemoryFileSystem

java.lang.Object
  extended byorg.openmobileis.synchro.openmsp.server.util.MemoryFileSystem
All Implemented Interfaces:
FileSystem, java.io.Serializable

public class MemoryFileSystem
extends java.lang.Object
implements FileSystem

Title: OpenMobileIS project source
Description: virtual file system in memory.

Since:
JDK 1.1
Version:
1.0.
Author:
Philippe Delrieu
See Also:
Serialized Form

Constructor Summary
MemoryFileSystem()
           
MemoryFileSystem(OpenMISFile[] filelist)
           
MemoryFileSystem(java.util.zip.ZipInputStream zipFile)
           
 
Method Summary
 void addAll(FileSystem fileSystem)
           
 void addFile(OpenMISFile file)
          Extends this method to add your own file management before adding a file.
 void clear()
          clear all file in the file system.
protected  OpenMISFile createCyberFile(java.lang.String completeName, java.io.InputStream input)
          extends this methods to create the rigth type of OpenMISFile with the file system is created using a ZIP Stream
 OpenMISFile getFile(java.lang.String completefileName)
          return null if not found.
 int getFileCount()
           
 OpenMISFile[] getFileList()
           
 void removeFile(java.lang.String completefileName)
           
 void saveToDisk(java.lang.String beginPath)
          save all manager file to disk using beginpath for base file repository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryFileSystem

public MemoryFileSystem()

MemoryFileSystem

public MemoryFileSystem(java.util.zip.ZipInputStream zipFile)
                 throws java.io.IOException

MemoryFileSystem

public MemoryFileSystem(OpenMISFile[] filelist)
Method Detail

createCyberFile

protected OpenMISFile createCyberFile(java.lang.String completeName,
                                      java.io.InputStream input)
                               throws java.io.IOException
extends this methods to create the rigth type of OpenMISFile with the file system is created using a ZIP Stream

Throws:
java.io.IOException

addAll

public void addAll(FileSystem fileSystem)
            throws java.io.IOException
Specified by:
addAll in interface FileSystem
Throws:
java.io.IOException

getFile

public OpenMISFile getFile(java.lang.String completefileName)
return null if not found. Specify the the completeFileName

Specified by:
getFile in interface FileSystem

addFile

public void addFile(OpenMISFile file)
             throws java.io.IOException
Extends this method to add your own file management before adding a file. call super.addFile to add the file to the existing file memory management.

Specified by:
addFile in interface FileSystem
Throws:
java.io.IOException

getFileList

public OpenMISFile[] getFileList()
Specified by:
getFileList in interface FileSystem

saveToDisk

public void saveToDisk(java.lang.String beginPath)
                throws java.io.IOException
save all manager file to disk using beginpath for base file repository

Specified by:
saveToDisk in interface FileSystem
Throws:
java.io.IOException

getFileCount

public int getFileCount()
Specified by:
getFileCount in interface FileSystem

clear

public void clear()
clear all file in the file system.

Specified by:
clear in interface FileSystem

removeFile

public void removeFile(java.lang.String completefileName)
Specified by:
removeFile in interface FileSystem


Copyright 2006 OpenMobileIS. All Rights Reserved.