code: public static FileSystem get(URI uri) throws IOException {
  
  		FileSystem fs = null;
  
  		synchronized (SYNCHRONIZATION_OBJECT) {
  
  			if (uri.getScheme() == null) {
  				try {
  					uri = new URI("file", null, uri.getPath(), null);
  				}
  				catch (URISyntaxException e) {
  					// we tried to repair it, but could not. report the scheme error
  					throw new IOException("FileSystem: Scheme is null. file:// or hdfs:// are example schemes.");
  				}
  			}
  
  			final FSKey key = new FSKey(uri.getScheme(), uri.getAuthority());
  
  			// See if there is a file system object in the cache
  			if (CACHE.containsKey(key)) {
  				return CACHE.get(key);
  			}
  
  			// Try to create a new file system
  			if (!FSDIRECTORY.containsKey(uri.getScheme())) {
  				throw new IOException("No file system found with scheme " + uri.getScheme());
  			}
  
  			Class<? extends FileSystem> fsClass = null;
  			try {
  				fsClass = ClassUtils.getFileSystemByName(FSDIRECTORY.get(uri.getScheme()));
  			} catch (ClassNotFoundException e1) {
  				throw new IOException(StringUtils.stringifyException(e1));
  			}
  
  			try {
  				fs = fsClass.newInstance();
  			}
  			catch (InstantiationException e) {
  				throw new IOException("Could not instantiate file system class: " + e.getMessage(), e);
  			}
  			catch (IllegalAccessException e) {
  				throw new IOException("Could not instantiate file system class: " + e.getMessage(), e);
  			}
  
  			// Initialize new file system object
  			fs.initialize(uri);
  
  			// Add new file system object to cache
  			CACHE.put(key, fs);
  		}
  
  		return fs;
  	}
docs: Returns a reference to the {@link FileSystem} instance for accessing the
  file system identified by the given {@link URI}.
  
  @param uri
  the {@link URI} identifying the file system
  @return a reference to the {@link FileSystem} instance for accessing the file system identified by the given
  {@link URI}.
  @throws IOException
  thrown if a reference to the file system instance could not be obtained