Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.io.support
[Java] Class AbstractFileResolvingResource

    java.lang.Object
      org.codehaus.groovy.grails.io.support.AbstractFileResolvingResource

All Implemented Interfaces:
  Resource

    public abstract class AbstractFileResolvingResource
    extends java.lang.Object

Abstract base class for resources which resolve URLs into File references, such as `org.springframework.core.io.UrlResource` or `org.springframework.core.io.ClassPathResource`.

Detects the "file" protocol as well as the JBoss "vfs" protocol in URLs, resolving file system references accordingly.

Authors:
  Juergen Hoeller

Since:
  3.0

Method Summary
`long` | `contentLength()`
`boolean` | `exists()`
`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()`
`long` | `lastModified()`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Method Detail

### contentLength

    public long contentLength()

### exists

    public boolean exists()

### getFile

    public 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.

### getFile

    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.

### getFileForLastModifiedCheck

    protected java.io.File getFileForLastModifiedCheck()

  This implementation determines the underlying File (or jar file, in case of a resource in a jar/zip).

### isReadable

    public boolean isReadable()

### lastModified

    public long lastModified()

Groovy Documentation