public class ClassPathResource extends Object
Constructor and Description |
---|
ClassPathResource(String resourceName)
Builds new ClassPathResource object
|
Modifier and Type | Method and Description |
---|---|
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
|
File |
getFile(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
|
InputStream |
getInputStream()
Returns requested ClassPathResource as InputStream object
|
public ClassPathResource(String resourceName)
resourceName
- String name of resource, to be retrievedpublic File getFile() throws FileNotFoundException
FileNotFoundException
public File getFile(String suffix) throws FileNotFoundException
suffix
- suffix of temporary file (if null suffix == "file" or "dir")FileNotFoundException
public InputStream getInputStream() throws FileNotFoundException
FileNotFoundException
Copyright © 2016. All rights reserved.