public final class ShrinkWrapFileSystems
extends java.lang.Object
FileSystems
support for ShrinkWrap Archive
s.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FS_ENV_KEY_ARCHIVE
Map key used to store a Archive when creating a new FileSystem via
FileSystems.newFileSystem(URI, Map) |
static java.lang.String |
PROTOCOL
Protocol portion of a
URI to ShrinkWrap FileSystem s |
private static java.lang.String |
URI_PROTOCOL_SUFFIX
Protocol suffix before ID portion of ShrinkWrap
URI s |
Modifier | Constructor and Description |
---|---|
private |
ShrinkWrapFileSystems() |
Modifier and Type | Method and Description |
---|---|
static java.net.URI |
getRootUri(Archive<?> archive)
Constructs a new
URI with the form:
shrinkwrap://{archive.getId()}/ |
static java.nio.file.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 java.lang.String PROTOCOL
URI
to ShrinkWrap FileSystem
spublic static final java.lang.String FS_ENV_KEY_ARCHIVE
Map
key used to store a Archive
when creating a new FileSystem
via
FileSystems.newFileSystem(URI, Map)
private static final java.lang.String URI_PROTOCOL_SUFFIX
URI
spublic static java.nio.file.FileSystem newFileSystem(Archive<?> archive) throws java.lang.IllegalArgumentException, java.io.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
- java.lang.IllegalArgumentException
- If the archive is not specifiedjava.io.IOException
- If an error was encountered during creation of the new FileSystem
via
FileSystems.newFileSystem(URI, Map)
public static java.net.URI getRootUri(Archive<?> archive) throws java.lang.IllegalArgumentException
URI
with the form:
shrinkwrap://{archive.getId()}/
archive
- java.lang.IllegalArgumentException
- If the archive is not specified