33 import java.lang.reflect.Constructor;
34 import java.util.Collections;
35 import java.util.Map;
36 import java.util.ServiceConfigurationError;
37 import java.util.ServiceLoader;
38
39 import jdk.internal.misc.VM;
40
41 /**
42 * Factory methods for file systems. This class defines the {@link #getDefault
43 * getDefault} method to get the default file system and factory methods to
44 * construct other types of file systems.
45 *
46 * <p> The first invocation of any of the methods defined by this class causes
47 * the default {@link FileSystemProvider provider} to be loaded. The default
48 * provider, identified by the URI scheme "file", creates the {@link FileSystem}
49 * that provides access to the file systems accessible to the Java virtual
50 * machine. If the process of loading or initializing the default provider fails
51 * then an unspecified error is thrown.
52 *
53 * <p> The first invocation of the {@link FileSystemProvider#installedProviders
54 * installedProviders} method, by way of invoking any of the {@code
55 * newFileSystem} methods defined by this class, locates and loads all
56 * installed file system providers. Installed providers are loaded using the
57 * service-provider loading facility defined by the {@link ServiceLoader} class.
58 * Installed providers are loaded using the system class loader. If the
59 * system class loader cannot be found then the platform class loader is used.
60 * Providers are typically installed by placing them in a JAR file on the
61 * application class path, the JAR file contains a
62 * provider-configuration file named {@code java.nio.file.spi.FileSystemProvider}
63 * in the resource directory {@code META-INF/services}, and the file lists one or
64 * more fully-qualified names of concrete subclass of {@link FileSystemProvider}
65 * that have a zero argument constructor.
66 * The ordering that installed providers are located is implementation specific.
67 * If a provider is instantiated and its {@link FileSystemProvider#getScheme()
68 * getScheme} returns the same URI scheme of a provider that was previously
69 * instantiated then the most recently instantiated duplicate is discarded. URI
70 * schemes are compared without regard to case. During construction a provider
71 * may safely access files associated with the default provider but care needs
72 * to be taken to avoid circular loading of other installed providers. If
73 * circular loading of installed providers is detected then an unspecified error
|
33 import java.lang.reflect.Constructor;
34 import java.util.Collections;
35 import java.util.Map;
36 import java.util.ServiceConfigurationError;
37 import java.util.ServiceLoader;
38
39 import jdk.internal.misc.VM;
40
41 /**
42 * Factory methods for file systems. This class defines the {@link #getDefault
43 * getDefault} method to get the default file system and factory methods to
44 * construct other types of file systems.
45 *
46 * <p> The first invocation of any of the methods defined by this class causes
47 * the default {@link FileSystemProvider provider} to be loaded. The default
48 * provider, identified by the URI scheme "file", creates the {@link FileSystem}
49 * that provides access to the file systems accessible to the Java virtual
50 * machine. If the process of loading or initializing the default provider fails
51 * then an unspecified error is thrown.
52 *
53 * <p> The first invocation of the {@link FileSystemProvider#installedProviders()
54 * installedProviders} method, by way of invoking any of the {@code
55 * newFileSystem} methods defined by this class, locates and loads all
56 * installed file system providers. Installed providers are loaded using the
57 * service-provider loading facility defined by the {@link ServiceLoader} class.
58 * Installed providers are loaded using the system class loader. If the
59 * system class loader cannot be found then the platform class loader is used.
60 * Providers are typically installed by placing them in a JAR file on the
61 * application class path, the JAR file contains a
62 * provider-configuration file named {@code java.nio.file.spi.FileSystemProvider}
63 * in the resource directory {@code META-INF/services}, and the file lists one or
64 * more fully-qualified names of concrete subclass of {@link FileSystemProvider}
65 * that have a zero argument constructor.
66 * The ordering that installed providers are located is implementation specific.
67 * If a provider is instantiated and its {@link FileSystemProvider#getScheme()
68 * getScheme} returns the same URI scheme of a provider that was previously
69 * instantiated then the most recently instantiated duplicate is discarded. URI
70 * schemes are compared without regard to case. During construction a provider
71 * may safely access files associated with the default provider but care needs
72 * to be taken to avoid circular loading of other installed providers. If
73 * circular loading of installed providers is detected then an unspecified error
|