Package generic.jar
Class FileResource
- java.lang.Object
-
- generic.jar.FileResource
-
-
Constructor Summary
Constructors Constructor Description FileResource(java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canWrite()
boolean
delete()
boolean
equals(java.lang.Object obj)
boolean
exists()
java.lang.String
getAbsolutePath()
java.lang.String
getCanonicalPath()
Resource
getCanonicalResource()
java.io.File
getFile()
java.io.File
getFileSystemRoot()
java.io.InputStream
getInputStream()
java.lang.String
getName()
java.io.OutputStream
getOutputStream()
FileResource
getParent()
Resource
getResource(java.lang.String childPath)
java.io.File
getResourceAsFile(ResourceFile resourceFile)
int
hashCode()
boolean
isDirectory()
boolean
isFile()
long
lastModified()
long
length()
ResourceFile[]
listFiles()
ResourceFile[]
listFiles(ResourceFileFilter filter)
boolean
mkdir()
java.lang.String
toString()
java.net.URI
toURI()
java.net.URL
toURL()
-
-
-
Method Detail
-
getResource
public Resource getResource(java.lang.String childPath)
- Specified by:
getResource
in interfaceResource
-
getAbsolutePath
public java.lang.String getAbsolutePath()
- Specified by:
getAbsolutePath
in interfaceResource
-
listFiles
public ResourceFile[] listFiles()
-
listFiles
public ResourceFile[] listFiles(ResourceFileFilter filter)
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory
in interfaceResource
-
toURL
public java.net.URL toURL() throws java.net.MalformedURLException
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.FileNotFoundException
- Specified by:
getInputStream
in interfaceResource
- Throws:
java.io.FileNotFoundException
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.FileNotFoundException
- Specified by:
getOutputStream
in interfaceResource
- Throws:
java.io.FileNotFoundException
-
getParent
public FileResource getParent()
-
lastModified
public long lastModified()
- Specified by:
lastModified
in interfaceResource
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getResourceAsFile
public java.io.File getResourceAsFile(ResourceFile resourceFile)
- Specified by:
getResourceAsFile
in interfaceResource
-
getCanonicalPath
public java.lang.String getCanonicalPath() throws java.io.IOException
- Specified by:
getCanonicalPath
in interfaceResource
- Throws:
java.io.IOException
-
getCanonicalResource
public Resource getCanonicalResource()
- Specified by:
getCanonicalResource
in interfaceResource
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getFileSystemRoot
public java.io.File getFileSystemRoot()
- Specified by:
getFileSystemRoot
in interfaceResource
-
-