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 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 InputStream getInputStream() throws FileNotFoundException
FileNotFoundException
Copyright © 2016. All rights reserved.