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 String
Contracted name of theBasicFileAttributeView
private boolean
Whether or not this FS is open; volatile as we don't need compound operations and thus don't need full syncprivate final ShrinkWrapFileSystemProvider
Provider which created thisShrinkWrapFileSystem
-
Constructor Summary
ConstructorsConstructorDescriptionShrinkWrapFileSystem
(ShrinkWrapFileSystemProvider provider, Archive<?> archive) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Checks if theShrinkWrapFileSystem
is closed, and throws aClosedFileSystemException
if sovoid
close()
(package private) Archive
<?> Obtains the underlying archivegetPathMatcher
(String syntaxAndPattern) boolean
isOpen()
boolean
private String
Merges the path context with a varargs String sub-contexts, returning the resultprovider()
toString()
-
Field Details
-
FILE_ATTR_VIEW_BASIC
Contracted name of theBasicFileAttributeView
- See Also:
-
provider
Provider which created thisShrinkWrapFileSystem
-
archive
UnderlyingArchive
-
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:
provider
in classFileSystem
- See Also:
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classFileSystem
- Throws:
IOException
- See Also:
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in classFileSystem
- See Also:
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in classFileSystem
- See Also:
-
getSeparator
- Specified by:
getSeparator
in classFileSystem
- See Also:
-
getRootDirectories
- Specified by:
getRootDirectories
in classFileSystem
- See Also:
-
getFileStores
- Specified by:
getFileStores
in classFileSystem
- See Also:
-
supportedFileAttributeViews
- Specified by:
supportedFileAttributeViews
in classFileSystem
- See Also:
-
getPath
- Specified by:
getPath
in classFileSystem
- See Also:
-
merge
Merges the path context with a varargs String sub-contexts, returning the result- Parameters:
first
-more
-- Returns:
-
getPathMatcher
- Specified by:
getPathMatcher
in classFileSystem
-
getUserPrincipalLookupService
- Specified by:
getUserPrincipalLookupService
in classFileSystem
- See Also:
-
newWatchService
- Specified by:
newWatchService
in classFileSystem
- Throws:
IOException
- See Also:
-
toString
-
checkClosed
Checks if theShrinkWrapFileSystem
is closed, and throws aClosedFileSystemException
if so- Throws:
ClosedFileSystemException
-
getArchive
Archive<?> getArchive()Obtains the underlying archive
-