FileProvider
, VfsComponent
CompressedFileFileProvider
, TarFileProvider
, ZipFileProvider
public abstract class AbstractLayeredFileProvider extends AbstractFileProvider
FileProvider
that is layered on top of another, such as the contents of a zip or tar file.Constructor | Description |
---|---|
AbstractLayeredFileProvider() |
Modifier and Type | Method | Description |
---|---|---|
FileObject |
createFileSystem(java.lang.String scheme,
FileObject file,
FileSystemOptions fileSystemOptions) |
Creates a layered file system.
|
protected abstract FileSystem |
doCreateFileSystem(java.lang.String scheme,
FileObject file,
FileSystemOptions fileSystemOptions) |
Creates a layered file system.
|
FileObject |
findFile(FileObject baseFile,
java.lang.String uri,
FileSystemOptions fileSystemOptions) |
Locates a file object, by absolute URI.
|
addFileSystem, close, closeFileSystem, findFileSystem, freeUnusedResources, getConfigBuilder, getFileNameParser, parseUri, setFileNameParser
getContext, getLogger, init, setContext, setLogger
addComponent, removeComponent
getCapabilities
public AbstractLayeredFileProvider()
public FileObject findFile(FileObject baseFile, java.lang.String uri, FileSystemOptions fileSystemOptions) throws FileSystemException
baseFile
- The base FileObject.uri
- The name of the file to locate.fileSystemOptions
- The FileSystemOptions.FileSystemException
- if an error occurs.public FileObject createFileSystem(java.lang.String scheme, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException
createFileSystem
in interface FileProvider
createFileSystem
in class AbstractFileProvider
scheme
- The protocol to use.file
- a FileObject.fileSystemOptions
- Options to access the FileSystem.FileSystemException
- if an error occurs.protected abstract FileSystem doCreateFileSystem(java.lang.String scheme, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException
This method is called if the file system is not cached.
scheme
- The URI scheme.file
- The file to create the file system on top of.fileSystemOptions
- options for new and underlying file systems.VfsComponent
.FileSystemException
- if the file system cannot be created.