final class CloseablePath
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Field and Description |
---|---|
private java.io.Closeable |
delegate |
private static java.lang.String |
FILE_URI_SCHEME |
private static java.lang.String |
JAR_FILE_EXTENSION |
private static java.lang.String |
JAR_URI_SCHEME |
private static java.lang.String |
JAR_URI_SEPARATOR |
private static java.io.Closeable |
NULL_CLOSEABLE |
private java.nio.file.Path |
path |
Modifier | Constructor and Description |
---|---|
private |
CloseablePath(java.nio.file.Path path,
java.io.Closeable delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
(package private) static CloseablePath |
create(java.net.URI uri) |
private static CloseablePath |
createForJarFileSystem(java.net.URI jarUri,
java.util.function.Function<java.nio.file.FileSystem,java.nio.file.Path> pathProvider) |
java.nio.file.Path |
getPath() |
private static final java.lang.String FILE_URI_SCHEME
private static final java.lang.String JAR_URI_SCHEME
private static final java.lang.String JAR_FILE_EXTENSION
private static final java.lang.String JAR_URI_SEPARATOR
private static final java.io.Closeable NULL_CLOSEABLE
private final java.nio.file.Path path
private final java.io.Closeable delegate
private CloseablePath(java.nio.file.Path path, java.io.Closeable delegate)
static CloseablePath create(java.net.URI uri) throws java.io.IOException, java.net.URISyntaxException
java.io.IOException
java.net.URISyntaxException
private static CloseablePath createForJarFileSystem(java.net.URI jarUri, java.util.function.Function<java.nio.file.FileSystem,java.nio.file.Path> pathProvider) throws java.io.IOException
java.io.IOException
public java.nio.file.Path getPath()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException