Legacy java.io.File and new FileSystems

Michael Hall hallmike at att.net
Wed Aug 11 16:08:01 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>
> There have been a number of patches on nio-dev to fix several  
> issues with the zip provider.

Exception in thread "main" java.nio.file.ReadOnlyFileSystemException
	at com.sun.nio.zipfs.ZipFilePath.copyTo(ZipFilePath.java:1132)
	at Sanity.main(Sanity.java:92)

     @Override
     public Path copyTo(Path target, CopyOption... options) {
         throw new ReadOnlyFileSystemException();
     }

Again this might be because of how I pieced the thing together with  
Google searches for missing classes and grabbing the source out of  
the browser.
The current version might not have this.
> You'll find the details in the javadoc.

I'll check the doc, various, and see where I go from there. I'll read  
through your post a little more closely first, it may explain a lot  
of what I'm not understanding. What I'm looking for again is more or  
less what I had thrown together before myself. A custom FileSystem  
that will work without modification with existing File/ 
FileOutputStream based java.  If the existing code requires  
modification, that is less ideal but still makes custom FileSystems  
and java.io based code something that could be done. The example  
again is that you can take something like javac and get it to use a  
custom FileSystem without any changes to it at all. Generalizing this  
could any other existing java package/library/application. You can  
get them to use some FileSystem just by snapping it on. Remembering  
this may be code you are not otherwise free to modify and the scope  
may be of enough complexity you wouldn't want to put in the effort to  
modify it even if you are in a position to do so. The code should be  
pointed at the custom FileSystem without changing it and just work.

Thanks again, I'll try to get a little more up to speed on the doc  
and the code before questioning this further.

> Mike Hall        hallmike at att dot net

http://www195.pair.com/mik3hall
http://www195.pair.com/mik3hall/home.html
http://sourceforge.net/projects/macnative




-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)

iJwEAQECAAYFAkxjLVkACgkQUvk/ZSaThTIgpQP7BghwA8VDWhRwfB9DkYJMwber
INAwzsO8O9/sOUb7SOY0U1cSXsvD2422mQVP0Vwrwz41Fy1m7w7ntTiW6B+AzUbb
yioTuuAOmbr+dRcBotb+nP7QSqpa2AfzYc7n3wL7J2iDKLzkVN7ohUF7L4C3e2Tm
yMld7ElHcopLniUQ4og=
=Irb5
-----END PGP SIGNATURE-----


More information about the nio-discuss mailing list