1 16 package org.apache.commons.vfs.provider.compressed; 17 18 import org.apache.commons.vfs.FileName; 19 import org.apache.commons.vfs.FileObject; 20 import org.apache.commons.vfs.FileSystem; 21 import org.apache.commons.vfs.FileSystemException; 22 import org.apache.commons.vfs.FileSystemOptions; 23 import org.apache.commons.vfs.FileType; 24 import org.apache.commons.vfs.provider.AbstractLayeredFileProvider; 25 import org.apache.commons.vfs.provider.FileProvider; 26 import org.apache.commons.vfs.provider.LayeredFileName; 27 28 import java.util.Collection ; 29 30 36 public abstract class CompressedFileFileProvider 37 extends AbstractLayeredFileProvider 38 implements FileProvider 39 { 40 public CompressedFileFileProvider() 41 { 42 super(); 43 } 44 45 50 57 58 66 protected FileSystem doCreateFileSystem(final String scheme, 67 final FileObject file, 68 final FileSystemOptions fileSystemOptions) 69 throws FileSystemException 70 { 71 final FileName name = 72 new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER); 73 return createFileSystem(name, file, fileSystemOptions); 74 } 75 76 protected abstract FileSystem createFileSystem(final FileName name, final FileObject file, final FileSystemOptions fileSystemOptions) throws FileSystemException; 77 78 public abstract Collection getCapabilities(); 79 } 80 | Popular Tags |