Class ShrinkWrapFileSystems
java.lang.Object
org.jboss.shrinkwrap.api.nio.file.ShrinkWrapFileSystems
Convenience API bridge to the NIO.2
FileSystems
support for ShrinkWrap Archive
s.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Map
key used to store aArchive
when creating a newFileSystem
viaFileSystems.newFileSystem(URI, Map)
static final String
Protocol portion of aURI
to ShrinkWrapFileSystem
sprivate static final String
Protocol suffix before ID portion of ShrinkWrapURI
s -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URI
getRootUri
(Archive<?> archive) Constructs a newURI
with the form:shrinkwrap://{archive.getId()}/
static FileSystem
newFileSystem
(Archive<?> archive) Creates a new file system for the givenArchive
; in effect invoking this method is equal to invokingFileSystems.newFileSystem(URI, Map)
, passing the value ofgetRootUri(Archive)
as theURI
and the specified archive as a value in aMap
under the keyFS_ENV_KEY_ARCHIVE
-
Field Details
-
PROTOCOL
Protocol portion of aURI
to ShrinkWrapFileSystem
s- See Also:
-
FS_ENV_KEY_ARCHIVE
Map
key used to store aArchive
when creating a newFileSystem
viaFileSystems.newFileSystem(URI, Map)
- See Also:
-
URI_PROTOCOL_SUFFIX
Protocol suffix before ID portion of ShrinkWrapURI
s- See Also:
-
-
Constructor Details
-
ShrinkWrapFileSystems
private ShrinkWrapFileSystems()
-
-
Method Details
-
newFileSystem
public static FileSystem newFileSystem(Archive<?> archive) throws IllegalArgumentException, IOException Creates a new file system for the givenArchive
; in effect invoking this method is equal to invokingFileSystems.newFileSystem(URI, Map)
, passing the value ofgetRootUri(Archive)
as theURI
and the specified archive as a value in aMap
under the keyFS_ENV_KEY_ARCHIVE
- Parameters:
archive
-- Returns:
- Throws:
IllegalArgumentException
- If the archive is not specifiedIOException
- If an error was encountered during creation of the newFileSystem
viaFileSystems.newFileSystem(URI, Map)
-
getRootUri
Constructs a newURI
with the form:shrinkwrap://{archive.getId()}/
- Parameters:
archive
-- Returns:
- Throws:
IllegalArgumentException
- If the archive is not specified
-