FutureFileResource (Selenium RC Server (Coreless) 1.0.1 API)
Date: 2009-06-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openqa.selenium.server
Class FutureFileResource

    java.lang.Object
      org.mortbay.util.Resource
          org.mortbay.util.URLResource
              org.openqa.selenium.server.FutureFileResource

All Implemented Interfaces:
  java.io.Serializable

    public class FutureFileResource

extends org.mortbay.util.URLResource

Future File Resource. DGF This is as per the standard Jetty FileResource, but its constructor is private, so I've copied-and-pasted it rather than extending it. It's just like the regular FileResource, but it always claims its lastModified date is in the future, to prevent caching. Handle resources of implied or explicit file type. This class can check for aliasing in the filesystem (eg case insensitivity). By default this is turned on if the platform does not have the "/" path separator, or it can be controlled with the "org.mortbay.util.FileResource.checkAliases" system parameter. If alias checking is turned on, then aliased resources are treated as if they do not exist, nor can they be created.

Version:
  $Revision: 1.31 $
Author:
  Greg Wilkins (gregw)
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.mortbay.util.URLResource
`_connection, _in, _url, _urlString`

Constructor Summary
`FutureFileResource(java.net.URL url)`
`FutureFileResource(java.net.URL url, java.net.URLConnection connection, java.io.File file)`

Method Summary
`org.mortbay.util.Resource` | `addPath(java.lang.String path)`
`boolean` | `delete()` Deletes the given resource
`java.lang.String` | `encode(java.lang.String uri)` Encode according to this resource type.
`boolean` | `equals(java.lang.Object o)`
`boolean` | `exists()` Returns true if the resource exists.
`java.net.URL` | `getAlias()`
`static boolean` | `getCheckAliases()` getCheckAliases.
`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
`int` | `hashCode()`
`boolean` | `isDirectory()` Returns true if the respresenetd resource is a container/directory.
`long` | `lastModified()` Returns the lastModified time, which is always in the distant future to prevent caching.
`long` | `length()` Return the length of the resource
`java.lang.String[]` | `list()` Returns a list of resources contained in the given resource
`boolean` | `renameTo(org.mortbay.util.Resource dest)` Rename the given resource
`static void` | `setCheckAliases(boolean checkAliases)` setCheckAliases.

Methods inherited from class org.mortbay.util.URLResource
`checkConnection, getURL, release, toString`

Methods inherited from class org.mortbay.util.Resource
`cache, finalize, getAssociate, getListHTML, newResource, newResource, newSystemResource, setAssociate, writeTo`

Methods inherited from class java.lang.Object
`clone, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FutureFileResource

    public FutureFileResource(java.net.URL url)
                       throws java.io.IOException

Throws:
  `java.io.IOException`

### FutureFileResource

    public FutureFileResource(java.net.URL url,
                              java.net.URLConnection connection,
                              java.io.File file)

Method Detail

### setCheckAliases

    public static void setCheckAliases(boolean checkAliases)

  setCheckAliases.

  Parameters:
    `checkAliases` - True of resource aliases are to be checked for (eg case insensitivity or 8.3 short names) and treated as not found.

### getCheckAliases

    public static boolean getCheckAliases()

  getCheckAliases.

  Returns:
    True of resource aliases are to be checked for (eg case insensitivity or 8.3 short names) and treated as not found.

### addPath

    public org.mortbay.util.Resource addPath(java.lang.String path)
                                      throws java.io.IOException,
                                             java.net.MalformedURLException

  Overrides:
    `addPath` in class `org.mortbay.util.URLResource`
  Throws:
    `java.io.IOException`
    `java.net.MalformedURLException`

### getAlias

    public java.net.URL getAlias()

  Overrides:
    `getAlias` in class `org.mortbay.util.Resource`

### exists

    public boolean exists()

  Returns true if the resource exists.

  Overrides:
    `exists` in class `org.mortbay.util.URLResource`

### lastModified

    public long lastModified()

  Returns the lastModified time, which is always in the distant future to prevent caching.

  Overrides:
    `lastModified` in class `org.mortbay.util.URLResource`

### isDirectory

    public boolean isDirectory()

  Returns true if the respresenetd resource is a container/directory.

  Overrides:
    `isDirectory` in class `org.mortbay.util.URLResource`

### length

    public long length()

  Return the length of the resource

  Overrides:
    `length` in class `org.mortbay.util.URLResource`

### getName

    public java.lang.String getName()

  Returns the name of the resource

  Overrides:
    `getName` in class `org.mortbay.util.URLResource`

### getFile

    public java.io.File getFile()

  Returns an File representing the given resource or NULL if this is not possible.

  Overrides:
    `getFile` in class `org.mortbay.util.URLResource`

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Returns an input stream to the resource

  Overrides:
    `getInputStream` in class `org.mortbay.util.URLResource`
  Throws:
    `java.io.IOException`

### getOutputStream

    public java.io.OutputStream getOutputStream()
                                         throws java.io.IOException,
                                                java.lang.SecurityException

  Returns an output stream to the resource

  Overrides:
    `getOutputStream` in class `org.mortbay.util.URLResource`
  Throws:
    `java.io.IOException`
    `java.lang.SecurityException`

### delete

    public boolean delete()
                   throws java.lang.SecurityException

  Deletes the given resource

  Overrides:
    `delete` in class `org.mortbay.util.URLResource`
  Throws:
    `java.lang.SecurityException`

### renameTo

    public boolean renameTo(org.mortbay.util.Resource dest)
                     throws java.lang.SecurityException

  Rename the given resource

  Overrides:
    `renameTo` in class `org.mortbay.util.URLResource`
  Throws:
    `java.lang.SecurityException`

### list

    public java.lang.String[] list()

  Returns a list of resources contained in the given resource

  Overrides:
    `list` in class `org.mortbay.util.URLResource`

### encode

    public java.lang.String encode(java.lang.String uri)

  Encode according to this resource type. File URIs are encoded.

  Overrides:
    `encode` in class `org.mortbay.util.Resource`
  Parameters:
    `uri` - URI to encode.
  Returns:
    The uri unchanged.

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `org.mortbay.util.URLResource`
  Parameters:
    `o` -
  Returns:

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `org.mortbay.util.URLResource`
  Returns:
    the hashcode.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.