vfs.addMimeTypeMap("application/x-gzip", "gz"); vfs.addMimeTypeMap("application/zip", "zip"); vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory()); vfs.setFilesCache(new SoftRefFilesCache()); vfs.setReplicator(new UniqueFileReplicator(new File(System.getProperty("java.io.tmpdir"))));
vfs.addMimeTypeMap("application/x-gzip", "gz"); vfs.addMimeTypeMap("application/zip", "zip"); vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory()); vfs.setFilesCache(new SoftRefFilesCache()); File cacheDir = computeTopCacheDir();
/** * Initializes this manager. * <p> * If no value for the following properties was specified, it will use the following defaults: * <ul> * <li>fileContentInfoFactory = new FileContentInfoFilenameFactory()</li> * <li>filesCache = new SoftRefFilesCache()</li> * <li>fileCacheStrategy = CacheStrategy.ON_RESOLVE</li> * </ul> * * @throws FileSystemException if an error occurs during initialization. */ public void init() throws FileSystemException { if (fileContentInfoFactory == null) { fileContentInfoFactory = new FileContentInfoFilenameFactory(); } if (filesCache == null) { // filesCache = new DefaultFilesCache(); filesCache = new SoftRefFilesCache(); } if (fileCacheStrategy == null) { fileCacheStrategy = CacheStrategy.ON_RESOLVE; } setupComponent(filesCache); vfsProvider = new VirtualFileProvider(); setupComponent(vfsProvider); init = true; }
/** * Initializes this manager. * <p> * If no value for the following properties was specified, it will use the following defaults: * <ul> * <li>fileContentInfoFactory = new FileContentInfoFilenameFactory()</li> * <li>filesCache = new SoftRefFilesCache()</li> * <li>fileCacheStrategy = CacheStrategy.ON_RESOLVE</li> * </ul> * * @throws FileSystemException if an error occurs during initialization. */ public void init() throws FileSystemException { if (fileContentInfoFactory == null) { fileContentInfoFactory = new FileContentInfoFilenameFactory(); } if (filesCache == null) { // filesCache = new DefaultFilesCache(); filesCache = new SoftRefFilesCache(); } if (fileCacheStrategy == null) { fileCacheStrategy = CacheStrategy.ON_RESOLVE; } setupComponent(filesCache); vfsProvider = new VirtualFileProvider(); setupComponent(vfsProvider); init = true; }
/** * Initializes this manager. * <p> * If no value for the following properties was specified, it will use the following defaults: * <ul> * <li>fileContentInfoFactory = new FileContentInfoFilenameFactory()</li> * <li>filesCache = new SoftRefFilesCache()</li> * <li>fileCacheStrategy = CacheStrategy.ON_RESOLVE</li> * </ul> * * @throws FileSystemException if an error occurs during initialization. */ public void init() throws FileSystemException { if (fileContentInfoFactory == null) { fileContentInfoFactory = new FileContentInfoFilenameFactory(); } if (filesCache == null) { // filesCache = new DefaultFilesCache(); filesCache = new SoftRefFilesCache(); } if (fileCacheStrategy == null) { fileCacheStrategy = CacheStrategy.ON_RESOLVE; } setupComponent(filesCache); vfsProvider = new VirtualFileProvider(); setupComponent(vfsProvider); init = true; }
fileContentInfoFactory = new FileContentInfoFilenameFactory();
vfs.addMimeTypeMap("application/x-gzip", "gz"); vfs.addMimeTypeMap("application/zip", "zip"); vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory()); vfs.setFilesCache(new SoftRefFilesCache()); File cacheDir = computeTopCacheDir();