public class ClassPathResource extends java.lang.Object implements Resource
| Constructor and Description |
|---|
ClassPathResource(java.lang.String name,
java.lang.Class<?> aClass) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
Resource |
createRelative(java.lang.String relativePath) |
boolean |
exists() |
java.lang.String |
getDescription() |
java.io.File |
getFile() |
java.lang.String |
getFilename() |
java.io.InputStream |
getInputStream() |
java.net.URI |
getURI() |
java.net.URL |
getURL() |
boolean |
isOpen() |
boolean |
isReadable() |
long |
lastModified() |
public ClassPathResource(java.lang.String name,
java.lang.Class<?> aClass)
public boolean isReadable()
isReadable in interface Resourcepublic java.net.URL getURL()
throws java.io.IOException
public java.net.URI getURI()
throws java.io.IOException
public java.io.File getFile()
throws java.io.IOException
public long contentLength()
throws java.io.IOException
contentLength in interface Resourcejava.io.IOExceptionpublic long lastModified()
throws java.io.IOException
lastModified in interface Resourcejava.io.IOExceptionpublic Resource createRelative(java.lang.String relativePath) throws java.io.IOException
createRelative in interface Resourcejava.io.IOExceptionpublic java.lang.String getFilename()
getFilename in interface Resourcepublic java.lang.String getDescription()
getDescription in interface Resourcepublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface InputStreamSourcejava.io.IOException