de.grogra.vfs
Class MemoryFileSystem

java.lang.Object
  extended by de.grogra.util.TreeModelSupport
      extended by de.grogra.vfs.FileSystem
          extended by de.grogra.vfs.FileSystemBase
              extended by de.grogra.vfs.MemoryFileSystem
All Implemented Interfaces:
javax.swing.tree.TreeModel

public class MemoryFileSystem
extends FileSystemBase


Nested Class Summary
 
Nested classes/interfaces inherited from class de.grogra.vfs.FileSystem
FileSystem.Out
 
Field Summary
 
Fields inherited from class de.grogra.vfs.FileSystem
fileNameMap, manifest, MIME_TYPE
 
Fields inherited from class de.grogra.util.TreeModelSupport
NODES_CHANGED, NODES_INSERTED, NODES_REMOVED, STRUCTURE_CHANGED
 
Constructor Summary
MemoryFileSystem(java.lang.String fsName)
           
 
Method Summary
 void closeQuiet(java.lang.Object file)
          close file without triggering event
protected  java.lang.Object createImpl(java.lang.Object parent, java.lang.String name, boolean createDirectory)
           
 void delete(java.lang.Object file)
           
 java.lang.Object getFile(java.lang.Object parent, java.lang.String name)
           
 java.io.InputStream getInputStream(java.lang.Object file)
           
 java.lang.String getName(java.lang.Object file)
           
 java.io.OutputStream getOutputStream(java.lang.Object file, boolean append)
           
 java.lang.Object getParent(java.lang.Object file)
           
 java.lang.Object getRoot()
           
 long getSize(java.lang.Object file)
           
 long getTime(java.lang.Object file)
           
 boolean isLeaf(java.lang.Object file)
           
 boolean isPersistent()
           
 boolean isReadOnly(java.lang.Object file)
           
 java.lang.Object[] listFiles(java.lang.Object parent)
           
 void removeNonlistedFiles(java.util.Collection list)
           
 void setTime(java.lang.Object file, long time)
           
 
Methods inherited from class de.grogra.vfs.FileSystemBase
getURLStreamHandler, toFile, toURL
 
Methods inherited from class de.grogra.vfs.FileSystem
addLocalFile, copyFilesTo, copyFileTo, copyFileTo, copyFileToDirectory, copyFileToDirectory, create, create, equals, fireInserted, getAttribute, getAttribute, getAttributes, getCharset, getChild, getChildCount, getEventFor, getFile, getFile, getFSName, getIndexOfChild, getManifest, getManifestName, getMimeType, getPath, getPathWithLeadingSlash, getProtocol, getReader, getTreePath, getWriter, isContainedInChildren, readJar, removeNonlistedAttributes, setFileNameMap, setManifest, setMimeType, valueForPathChanged, writeJar
 
Methods inherited from class de.grogra.util.TreeModelSupport
addTreeModelListener, allListenersRemoved, clearListeners, fireTreeModelEvent, fireTreeModelEvent, fireTreeModelEvent, fireTreeModelEvent, firstListenerAdded, hasListeners, removeTreeModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, removeTreeModelListener
 

Constructor Detail

MemoryFileSystem

public MemoryFileSystem(java.lang.String fsName)
Method Detail

closeQuiet

public void closeQuiet(java.lang.Object file)
close file without triggering event


createImpl

protected java.lang.Object createImpl(java.lang.Object parent,
                                      java.lang.String name,
                                      boolean createDirectory)
                               throws java.io.IOException
Specified by:
createImpl in class FileSystem
Throws:
java.io.IOException

delete

public void delete(java.lang.Object file)
Specified by:
delete in class FileSystem

getFile

public java.lang.Object getFile(java.lang.Object parent,
                                java.lang.String name)
Specified by:
getFile in class FileSystem

getInputStream

public java.io.InputStream getInputStream(java.lang.Object file)
Specified by:
getInputStream in class FileSystem

getName

public java.lang.String getName(java.lang.Object file)
Specified by:
getName in class FileSystem

getOutputStream

public java.io.OutputStream getOutputStream(java.lang.Object file,
                                            boolean append)
Specified by:
getOutputStream in class FileSystem

getParent

public java.lang.Object getParent(java.lang.Object file)
Specified by:
getParent in class FileSystem

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel
Specified by:
getRoot in class FileSystem

getSize

public long getSize(java.lang.Object file)
Specified by:
getSize in class FileSystem

getTime

public long getTime(java.lang.Object file)
Specified by:
getTime in class FileSystem

isLeaf

public boolean isLeaf(java.lang.Object file)

isPersistent

public boolean isPersistent()
Specified by:
isPersistent in class FileSystem

isReadOnly

public boolean isReadOnly(java.lang.Object file)
Specified by:
isReadOnly in class FileSystem

listFiles

public java.lang.Object[] listFiles(java.lang.Object parent)
Specified by:
listFiles in class FileSystem

removeNonlistedFiles

public void removeNonlistedFiles(java.util.Collection list)

setTime

public void setTime(java.lang.Object file,
                    long time)
Specified by:
setTime in class FileSystem