Class CloseablePath

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    final class CloseablePath
    extends java.lang.Object
    implements java.io.Closeable
    Since:
    1.0
    • Field Detail

      • JAR_FILE_EXTENSION

        private static final java.lang.String JAR_FILE_EXTENSION
        See Also:
        Constant Field Values
      • JAR_URI_SEPARATOR

        private static final java.lang.String JAR_URI_SEPARATOR
        See Also:
        Constant Field Values
      • NULL_CLOSEABLE

        private static final java.io.Closeable NULL_CLOSEABLE
      • path

        private final java.nio.file.Path path
      • delegate

        private final java.io.Closeable delegate
    • Constructor Detail

      • CloseablePath

        private CloseablePath​(java.nio.file.Path path,
                              java.io.Closeable delegate)
    • Method Detail

      • create

        static CloseablePath create​(java.net.URI uri)
                             throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • createForJarFileSystem

        private static CloseablePath createForJarFileSystem​(java.net.URI jarUri,
                                                            java.util.function.Function<java.nio.file.FileSystem,​java.nio.file.Path> pathProvider)
      • getPath

        public java.nio.file.Path getPath()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException