GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

io::File Class Reference

An abstract representation of a physical file. More...

Inheritance diagram for io::File:

Inheritance graph
[legend]
Collaboration diagram for io::File:

Collaboration graph
[legend]
List of all members.

Public Methods

boolean equals (Object object)
 Tests this File for equality with the passed Object.

URI getURI ()
 This method returns the URI of this File.

abstract void copy (URI loc) throws IOException, RemoteException
 This method copies the physical file represented by this File instance to a physical file identified by the passed URI.

void move (URI location) throws IOException
 This method moves the physical file represented by this File instance to a physical file identified by the passed URI.


Static Public Methods

File create (GATContext gatContext, URI location)
 Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.

File create (GATContext gatContext, Preferences preferences, URI location)
 Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.


Protected Methods

 File (GATContext gatContext, Preferences preferences, URI location)
 Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.


Protected Attributes

URI location
GATContext gatContext
Preferences preferences

Detailed Description

An abstract representation of a physical file.

An instance of this class presents an abstract, system-independent view of a physical file. User interfaces and operating systems use system-dependent pathname strings to identify physical files. GAT, however, uses an operating system independent pathname string to identify a physical file. A physical file in GAT is identified by a URI.

An instance of this File class allows for various high-level operations to be preformed on a physical file. For example, one can, with a single API call, copy a physical file from one location to a second location, move a physical file from one location to a second location, delete a physical file, and preform various other operations on a physical file. The utility of this high-level view of a physical file is multi-fold. The client of an instance of this class does not have to concern themselves with the details of reading every single byte of a physical file when all they wish to do is copy the physical file to a new location. Similarly, a client does not have to deal with all the various error states that can occur when moving a physical file ( Have all the various bytes been read correctly? Have all the various bytes been saved correctly? Did the deletion of the original file proceed correctly? ); the client simply has to call a single API call and the physical file is moved.

Definition at line 38 of file File.java.


Constructor & Destructor Documentation

io::File::File GATContext    gatContext,
Preferences    preferences,
URI    location
[inline, protected]
 

Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.

Parameters:
location  A URI which represents the URI corresponding to the physical file.
gatContext  A GATContext which is used to determine the access rights for this File.
preferences  A Preferences which is used to determine the user's preferences for this File.
Exceptions:
java  .lang.Exception Thrown upon creation problems

Definition at line 61 of file File.java.

References io::File::gatContext, io::File::location, and io::File::preferences.


Member Function Documentation

File io::File::create GATContext    gatContext,
URI    location
[inline, static]
 

Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.

Parameters:
location  A URI which represents the URI corresponding to the physical file.
gatContext  A GATContext which is used to determine the access rights for this File.
Exceptions:
java  .lang.Exception Thrown upon creation problems

Definition at line 83 of file File.java.

References io::File::gatContext, and io::File::location.

File io::File::create GATContext    gatContext,
Preferences    preferences,
URI    location
[inline, static]
 

Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.

Parameters:
location  A URI which represents the URI corresponding to the physical file.
gatContext  A GATContext which is used to determine the access rights for this File.
preferences  A Preferences which is used to determine the user's preferences for this File.
Exceptions:
java  .lang.Exception Thrown upon creation problems

Definition at line 104 of file File.java.

References io::File::gatContext, io::File::location, and io::File::preferences.

boolean io::File::equals Object    object [inline]
 

Tests this File for equality with the passed Object.

If the given object is not a File, then this method immediately returns false.

If the given object is a File, then it is deemed equal to this instance if a URI object constructed from this File's location and a URI object constructed from the passed File's URI are equal as determined by the Equals method of URI.

Parameters:
object  The Object to test for equality
Returns:
A boolean indicating equality

Definition at line 139 of file File.java.

References io::File::location.

Referenced by io::RandomAccessFile::equals().

URI io::File::getURI   [inline]
 

This method returns the URI of this File.

Returns:
The URI of this File

Definition at line 151 of file File.java.

References io::File::location.

abstract void io::File::copy URI    loc throws IOException, RemoteException [pure virtual]
 

This method copies the physical file represented by this File instance to a physical file identified by the passed URI.

Parameters:
loc  The new location
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance
java  .io.IOException Upon non-remote IO problem

Referenced by io::File::move().

void io::File::move URI    location throws IOException [inline]
 

This method moves the physical file represented by this File instance to a physical file identified by the passed URI.

Parameters:
location  The URI to which to move the physical file corresponding to this File instance
Exceptions:
java  .rmi.RemoteException Thrown upon problems accessing the remote instance
java  .io.IOException Upon non-remote IO problem

Definition at line 180 of file File.java.

References io::File::copy(), and io::File::location.


Member Data Documentation

URI io::File::location [protected]
 

Definition at line 40 of file File.java.

Referenced by io::File::create(), io::File::equals(), io::File::File(), cpi::FileCpi::FileCpi(), io::File::getURI(), and io::File::move().

GATContext io::File::gatContext [protected]
 

Definition at line 41 of file File.java.

Referenced by io::File::create(), io::File::File(), and cpi::FileCpi::FileCpi().

Preferences io::File::preferences [protected]
 

Definition at line 42 of file File.java.

Referenced by io::File::create(), io::File::File(), and cpi::FileCpi::FileCpi().


The documentation for this class was generated from the following file: