com.togethersoft.testing.host
Interface IResource


public interface IResource

Represents a resource in file system - directory or file


Method Summary
 booleandelete()
          Deletes this resource
 booleanexists()
          Returns true if this resource does exist
 StringgetFullName()
          Returns the full name of this resource
 InputStreamgetInputStream()
          Returns the resource's input stream
 URLgetLocation()
          Returns the URL of this resource
 OutputStreamgetOutputStream()
          Returns the resource's output stream
 StringgetShortName()
          Returns the short name of this resource
 booleanisDirectory()
          Returns true if this resource is a directory
 longlastModified()
          Retursn the timestamp of last modification of this resource
 voidsetShortName(String name)
          Sets the short name of this resource

Method Detail

delete

public boolean delete()
Deletes this resource

exists

public boolean exists()
Returns true if this resource does exist

getFullName

public String getFullName()
Returns the full name of this resource

getInputStream

public InputStream getInputStream()
throws java.io.IOException
Returns the resource's input stream

getLocation

public URL getLocation()
Returns the URL of this resource

getOutputStream

public OutputStream getOutputStream()
throws java.io.IOException
Returns the resource's output stream

getShortName

public String getShortName()
Returns the short name of this resource

isDirectory

public boolean isDirectory()
Returns true if this resource is a directory

lastModified

public long lastModified()
Retursn the timestamp of last modification of this resource

setShortName

public void setShortName(String name)
throws java.io.IOException
Sets the short name of this resource