Class ShrinkWrapFileSystem
java.lang.Object
java.nio.file.FileSystem
org.jboss.shrinkwrap.impl.nio.file.ShrinkWrapFileSystem
- All Implemented Interfaces:
Closeable, AutoCloseable
ShrinkWrap implementation adapting a
Archive to a FileSystem; Thread-safe, though access to the
underlying Archive is *not*.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Archive<?> UnderlyingArchive(package private) static final StringContracted name of theBasicFileAttributeViewprivate booleanWhether or not this FS is open; volatile as we don't need compound operations and thus don't need full syncprivate final ShrinkWrapFileSystemProviderProvider which created thisShrinkWrapFileSystem -
Constructor Summary
ConstructorsConstructorDescriptionShrinkWrapFileSystem(ShrinkWrapFileSystemProvider provider, Archive<?> archive) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidChecks if theShrinkWrapFileSystemis closed, and throws aClosedFileSystemExceptionif sovoidclose()(package private) Archive<?> Obtains the underlying archivegetPathMatcher(String syntaxAndPattern) booleanisOpen()booleanprivate StringMerges the path context with a varargs String sub-contexts, returning the resultprovider()toString()
-
Field Details
-
FILE_ATTR_VIEW_BASIC
-
provider
Provider which created thisShrinkWrapFileSystem -
archive
-
fileStores
-
open
private volatile boolean openWhether or not this FS is open; volatile as we don't need compound operations and thus don't need full sync
-
-
Constructor Details
-
ShrinkWrapFileSystem
-
-
Method Details
-
provider
- Specified by:
providerin classFileSystem- See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classFileSystem- Throws:
IOException- See Also:
-
isOpen
public boolean isOpen()- Specified by:
isOpenin classFileSystem- See Also:
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin classFileSystem- See Also:
-
getSeparator
- Specified by:
getSeparatorin classFileSystem- See Also:
-
getRootDirectories
- Specified by:
getRootDirectoriesin classFileSystem- See Also:
-
getFileStores
- Specified by:
getFileStoresin classFileSystem- See Also:
-
supportedFileAttributeViews
- Specified by:
supportedFileAttributeViewsin classFileSystem- See Also:
-
getPath
- Specified by:
getPathin classFileSystem- See Also:
-
merge
-
getPathMatcher
- Specified by:
getPathMatcherin classFileSystem
-
getUserPrincipalLookupService
- Specified by:
getUserPrincipalLookupServicein classFileSystem- See Also:
-
newWatchService
- Specified by:
newWatchServicein classFileSystem- Throws:
IOException- See Also:
-
toString
-
checkClosed
Checks if theShrinkWrapFileSystemis closed, and throws aClosedFileSystemExceptionif so- Throws:
ClosedFileSystemException
-
getArchive
Archive<?> getArchive()Obtains the underlying archive
-