Class PathResource

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

public class PathResource extends AbstractResource implements WritableResource
Resource implementation for Path handles, performing all operations and transformations via the Path API. Supports resolution as a File and also as a URL. Implements the extended WritableResource interface.

Note: As of 5.1, Path support is also available in FileSystemResource, applying Spring's standard String-based path transformations but performing all operations via the Files API. This PathResource is effectively a pure java.nio.path.Path based alternative with different createRelative behavior.

Since:
4.0
Author:
Philippe Marschall, Juergen Hoeller
See Also: