public class ClassPathResource
extends java.lang.Object
Constructor and Description |
---|
ClassPathResource(java.lang.String resourceName)
Builds new ClassPathResource object
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
getFile()
Returns requested ClassPathResource as File object
Please note: if this method called from compiled jar, temporary file will be created to provide File access
|
java.io.InputStream |
getInputStream()
Returns requested ClassPathResource as InputStream object
|
public ClassPathResource(java.lang.String resourceName)
resourceName
- String name of resource, to be retrievedpublic java.io.File getFile() throws java.io.FileNotFoundException
java.io.FileNotFoundException
public java.io.InputStream getInputStream() throws java.io.FileNotFoundException
java.io.FileNotFoundException