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::RandomAccessFile Class Reference

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

Inheritance diagram for io::RandomAccessFile:

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

Collaboration graph
[legend]
List of all members.

Public Methods

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


Static Public Methods

RandomAccessFile create (GATContext gatContext, File file, String mode) throws FileNotFoundException
 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.

RandomAccessFile create (GATContext gatContext, Preferences preferences, File file, String mode) throws FileNotFoundException
 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

 RandomAccessFile (GATContext gatContext, Preferences preferences, File file, String mode) throws FileNotFoundException
 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

File file
String mode
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 35 of file RandomAccessFile.java.


Constructor & Destructor Documentation

io::RandomAccessFile::RandomAccessFile GATContext    gatContext,
Preferences    preferences,
File    file,
String    mode
throws FileNotFoundException [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 63 of file RandomAccessFile.java.

References io::RandomAccessFile::gatContext, io::RandomAccessFile::mode, and io::RandomAccessFile::preferences.


Member Function Documentation

RandomAccessFile io::RandomAccessFile::create GATContext    gatContext,
File    file,
String    mode
throws FileNotFoundException [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 86 of file RandomAccessFile.java.

References io::RandomAccessFile::gatContext, and io::RandomAccessFile::mode.

RandomAccessFile io::RandomAccessFile::create GATContext    gatContext,
Preferences    preferences,
File    file,
String    mode
throws FileNotFoundException [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 108 of file RandomAccessFile.java.

References io::RandomAccessFile::gatContext, io::RandomAccessFile::mode, and io::RandomAccessFile::preferences.

boolean io::RandomAccessFile::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 135 of file RandomAccessFile.java.

References io::File::equals().


Member Data Documentation

File io::RandomAccessFile::file [protected]
 

Definition at line 38 of file RandomAccessFile.java.

Referenced by cpi::RandomAccessFileCpi::RandomAccessFileCpi().

String io::RandomAccessFile::mode [protected]
 

Definition at line 40 of file RandomAccessFile.java.

Referenced by io::RandomAccessFile::create(), io::RandomAccessFile::RandomAccessFile(), and cpi::RandomAccessFileCpi::RandomAccessFileCpi().

GATContext io::RandomAccessFile::gatContext [protected]
 

Definition at line 42 of file RandomAccessFile.java.

Referenced by io::RandomAccessFile::create(), io::RandomAccessFile::RandomAccessFile(), and cpi::RandomAccessFileCpi::RandomAccessFileCpi().

Preferences io::RandomAccessFile::preferences [protected]
 

Definition at line 44 of file RandomAccessFile.java.

Referenced by io::RandomAccessFile::create(), io::RandomAccessFile::RandomAccessFile(), and cpi::RandomAccessFileCpi::RandomAccessFileCpi().


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