|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.vfs.spi.AbstractFSDriver<Path> org.crsh.vfs.spi.ram.RAMDriver
public class RAMDriver
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)
Returns an iterable over the children of of a specific directory handle. |
long |
getLastModified(Path handle)
Return the last modified date timestamp of an handle. |
boolean |
isDir(Path handle)
Returns true if the handle represent a directory. |
String |
name(Path handle)
Returns the name of the handle. |
Iterator<InputStream> |
open(Path handle)
Return an iterator over the resources represented by the specified file 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 |
---|
private final Path root
final HashMap<Path,String> entries
URL baseURL
Constructor Detail |
---|
public RAMDriver()
Method Detail |
---|
public void add(String path, String file)
public void add(Path path, String file)
public Path root() throws IOException
FSDriver
IOException
- any io exceptionpublic String name(Path handle) throws IOException
FSDriver
handle
- the handle
IOException
- any io exceptionpublic boolean isDir(Path handle) throws IOException
FSDriver
handle
- the handle
IOException
- any io exceptionpublic Iterable<Path> children(Path handle) throws IOException
FSDriver
handle
- the directory handle
IOException
- any io exceptionpublic long getLastModified(Path handle) throws IOException
FSDriver
handle
- the handle
IOException
- any io exceptionpublic Iterator<InputStream> open(Path handle) throws IOException
FSDriver
handle
- the file handle
IOException
- any io exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |