public interface Resource
ClasspathResource - Resources that exists in the ClasspathFileSystemResource - Resources that exists in the FileSystemUrlResource - Resource that exists as a URL(http , ftp) etc| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Indicates whether the resource exists or not
|
File |
getFile()
Get the
File associated with the resource |
InputStream |
getInputStream()
Get the
InputStream associated with the resource |
OutputStream |
getOutputStream()
Get the
OutputStream associated with the resource |
String |
getResourceName()
Get the resource name
|
URL |
getURL()
get the
URL associated with the resource |
boolean exists()
InputStream getInputStream() throws IOException
InputStream associated with the resourceInputStreamIOException - if an IOException occursOutputStream getOutputStream() throws IOException
OutputStream associated with the resourceOutputStreamIOException - if an IOException occursString getResourceName()
Copyright © 2014. All rights reserved.