FileSystem.provider() has the following syntax.
public abstract FileSystemProvider provider()
In the following code shows how to use FileSystem.provider() method.
import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.spi.FileSystemProvider; //from w ww .j a va2 s. com public class Main { public static void main(String[] args) { FileSystem fileSystem = FileSystems.getDefault(); FileSystemProvider provider = fileSystem.provider(); System.out.println("Provider: " + provider.toString()); } }
The code above generates the following result.