private static FileSystemProvider getProvider ( URI uri ) throws IOException { if ( fsproviders . containsKey ( uri . getScheme ( ) ) ) { return fsproviders . get ( uri . getScheme ( ) ) ; } else { FileSystem fs ; try { fs = FileSystems . newFileSystem ( uri , new HashMap < String , Object > ( ) , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; } catch ( FileSystemAlreadyExistsException e ) { fs = FileSystems . getFileSystem ( uri ) ; } fsproviders . put ( uri . getScheme ( ) , fs . provider ( ) ) ; return fs . provider ( ) ; } }
filesystem can t be re - created either .