Java 7 zip file system provider doesn't seem to accept spaces in URI

前端 未结 4 745
滥情空心
滥情空心 2020-12-18 18:35

I have been testing all possible variations and permutations, but I can\'t seem to construct a FileSystemProvider with the zip/jar scheme for a path (URI) that contains spac

4条回答
  •  心在旅途
    2020-12-18 19:31

    There are two methods to create a filesystem:

    FileSystem fs = FileSystems.newFileSystem(uri, env);

    FileSystem fs = FileSystems.newFileSystem(zipfile, null);

    When there is a space in a filename together with the above solution for creating a uri. It also works if you use a different method that doesn't take a uri as argument.

提交回复
热议问题