org.mortbay.util
public class URLResource extends Resource
Version: $Id: URLResource.java,v 1.9 2005/08/13 00:01:28 gregwilkins Exp $
| Field Summary | |
|---|---|
| protected URLConnection | _connection |
| protected InputStream | _in |
| protected URL | _url |
| protected String | _urlString |
| Constructor Summary | |
|---|---|
| protected | URLResource(URL url, URLConnection connection) |
| Method Summary | |
|---|---|
| Resource | addPath(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(Object o) |
| boolean | exists()
Returns true if the respresened resource exists. |
| File | getFile()
Returns an File representing the given resource or NULL if this
is not possible. |
| InputStream | getInputStream()
Returns an input stream to the resource |
| String | getName()
Returns the name of the resource |
| OutputStream | getOutputStream()
Returns an output stream to the resource |
| 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 |
| 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 |
| String | toString() |