public class FileResource extends Object implements ClasspathResource
ClasspathResource that lives in a directory archive.| Constructor and Description |
|---|
FileResource(String absolutePath,
String relativePath)
Creates an instance from its absolute path on the file system, and from the its path relative to archive
that contains it.
|
| Modifier and Type | Method and Description |
|---|---|
File |
file()
Returns the resource as a file
|
String |
name()
Returns the name of the resource.
|
String |
path()
Returns the path of the resource, relatively to the containing archive.
|
InputStream |
stream()
Returns the resource as a stream.
|
String |
toString() |
public String name()
ClasspathResourcename in interface ClasspathResourcepublic String path()
ClasspathResourcepath in interface ClasspathResourcepublic InputStream stream()
ClasspathResourcestream in interface ClasspathResourcepublic File file()
ClasspathResourcefile in interface ClasspathResourceCopyright © 2017. All Rights Reserved.