net.sf.jame.service
Class DefaultFilesystemCache
java.lang.Object
net.sf.jame.service.DefaultFilesystemCache
- All Implemented Interfaces:
- FilesystemCache
- Direct Known Subclasses:
- RenderJobFilesystemCache, RenderProfileFilesystemCache
public abstract class DefaultFilesystemCache
- extends java.lang.Object
- implements FilesystemCache
- Author:
- Andrea Medeghini
|
Field Summary |
protected java.io.File |
workdir
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
workdir
protected final java.io.File workdir
DefaultFilesystemCache
public DefaultFilesystemCache(java.io.File workdir)
throws java.io.IOException
- Parameters:
workdir -
- Throws:
java.io.IOException
getWorkdir
public java.io.File getWorkdir()
- Returns:
deleteDir
public static void deleteDir(java.io.File dir)
- Parameters:
dir -
list
public java.io.File[] list()
- Specified by:
list in interface FilesystemCache
- Returns:
- See Also:
FilesystemCache.list()
create
public void create(int id)
throws java.io.IOException
- Specified by:
create in interface FilesystemCache
- Throws:
java.io.IOException- See Also:
FilesystemCache.create(int)
delete
public void delete(int id)
throws java.io.IOException
- Specified by:
delete in interface FilesystemCache
- Throws:
java.io.IOException- See Also:
FilesystemCache.delete(int)
deleteAll
public void deleteAll()
- Specified by:
deleteAll in interface FilesystemCache
- See Also:
FilesystemCache.deleteAll()
exists
public boolean exists(int id)
- Specified by:
exists in interface FilesystemCache
- Returns:
- See Also:
FilesystemCache.exists(int)
getDirectory
protected java.io.File getDirectory(int id)
- Parameters:
id -
- Returns:
createFilenameFilter
protected java.io.FilenameFilter createFilenameFilter()
- Returns:
getInputStream
public abstract java.io.InputStream getInputStream(int id)
throws java.io.IOException
- Specified by:
getInputStream in interface FilesystemCache
- Returns:
-
- Throws:
java.io.IOException- See Also:
FilesystemCache.getInputStream(int)
getOutputStream
public abstract java.io.OutputStream getOutputStream(int id)
throws java.io.IOException
- Specified by:
getOutputStream in interface FilesystemCache
- Returns:
-
- Throws:
java.io.IOException- See Also:
FilesystemCache.getOutputStream(int)
getRandomAccessFile
public abstract ChunkedRandomAccessFile getRandomAccessFile(int id)
throws java.io.IOException
- Specified by:
getRandomAccessFile in interface FilesystemCache
- Returns:
-
- Throws:
java.io.IOException- See Also:
FilesystemCache.getRandomAccessFile(int)