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 or dir will be created to provide File access
|
java.io.File |
getFile(java.lang.String suffix)
Returns requested ClassPathResource as File object
Please note: if this method called from compiled jar, temporary file or dir 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.FileNotFoundExceptionpublic java.io.File getFile(java.lang.String suffix)
throws java.io.FileNotFoundException
suffix - suffix of temporary file (if null suffix == "file" or "dir")java.io.FileNotFoundExceptionpublic java.io.InputStream getInputStream()
throws java.io.FileNotFoundException
java.io.FileNotFoundException