public final class ShrinkWrapFileSystems extends Object
FileSystems support for ShrinkWrap Archives.| 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 FileSystems |
| Modifier and Type | Method and Description |
|---|---|
static URI |
getRootUri(Archive<?> archive)
Constructs a new
URI with the form: |
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 FileSystemspublic 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_ARCHIVEarchive - The Archive for which a new file system is to be created. Must not be null.FileSystem associated with the given 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 - The Archive for which the root URI is to be constructed. Must not be null.URI representing the root of the given Archive.IllegalArgumentException - If the archive is not specifiedCopyright © 2024 JBoss by Red Hat. All rights reserved.