{
final URL url = new URL(uri);
URL rootUrl = new URL(url, "/");
final String key = this.getClass().getName() + rootUrl.toString();
FileSystem fs = findFileSystem(key, fileSystemOptions);
if (fs == null)
{
String extForm = rootUrl.toExternalForm();
final FileName rootName = getContext().parseURI(extForm);
// final FileName rootName =
// new BasicFileName(rootUrl, FileName.ROOT_PATH);
fs = new MvnFileSystem(rootName, fileSystemOptions);
addFileSystem(key, fs);
}
return fs.resolveFile(url.getPath());
}
catch (final MalformedURLException e)
{
throw new FileSystemException("vfs.provider.url/badly-formed-uri.error", uri, e);
}