Class FileSystemResource

All Implemented Interfaces:
InputStreamSource, Resource, WritableResource

public class FileSystemResource extends AbstractResource implements WritableResource
Resource implementation for and java.nio.file.Path handles with a file system target. Supports resolution as a File and also as a URL. Implements the extended WritableResource interface.

Note: As of Spring Framework 5.0, this Resource implementation uses NIO.2 API for read/write interactions. As of 5.1, it may be constructed with a Path handle in which case it will perform all file system interactions via NIO.2, only resorting to File on getFile().

Juergen Hoeller, Sam Brannen
See Also: