Question regarding extensibility

Alan Bateman Alan.Bateman at Sun.COM
Thu Feb 4 01:16:48 PST 2010


Marcel Ammerlaan wrote:
> Hello,
>
> I'm trying out the new java.nio.file.* as an alternative to Apache VFS.
> One striking omission however is the ability to add new filesystems 
> dynamically:
The FileSystems class defines several methods to create file systems at 
runtime. The newFileSystem methods that specify a class loader can be 
used to locate providers that aren't installed but are loaded via custom 
class loaders. Furthermore, if you have a reference to a 
FileSystemProvider then you can just invoke its newFileSystem method 
directly to create the file system -- ie: it doesn't have to be created 
via FileSystems. That may help you but I think you are actually looking 
to register providers at runtime. It would be useful if you could 
elaborate on how you might use this. At this time we don't keep a global 
registry of providers. The installedProviders method just returns the 
list of "installed" provider and would require something else (in 
FileSystems) to support a global registry.

-Alan.


More information about the nio-discuss mailing list