public final class ShrinkWrapFileSystems extends Object
FileSystems
support for ShrinkWrap Archive
s.Modifier and Type | Field and Description |
---|---|
static String |
FS_ENV_KEY_ARCHIVE
Map key used to store a Archive when creating a new FileSystem via
FileSystems.newFileSystem(URI, Map) |
static String |
PROTOCOL
Protocol portion of a
URI to ShrinkWrap FileSystem s |
Modifier and Type | Method and Description |
---|---|
static URI |
getRootUri(Archive<?> archive)
Constructs a new
URI with the form:
shrinkwrap://{archive.getId()}/ |
static FileSystem |
newFileSystem(Archive<?> archive)
Creates a new file system for the given
Archive ; in effect invoking this method is equal to invoking
FileSystems.newFileSystem(URI, Map) , passing the value of
getRootUri(Archive) as the URI and the specified archive as a value in a
Map under the key FS_ENV_KEY_ARCHIVE |
public static final String PROTOCOL
URI
to ShrinkWrap FileSystem
spublic static final String FS_ENV_KEY_ARCHIVE
Map
key used to store a Archive
when creating a new FileSystem
via
FileSystems.newFileSystem(URI, Map)
public static FileSystem newFileSystem(Archive<?> archive) throws IllegalArgumentException, IOException
Archive
; in effect invoking this method is equal to invoking
FileSystems.newFileSystem(URI, Map)
, passing the value of
getRootUri(Archive)
as the URI
and the specified archive as a value in a
Map
under the key FS_ENV_KEY_ARCHIVE
archive
- IllegalArgumentException
- If the archive is not specifiedIOException
- If an error was encountered during creation of the new FileSystem
via
FileSystems.newFileSystem(URI, Map)
public static URI getRootUri(Archive<?> archive) throws IllegalArgumentException
URI
with the form:
shrinkwrap://{archive.getId()}/
archive
- IllegalArgumentException
- If the archive is not specifiedCopyright © 2016 JBoss by Red Hat. All rights reserved.