Class MemoryFileSystem
- java.lang.Object
-
- org.apache.jackrabbit.core.fs.mem.MemoryFileSystem
-
- All Implemented Interfaces:
org.apache.jackrabbit.core.fs.FileSystem
public class MemoryFileSystem extends Object implements org.apache.jackrabbit.core.fs.FileSystem
An in-memory file system implementation.
-
-
Constructor Summary
Constructors Constructor Description MemoryFileSystem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
createFolder(String folderPath)
void
deleteFile(String filePath)
void
deleteFolder(String folderPath)
boolean
exists(String path)
InputStream
getInputStream(String filePath)
OutputStream
getOutputStream(String filePath)
boolean
hasChildren(String path)
void
init()
boolean
isFile(String path)
boolean
isFolder(String path)
long
lastModified(String path)
long
length(String filePath)
String[]
list(String folderPath)
String[]
listFiles(String folderPath)
String[]
listFolders(String folderPath)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
-
createFolder
public void createFolder(String folderPath) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
createFolder
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
deleteFile
public void deleteFile(String filePath) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
deleteFile
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
deleteFolder
public void deleteFolder(String folderPath) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
deleteFolder
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
exists
public boolean exists(String path) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
exists
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
getInputStream
public InputStream getInputStream(String filePath) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
getInputStream
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
getOutputStream
public OutputStream getOutputStream(String filePath) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
getOutputStream
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
hasChildren
public boolean hasChildren(String path) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
hasChildren
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
init
public void init()
- Specified by:
init
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
-
isFile
public boolean isFile(String path) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
isFile
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
isFolder
public boolean isFolder(String path) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
isFolder
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
lastModified
public long lastModified(String path) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
lastModified
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
length
public long length(String filePath) throws org.apache.jackrabbit.core.fs.FileSystemException
- Specified by:
length
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
- Throws:
org.apache.jackrabbit.core.fs.FileSystemException
-
list
public String[] list(String folderPath)
- Specified by:
list
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
-
listFiles
public String[] listFiles(String folderPath)
- Specified by:
listFiles
in interfaceorg.apache.jackrabbit.core.fs.FileSystem
-
-