org.codehaus.mojo.mrm.impl
Class MemoryFileSystem

java.lang.Object
  extended by org.codehaus.mojo.mrm.api.BaseFileSystem
      extended by org.codehaus.mojo.mrm.impl.MemoryFileSystem
All Implemented Interfaces:
Serializable, org.codehaus.mojo.mrm.api.FileSystem

public class MemoryFileSystem
extends org.codehaus.mojo.mrm.api.BaseFileSystem

A file system who's structure is entirely stored in memory.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
MemoryFileSystem()
          Create a new empty file system.
 
Method Summary
protected  org.codehaus.mojo.mrm.api.Entry get(org.codehaus.mojo.mrm.api.DirectoryEntry parent, String name)
          
 long getLastModified(org.codehaus.mojo.mrm.api.DirectoryEntry entry)
          
 org.codehaus.mojo.mrm.api.Entry[] listEntries(org.codehaus.mojo.mrm.api.DirectoryEntry directory)
          
 org.codehaus.mojo.mrm.api.DirectoryEntry mkdir(org.codehaus.mojo.mrm.api.DirectoryEntry parent, String name)
          
 org.codehaus.mojo.mrm.api.FileEntry put(org.codehaus.mojo.mrm.api.DirectoryEntry parent, String name, InputStream content)
          
 void remove(org.codehaus.mojo.mrm.api.Entry entry)
          
 
Methods inherited from class org.codehaus.mojo.mrm.api.BaseFileSystem
get, getRoot, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryFileSystem

public MemoryFileSystem()
Create a new empty file system.

Since:
1.0
Method Detail

listEntries

public org.codehaus.mojo.mrm.api.Entry[] listEntries(org.codehaus.mojo.mrm.api.DirectoryEntry directory)


getLastModified

public long getLastModified(org.codehaus.mojo.mrm.api.DirectoryEntry entry)
                     throws IOException

Throws:
IOException

get

protected org.codehaus.mojo.mrm.api.Entry get(org.codehaus.mojo.mrm.api.DirectoryEntry parent,
                                              String name)

Overrides:
get in class org.codehaus.mojo.mrm.api.BaseFileSystem

mkdir

public org.codehaus.mojo.mrm.api.DirectoryEntry mkdir(org.codehaus.mojo.mrm.api.DirectoryEntry parent,
                                                      String name)

Specified by:
mkdir in interface org.codehaus.mojo.mrm.api.FileSystem
Overrides:
mkdir in class org.codehaus.mojo.mrm.api.BaseFileSystem

put

public org.codehaus.mojo.mrm.api.FileEntry put(org.codehaus.mojo.mrm.api.DirectoryEntry parent,
                                               String name,
                                               InputStream content)
                                        throws IOException

Specified by:
put in interface org.codehaus.mojo.mrm.api.FileSystem
Overrides:
put in class org.codehaus.mojo.mrm.api.BaseFileSystem
Throws:
IOException

remove

public void remove(org.codehaus.mojo.mrm.api.Entry entry)

Specified by:
remove in interface org.codehaus.mojo.mrm.api.FileSystem
Overrides:
remove in class org.codehaus.mojo.mrm.api.BaseFileSystem


Copyright © 2009-2011 Codehaus. All Rights Reserved.