|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.helma.repository.FileResource
public class FileResource
| Constructor Summary | |
|---|---|
|
FileResource(java.io.File file)
|
protected |
FileResource(java.io.File file,
Repository repository)
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
boolean |
exists()
Checks wether this resource actually (still) exists |
java.lang.String |
getBaseName()
Returns the short name of the resource with the file extension (everything following the last dot character) cut off. |
java.lang.String |
getContent()
Returns the content of the resource |
java.lang.String |
getContent(java.lang.String encoding)
Returns the content of the resource in a given encoding |
java.io.InputStream |
getInputStream()
Returns an input stream to the content of the resource |
long |
getLength()
Returns the lengh of the resource's content |
java.lang.String |
getName()
Returns the name of the resource; does not include the name of the repository the resource was fetched from |
java.io.Reader |
getReader()
Returns a reader for the resource |
Repository |
getRepository()
Returns the repository the resource does belong to |
java.lang.String |
getShortName()
Returns the short name of the resource which is its name exclusive file ending if it exists |
java.net.URL |
getUrl()
Returns an url to the resource if the repository of this resource is able to provide urls |
int |
hashCode()
|
long |
lastModified()
Returns the date the resource was last modified |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileResource(java.io.File file)
protected FileResource(java.io.File file,
Repository repository)
| Method Detail |
|---|
public java.lang.String getName()
Resource
getName in interface Resourcepublic java.lang.String getShortName()
Resource
getShortName in interface Resourcepublic java.lang.String getBaseName()
Resource
getBaseName in interface Resource
public java.io.InputStream getInputStream()
throws java.io.IOException
Resource
getInputStream in interface Resourcejava.io.IOException - if a I/O related error occurs
public java.io.Reader getReader()
throws java.io.IOException
Resource
getReader in interface Resourcejava.io.IOException - if a I/O related error occurspublic java.net.URL getUrl()
Resource
getUrl in interface Resourcepublic long lastModified()
Resource
lastModified in interface Resource
public java.lang.String getContent(java.lang.String encoding)
throws java.io.IOException
Resource
getContent in interface Resourcejava.io.IOException
public java.lang.String getContent()
throws java.io.IOException
Resource
getContent in interface Resourcejava.io.IOExceptionpublic long getLength()
Resource
getLength in interface Resourcepublic boolean exists()
Resource
exists in interface Resourcepublic Repository getRepository()
Resource
getRepository in interface Resourcepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||