Package org.apache.commons.vfs2.provider
Class AbstractOriginatingFileProvider
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractVfsContainer
org.apache.commons.vfs2.provider.AbstractFileProvider
org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- FileProvider,- VfsComponent
- Direct Known Subclasses:
- DefaultLocalFileProvider,- FtpFileProvider,- Http4FileProvider,- Http5FileProvider,- HttpFileProvider,- RamFileProvider,- SftpFileProvider
A 
FileProvider that handles physical files, such as the files in a local fs, or on an FTP server. An
 originating file system cannot be layered on top of another file system.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract FileSystemdoCreateFileSystem(FileName rootFileName, FileSystemOptions fileSystemOptions) Creates aFileSystem.protected FileObjectfindFile(FileName fileName, FileSystemOptions fileSystemOptions) Locates a file from its parsed URI.findFile(FileObject baseFileObject, String uri, FileSystemOptions fileSystemOptions) Locates a file object, by absolute URI.protected FileSystemgetFileSystem(FileName rootFileName, FileSystemOptions fileSystemOptions) Returns the FileSystem associated with the specified root.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileProvideraddFileSystem, close, closeFileSystem, createFileSystem, findFileSystem, freeUnusedResources, getConfigBuilder, getFileNameParser, parseUri, setFileNameParserMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsContaineraddComponent, removeComponentMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponentgetContext, getLogger, init, setContext, setLoggerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.provider.FileProvidergetCapabilities
- 
Constructor Details- 
AbstractOriginatingFileProviderpublic AbstractOriginatingFileProvider()Constructs a new instance for subclasses.
 
- 
- 
Method Details- 
doCreateFileSystemprotected abstract FileSystem doCreateFileSystem(FileName rootFileName, FileSystemOptions fileSystemOptions) throws FileSystemException Creates aFileSystem. If the returned FileSystem implementsVfsComponent, it will be initialized.- Parameters:
- rootFileName- The name of the root file of the file system to create.
- fileSystemOptions- The FileSystem options.
- Returns:
- The FileSystem, never null.
- Throws:
- FileSystemException- if an error occurs.
 
- 
findFileprotected FileObject findFile(FileName fileName, FileSystemOptions fileSystemOptions) throws FileSystemException Locates a file from its parsed URI.- Parameters:
- fileName- The file name.
- fileSystemOptions- FileSystem options.
- Returns:
- A FileObject associated with the file, never null.
- Throws:
- FileSystemException- if an error occurs.
 
- 
findFilepublic FileObject findFile(FileObject baseFileObject, String uri, FileSystemOptions fileSystemOptions) throws FileSystemException Locates a file object, by absolute URI.- Parameters:
- baseFileObject- The base file object.
- uri- The URI of the file to locate
- fileSystemOptions- The FileSystem options.
- Returns:
- The located FileObject
- Throws:
- FileSystemException- if an error occurs.
 
- 
getFileSystemprotected FileSystem getFileSystem(FileName rootFileName, FileSystemOptions fileSystemOptions) throws FileSystemException Returns the FileSystem associated with the specified root.- Parameters:
- rootFileName- The root path.
- fileSystemOptions- The FileSystem options.
- Returns:
- The FileSystem, never null.
- Throws:
- FileSystemException- if an error occurs.
- Since:
- 2.0
 
 
-