public static FileSystem getFileSystem (URI uri)

Returns a reference to an existing FileSystem.

This method iterates over the FileSystemProvider.installedProviders() providers to locate the provider that is identified by the URI scheme of the given URI. URI schemes are compared without regard to case. The exact form of the URI is highly provider dependent. If found, the provider's getFileSystem method is invoked to obtain a reference to the FileSystem.

Once a file system created by this provider is closed it is provider-dependent if this method returns a reference to the closed file system or throws FileSystemNotFoundException. If the provider allows a new file system to be created with the same URI as a file system it previously created then this method throws the exception if invoked after the file system is closed (and before a new instance is created by the newFileSystem method).

If a security manager is installed then a provider implementation may require to check a permission before returning a reference to an existing file system. In the case of the default file system, no permission check is required.

Parameters:
uri    the URI to locate the file system

Returns:  the reference to the file system

Exceptions:
IllegalArgumentException     if the pre-conditions for the uri parameter are not met
FileSystemNotFoundException     if the file system, identified by the URI, does not exist
ProviderNotFoundException     if a provider supporting the URI scheme is not installed
SecurityException     if a security manager is installed and it denies an unspecified permission