Zip file system provider only works with default file system
Michael Hall
mik3hall at gmail.com
Sat Dec 8 12:18:15 PST 2012
It's a demo.
Couldn't you just temporarily put your own ZipFileSystem in classpath some place before the default version jar?
With something like…
In com.sun.nio.zipfs.ZipFileSystem
// Creates a new empty temporary file in the same directory as the
// specified file. A variant of File.createTempFile.
private Path createTempFileInSameDirectoryAs(Path path)
throws IOException
{
Path parent = path.toAbsolutePath().getParent();
Path tmpPath = Files.createTempFile(dir,"zipfstmp", null);
tmppaths.add(tmpPath);
return tmpPath;
}
Assumes it'll use the correct FileSystem as the parameter's Path all the way through, I haven't tested it at all.
Not sure if there are any complications with a com.sun class. You could change the demo package.
Are you just trying this out or do you intend to use the demo code in something production?
Michael Hall
trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz
HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe
AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121208/b42518bc/attachment.html
More information about the nio-dev
mailing list