Java File System newJarFileSystem(Path jarFilePath)

Here you can find the source of newJarFileSystem(Path jarFilePath)

Description

new Jar File System

License

CDDL license

Declaration

public static FileSystem newJarFileSystem(Path jarFilePath) throws IOException 

Method Source Code

//package com.java2s;
/*/*from w w w. ja  va2 s  . co m*/
 *         COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Notice
 *
 * The contents of this file are subject to the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
 * Version 1.0 (the "License"); you may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.opensource.org/licenses/cddl1.txt
 *
 * The Original Code is SoftSmithy Utility Library. The Initial Developer of the
 * Original Code is Florian Brunner (Sourceforge.net user: puce). All Rights Reserved.
 *
 * Contributor(s): .
 */

import java.io.IOException;
import java.net.URI;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;

import java.nio.file.Path;
import java.util.HashMap;

public class Main {
    public static FileSystem newJarFileSystem(Path jarFilePath) throws IOException {
        return FileSystems.newFileSystem(URI.create("jar:" + jarFilePath.toUri().toString()),
                new HashMap<String, Object>());
    }
}

Related

  1. getFileSystem(Path path)
  2. getPath(FileSystem targetFS, String fileName)
  3. isFileSystemAvailable(final Path file, final String topLevelAbsolutePath)
  4. isFileSystemAvailable2(final Path file, final String topLevelAbsolutePath)
  5. loadSystemResourceKeyValueCsvFileToMap(String resourcePath)
  6. newOutputStream(FileSystem system, Path path)
  7. systemEnvironmentPaths()
  8. toSystemPath(String rawpath)
  9. zipDirectoryOrFile(String level, Path target, FileSystem zipFileFileSystem)