|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.io.support.FileSystemResource
public class FileSystemResource extends java.lang.Object
Based on Spring FileSystemResource implementation.
Constructor Summary | |
FileSystemResource(java.io.File file)
Create a new FileSystemResource from a File handle. |
|
FileSystemResource(java.lang.String path)
Create a new FileSystemResource from a file path. |
Method Summary | |
---|---|
protected void
|
assertNotNull(java.lang.Object object, java.lang.String message)
|
long
|
contentLength()
This implementation returns the underlying File's length. |
Resource
|
createRelative(java.lang.String relativePath)
This implementation creates a FileSystemResource, applying the given path relative to the path of the underlying file of this resource descriptor. |
boolean
|
equals(java.lang.Object obj)
This implementation compares the underlying File references. |
boolean
|
exists()
This implementation returns whether the underlying file exists. |
java.lang.String
|
getDescription()
This implementation returns a description that includes the absolute path of the file. |
java.io.File
|
getFile()
This implementation returns the underlying File reference. |
java.lang.String
|
getFilename()
This implementation returns the name of the file. |
java.io.InputStream
|
getInputStream()
This implementation opens a FileInputStream for the underlying file. |
java.io.OutputStream
|
getOutputStream()
This implementation opens a FileOutputStream for the underlying file. |
java.lang.String
|
getPath()
Return the file path for this resource. |
java.net.URI
|
getURI()
This implementation returns a URI for the underlying file. |
java.net.URL
|
getURL()
This implementation returns a URL for the underlying file. |
int
|
hashCode()
This implementation returns the hash code of the underlying File reference. |
boolean
|
isReadable()
This implementation checks whether the underlying file is marked as readable (and corresponds to an actual file with content, not to a directory). |
boolean
|
isWritable()
This implementation checks whether the underlying file is marked as writable (and corresponds to an actual file with content, not to a directory). |
long
|
lastModified()
|
java.lang.String
|
toString()
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Constructor Detail |
---|
public FileSystemResource(java.io.File file)
file
- a File handle
public FileSystemResource(java.lang.String path)
path
- a file path
Method Detail |
---|
protected void assertNotNull(java.lang.Object object, java.lang.String message)
public long contentLength()
public Resource createRelative(java.lang.String relativePath)
public boolean equals(Object obj) { public boolean equals(java.lang.Object obj)
public boolean exists()
public java.lang.String getDescription()
public java.io.File getFile()
public java.lang.String getFilename()
public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
public final java.lang.String getPath()
public java.net.URI getURI()
public java.net.URL getURL()
public int hashCode() { public int hashCode()
public boolean isReadable()
public boolean isWritable()
public long lastModified()
public String toString() { public java.lang.String toString()
Groovy Documentation