AW: Legacy java.io.File and new FileSystems
Christian Schlichtherle
christian at schlichtherle.de
Tue Aug 17 04:40:10 PDT 2010
Hi Alan,
following this discussion, I am a bit confused.
What Michael and me are hoping for is the ability to replace the default
FileSystemProvider at runtime in a way which is completely transparent for
the rest of (legacy) applications. So once it's done something like
java.io.File entry = new java.io.File("dir/archive.zip/entry");
InputStream in = new java.io.FileInputStream(file);
/...
OutputStream out = new java.io.FileOutputStream(file);
etc. would allow an application to access archive files transparently. If
the support is complete, it should even be possible to use JFileChooser
(without implementing FileSystemView) and browse archive files much like
Windows Explorer browses ZIP files today.
>From what I get from this discussion you are saying this is not done YET.
Does this mean it will be done before JDK 7 is launching or do we have to
wait until JDK 8 or will it be done at all? Please help me settle my
expectations.
Best regards,
Christian
PS: TrueZIP does all this today but subclasses java.io.File* classes to
achieve it. I would like to change this.
PPS: Yes I know I can create a custom FileSystemProvider for a custom
scheme, but this does not help legacy code using java.io.File.
More information about the nio-discuss
mailing list