|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openqa.jetty.util.Resource
org.openqa.jetty.util.URLResource
public class URLResource
Abstract resource class.
| Field Summary | |
|---|---|
protected java.net.URLConnection |
_connection
|
protected java.io.InputStream |
_in
|
protected java.net.URL |
_url
|
protected java.lang.String |
_urlString
|
| Constructor Summary | |
|---|---|
protected |
URLResource(java.net.URL url,
java.net.URLConnection connection)
|
| Method Summary | |
|---|---|
Resource |
addPath(java.lang.String path)
Returns the resource contained inside the current resource with the given name |
protected boolean |
checkConnection()
|
boolean |
delete()
Deletes the given resource |
boolean |
equals(java.lang.Object o)
|
boolean |
exists()
Returns true if the respresened resource exists. |
java.io.File |
getFile()
Returns an File representing the given resource or NULL if this is not possible. |
java.io.InputStream |
getInputStream()
Returns an input stream to the resource |
java.lang.String |
getName()
Returns the name of the resource |
java.io.OutputStream |
getOutputStream()
Returns an output stream to the resource |
java.net.URL |
getURL()
Returns an URL representing the given resource |
int |
hashCode()
|
boolean |
isDirectory()
Returns true if the respresenetd resource is a container/directory. |
long |
lastModified()
Returns the last modified time |
long |
length()
Return the length of the resource |
java.lang.String[] |
list()
Returns a list of resource names contained in the given resource |
void |
release()
Release any resources held by the resource. |
boolean |
renameTo(Resource dest)
Rename the given resource |
java.lang.String |
toString()
|
| Methods inherited from class org.openqa.jetty.util.Resource |
|---|
cache, encode, finalize, getAlias, getAssociate, getListHTML, newResource, newResource, newSystemResource, setAssociate, writeTo |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.net.URL _url
protected java.lang.String _urlString
protected transient java.net.URLConnection _connection
protected transient java.io.InputStream _in
| Constructor Detail |
|---|
protected URLResource(java.net.URL url,
java.net.URLConnection connection)
| Method Detail |
|---|
protected boolean checkConnection()
public void release()
release in class Resourcepublic boolean exists()
exists in class Resourcepublic boolean isDirectory()
isDirectory in class Resourcepublic long lastModified()
lastModified in class Resourcepublic long length()
length in class Resourcepublic java.net.URL getURL()
getURL in class Resource
public java.io.File getFile()
throws java.io.IOException
getFile in class Resourcejava.io.IOExceptionpublic java.lang.String getName()
getName in class Resource
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class Resourcejava.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException,
java.lang.SecurityException
getOutputStream in class Resourcejava.io.IOException
java.lang.SecurityException
public boolean delete()
throws java.lang.SecurityException
delete in class Resourcejava.lang.SecurityException
public boolean renameTo(Resource dest)
throws java.lang.SecurityException
renameTo in class Resourcejava.lang.SecurityExceptionpublic java.lang.String[] list()
list in class Resource
public Resource addPath(java.lang.String path)
throws java.io.IOException,
java.net.MalformedURLException
addPath in class Resourcepath - The path segment to add, which should be encoded by the
encode method.
java.io.IOException
java.net.MalformedURLExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||