| 
Spring for Android | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.core.io.AbstractResource
org.springframework.core.io.AbstractFileResolvingResource
public abstract class AbstractFileResolvingResource
Abstract base class for resources which resolve URLs into File references, such as UrlResource or
 ClassPathResource.
 
 
Detects the "file" protocol, resolving file system references accordingly.
| Constructor Summary | |
|---|---|
AbstractFileResolvingResource()
 | 
|
| Method Summary | |
|---|---|
 long | 
contentLength()
This implementation checks the length of the underlying File, if available.  | 
 boolean | 
exists()
This implementation checks whether a File can be opened, falling back to whether an InputStream can be opened.  | 
 java.io.File | 
getFile()
This implementation returns a File reference for the underlying class path resource, provided that it refers to a file in the file system.  | 
protected  java.io.File | 
getFile(java.net.URI uri)
This implementation returns a File reference for the underlying class path resource, provided that it refers to a file in the file system.  | 
protected  java.io.File | 
getFileForLastModifiedCheck()
This implementation determines the underlying File (or jar file, in case of a resource in a jar/zip).  | 
 boolean | 
isReadable()
This implementation always returns true. | 
 long | 
lastModified()
This implementation checks the timestamp of the underlying File, if available.  | 
| Methods inherited from class org.springframework.core.io.AbstractResource | 
|---|
createRelative, equals, getFilename, getURI, getURL, hashCode, isOpen, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.springframework.core.io.Resource | 
|---|
getDescription | 
| Methods inherited from interface org.springframework.core.io.InputStreamSource | 
|---|
getInputStream | 
| Constructor Detail | 
|---|
public AbstractFileResolvingResource()
| Method Detail | 
|---|
public java.io.File getFile()
                     throws java.io.IOException
getFile in interface ResourcegetFile in class AbstractResourcejava.io.IOException - if the resource cannot be resolved as absolute
 file path, i.e. if the resource is not available in a file systemResourceUtils.getFile(java.net.URL, String)
protected java.io.File getFileForLastModifiedCheck()
                                            throws java.io.IOException
getFileForLastModifiedCheck in class AbstractResourcenull)
java.io.IOException - if the resource cannot be resolved as absolute
 file path, i.e. if the resource is not available in a file system
protected java.io.File getFile(java.net.URI uri)
                        throws java.io.IOException
java.io.IOExceptionResourceUtils.getFile(java.net.URI, String)public boolean exists()
AbstractResource
exists in interface Resourceexists in class AbstractResourcepublic boolean isReadable()
AbstractResourcetrue.
isReadable in interface ResourceisReadable in class AbstractResourceInputStreamSource.getInputStream()
public long contentLength()
                   throws java.io.IOException
AbstractResource
contentLength in interface ResourcecontentLength in class AbstractResourcejava.io.IOException - if the resource cannot be resolved
 (in the file system or as some other known physical resource type)AbstractResource.getFile()
public long lastModified()
                  throws java.io.IOException
AbstractResource
lastModified in interface ResourcelastModified in class AbstractResourcejava.io.IOException - if the resource cannot be resolved
 (in the file system or as some other known physical resource type)AbstractResource.getFileForLastModifiedCheck()
  | 
Spring for Android | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||