Package org.broadinstitute.http.nio
Class HttpAbstractFileSystemProvider
java.lang.Object
java.nio.file.spi.FileSystemProvider
org.broadinstitute.http.nio.HttpAbstractFileSystemProvider
- Direct Known Subclasses:
HttpFileSystemProvider
,HttpsFileSystemProvider
Abstract
FileSystemProvider
for HttpFileSystem
.
HTTP/S are handled in the same way in jsr203-http, but every protocol requires its own
provider to return its scheme with getScheme()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<String, HttpFileSystem> private static HttpFileSystemProviderSettings
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
checkAccess
(Path path, AccessMode... modes) private URI
final void
copy
(Path source, Path target, CopyOption... options) final void
createDirectory
(Path dir, FileAttribute<?>... attrs) Unsupported method.final void
Unsupported method.final <V extends FileAttributeView>
VgetFileAttributeView
(Path path, Class<V> type, LinkOption... options) final FileStore
getFileStore
(Path path) final HttpFileSystem
getFileSystem
(URI uri) final HttpPath
abstract String
final boolean
final boolean
isSameFile
(Path path, Path path2) final void
move
(Path source, Path target, CopyOption... options) Unsupported method.final SeekableByteChannel
newByteChannel
(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) final DirectoryStream
<Path> newDirectoryStream
(Path dir, DirectoryStream.Filter<? super Path> filter) final HttpFileSystem
newFileSystem
(URI uri, Map<String, ?> env) final <A extends BasicFileAttributes>
AreadAttributes
(Path path, Class<A> type, LinkOption... options) readAttributes
(Path path, String attributes, LinkOption... options) final void
setAttribute
(Path path, String attribute, Object value, LinkOption... options) static void
setSettings
(HttpFileSystemProviderSettings settings) override the existing settingstoString()
Methods inherited from class java.nio.file.spi.FileSystemProvider
createLink, createSymbolicLink, deleteIfExists, installedProviders, newAsynchronousFileChannel, newFileChannel, newFileSystem, newInputStream, newOutputStream, readSymbolicLink
-
Field Details
-
settings
-
fileSystems
-
-
Constructor Details
-
HttpAbstractFileSystemProvider
HttpAbstractFileSystemProvider()
-
-
Method Details
-
getScheme
- Specified by:
getScheme
in classFileSystemProvider
-
checkUri
-
newFileSystem
- Specified by:
newFileSystem
in classFileSystemProvider
-
getFileSystem
- Specified by:
getFileSystem
in classFileSystemProvider
-
getPath
- Specified by:
getPath
in classFileSystemProvider
-
newByteChannel
public final SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException - Specified by:
newByteChannel
in classFileSystemProvider
- Throws:
IOException
-
newDirectoryStream
public final DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) - Specified by:
newDirectoryStream
in classFileSystemProvider
-
createDirectory
Unsupported method.- Specified by:
createDirectory
in classFileSystemProvider
- Throws:
IOException
-
delete
Unsupported method.- Specified by:
delete
in classFileSystemProvider
- Throws:
IOException
-
copy
- Specified by:
copy
in classFileSystemProvider
- Throws:
IOException
-
move
Unsupported method.- Specified by:
move
in classFileSystemProvider
- Throws:
IOException
-
isSameFile
- Specified by:
isSameFile
in classFileSystemProvider
-
isHidden
- Specified by:
isHidden
in classFileSystemProvider
-
getFileStore
- Specified by:
getFileStore
in classFileSystemProvider
-
checkAccess
- Specified by:
checkAccess
in classFileSystemProvider
- Throws:
IOException
-
getFileAttributeView
public final <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options) - Specified by:
getFileAttributeView
in classFileSystemProvider
-
readAttributes
public final <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws IOException - Specified by:
readAttributes
in classFileSystemProvider
- Throws:
IOException
-
readAttributes
public final Map<String,Object> readAttributes(Path path, String attributes, LinkOption... options) throws IOException - Specified by:
readAttributes
in classFileSystemProvider
- Throws:
IOException
-
setAttribute
public final void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException - Specified by:
setAttribute
in classFileSystemProvider
- Throws:
IOException
-
toString
-
getSettings
- Returns:
- the current settings
-
setSettings
override the existing settings- Parameters:
settings
- the new settings object to use
-