org.crsh.vfs.spi.ram
Class RAMDriver

java.lang.Object
  extended by org.crsh.vfs.spi.AbstractFSDriver<Path>
      extended by org.crsh.vfs.spi.ram.RAMDriver
All Implemented Interfaces:
FSDriver<Path>

public class RAMDriver
extends AbstractFSDriver<Path>


Field Summary
(package private)  URL baseURL
          .
(package private)  HashMap<Path,String> entries
          .
private  Path root
          .
 
Constructor Summary
RAMDriver()
           
 
Method Summary
 void add(Path path, String file)
           
 void add(String path, String file)
           
 Iterable<Path> children(Path handle)
           
 long getLastModified(Path handle)
           
 boolean isDir(Path handle)
           
 String name(Path handle)
           
 InputStream open(Path handle)
           
 Path root()
          Returns the root handle.
 
Methods inherited from class org.crsh.vfs.spi.AbstractFSDriver
child
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

private final Path root
.


entries

final HashMap<Path,String> entries
.


baseURL

URL baseURL
.

Constructor Detail

RAMDriver

public RAMDriver()
Method Detail

add

public void add(String path,
                String file)

add

public void add(Path path,
                String file)

root

public Path root()
          throws IOException
Description copied from interface: FSDriver
Returns the root handle.

Returns:
the root handle
Throws:
IOException - any io exception

name

public String name(Path handle)
            throws IOException
Throws:
IOException

isDir

public boolean isDir(Path handle)
              throws IOException
Throws:
IOException

children

public Iterable<Path> children(Path handle)
                        throws IOException
Throws:
IOException

getLastModified

public long getLastModified(Path handle)
                     throws IOException
Throws:
IOException

open

public InputStream open(Path handle)
                 throws IOException
Throws:
IOException


Copyright © 2014 eXo Platform SAS. All Rights Reserved.