public abstract class FilterFileSystemProvider extends FileSystemProvider
FilterFileSystemProvider contains another
FileSystemProvider, which it uses as its basic
source of data, possibly transforming the data along the
way or providing additional functionality.| Modifier and Type | Field and Description |
|---|---|
protected FileSystemProvider |
delegate
The underlying
FileSystemProvider. |
protected FileSystem |
fileSystem
The underlying
FileSystem instance. |
protected String |
scheme
The URI scheme for this provider.
|
| Constructor and Description |
|---|
FilterFileSystemProvider(String scheme,
FileSystem delegateInstance)
Construct a
FilterFileSystemProvider indicated by
the specified scheme and wrapping functionality of the
provider of the specified base filesystem. |
FilterFileSystemProvider(String scheme,
FileSystemProvider delegate)
Construct a
FilterFileSystemProvider indicated by
the specified scheme and wrapping functionality of the
provider. |
installedProvidersprotected final FileSystemProvider delegate
FileSystemProvider.protected FileSystem fileSystem
FileSystem instance.protected final String scheme
public FilterFileSystemProvider(String scheme, FileSystem delegateInstance)
FilterFileSystemProvider indicated by
the specified scheme and wrapping functionality of the
provider of the specified base filesystem.scheme - URI schemedelegateInstance - specified base filesystem.public FilterFileSystemProvider(String scheme, FileSystemProvider delegate)
FilterFileSystemProvider indicated by
the specified scheme and wrapping functionality of the
provider. You must set the singleton filesystem yourself.scheme - URI schemedelegate - specified base provider.public String getScheme()
getScheme in class FileSystemProviderpublic FileSystem newFileSystem(URI uri, Map<String,?> env) throws IOException
newFileSystem in class FileSystemProviderIOExceptionpublic FileSystem newFileSystem(Path path, Map<String,?> env) throws IOException
newFileSystem in class FileSystemProviderIOExceptionpublic FileSystem getFileSystem(URI uri)
getFileSystem in class FileSystemProviderpublic Path getPath(URI uri)
getPath in class FileSystemProviderpublic void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException
createDirectory in class FileSystemProviderIOExceptionpublic void delete(Path path) throws IOException
delete in class FileSystemProviderIOExceptionpublic void copy(Path source, Path target, CopyOption... options) throws IOException
copy in class FileSystemProviderIOExceptionpublic void move(Path source, Path target, CopyOption... options) throws IOException
move in class FileSystemProviderIOExceptionpublic boolean isSameFile(Path path, Path path2) throws IOException
isSameFile in class FileSystemProviderIOExceptionpublic boolean isHidden(Path path) throws IOException
isHidden in class FileSystemProviderIOExceptionpublic FileStore getFileStore(Path path) throws IOException
getFileStore in class FileSystemProviderIOExceptionpublic void checkAccess(Path path, AccessMode... modes) throws IOException
checkAccess in class FileSystemProviderIOExceptionpublic <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options)
getFileAttributeView in class FileSystemProviderpublic <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws IOException
readAttributes in class FileSystemProviderIOExceptionpublic Map<String,Object> readAttributes(Path path, String attributes, LinkOption... options) throws IOException
readAttributes in class FileSystemProviderIOExceptionpublic void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException
setAttribute in class FileSystemProviderIOExceptionpublic InputStream newInputStream(Path path, OpenOption... options) throws IOException
newInputStream in class FileSystemProviderIOExceptionpublic OutputStream newOutputStream(Path path, OpenOption... options) throws IOException
newOutputStream in class FileSystemProviderIOExceptionpublic FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException
newFileChannel in class FileSystemProviderIOExceptionpublic AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException
newAsynchronousFileChannel in class FileSystemProviderIOExceptionpublic SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException
newByteChannel in class FileSystemProviderIOExceptionpublic DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException
newDirectoryStream in class FileSystemProviderIOExceptionpublic void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) throws IOException
createSymbolicLink in class FileSystemProviderIOExceptionpublic void createLink(Path link, Path existing) throws IOException
createLink in class FileSystemProviderIOExceptionpublic boolean deleteIfExists(Path path) throws IOException
deleteIfExists in class FileSystemProviderIOExceptionpublic Path readSymbolicLink(Path link) throws IOException
readSymbolicLink in class FileSystemProviderIOExceptionprotected void onClose()
This is always called for each FilterFileSystemProvider in the chain.
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.