Class FileSystemResource

java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.core.io.FileSystemResource
All Implemented Interfaces:
InputStreamSource, Resource, WritableResource

public class FileSystemResource extends AbstractResource implements WritableResource
Resource implementation for java.io.File 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().

Since:
28.12.2003
Author:
Juergen Hoeller, Sam Brannen
See Also: