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

A FileStream represents a connection to open file, the file may be either remote or local. More...

Inheritance diagram for io::FileOutputStream:

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

Collaboration graph
[legend]
List of all members.

Public Methods

FileOutputStream create (GATContext gatContext, File file) throws IOException
 This creates a FileStream attached to the physical file at the specified Location.

FileOutputStream create (GATContext gatContext, Preferences preferences, File file) throws IOException
 This creates a FileStream attached to the physical file at the specified Location.


Protected Methods

 FileOutputStream (GATContext gatContext, Preferences preferences, File file) throws IOException
 This creates a FileStream attached to the physical file at the specified Location.


Protected Attributes

GATContext gatContext
Preferences preferences
File file

Detailed Description

A FileStream represents a connection to open file, the file may be either remote or local.

A FileStream represents a seekable connection to a file and has semantics similar to a standard Unix filedescriptor. It provides methods to query the current position in the file and to seek to new positions.

To Write data to a FileStream it is necessary to construct a Buffer and pack it with data. Similarly, to read data a buffer must be created to store the read data. Writes and reads may either be blocking, or asynchronous. Asynchronous writes or reads must be completed by appropriate call.

Definition at line 25 of file FileOutputStream.java.


Constructor & Destructor Documentation

io::FileOutputStream::FileOutputStream GATContext    gatContext,
Preferences    preferences,
File    file
throws IOException [inline, protected]
 

This creates a FileStream attached to the physical file at the specified Location.

The file may be opened in several modes:

  • FileStream.READ --- Open file for reading. The stream is positioned at the beginning of the file.
  • FileStream.WRITE --- Truncate file to zero length or create file for writing. The stream is positioned at the beginning of the file.
  • FileStream.READWRITE --- Open for reading and writing. The stream is positioned at the beginning of the file.
  • FileStream.APPEND --- Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file.
Parameters:
gatContext  The GATContext used to broker resources
preferences  The Preferences for this instance
location  The Location of the file to open.
mode  The mode to open it --- READ, WRITE, READWRITE, or APPEND, member variables of this class
Exceptions:
java  .lang.Exception Thrown upon creation error of some sort

Definition at line 57 of file FileOutputStream.java.

References io::FileOutputStream::gatContext, and io::FileOutputStream::preferences.


Member Function Documentation

FileOutputStream io::FileOutputStream::create GATContext    gatContext,
File    file
throws IOException [inline]
 

This creates a FileStream attached to the physical file at the specified Location.

The file may be opened in several modes:

  • FileStream.READ --- Open file for reading. The stream is positioned at the beginning of the file.
  • FileStream.WRITE --- Truncate file to zero length or create file for writing. The stream is positioned at the beginning of the file.
  • FileStream.READWRITE --- Open for reading and writing. The stream is positioned at the beginning of the file.
  • FileStream.APPEND --- Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file.
Parameters:
gatContext  The GATContext used to broker resources
location  The Location of the file to open.
mode  The mode to open it --- READ, WRITE, READWRITE, or APPEND, member variables of this class
Exceptions:
java  .lang.Exception Thrown upon creation error of some sort

Definition at line 89 of file FileOutputStream.java.

References io::FileOutputStream::gatContext.

FileOutputStream io::FileOutputStream::create GATContext    gatContext,
Preferences    preferences,
File    file
throws IOException [inline]
 

This creates a FileStream attached to the physical file at the specified Location.

The file may be opened in several modes:

  • FileStream.READ --- Open file for reading. The stream is positioned at the beginning of the file.
  • FileStream.WRITE --- Truncate file to zero length or create file for writing. The stream is positioned at the beginning of the file.
  • FileStream.READWRITE --- Open for reading and writing. The stream is positioned at the beginning of the file.
  • FileStream.APPEND --- Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file.
Parameters:
gatContext  The GATContext used to broker resources
preferences  The Preferences for this instance
location  The Location of the file to open.
mode  The mode to open it --- READ, WRITE, READWRITE, or APPEND, member variables of this class
Exceptions:
java  .lang.Exception Thrown upon creation error of some sort

Definition at line 121 of file FileOutputStream.java.

References io::FileOutputStream::gatContext, and io::FileOutputStream::preferences.


Member Data Documentation

GATContext io::FileOutputStream::gatContext [protected]
 

Definition at line 26 of file FileOutputStream.java.

Referenced by io::FileOutputStream::create(), io::FileOutputStream::FileOutputStream(), and cpi::FileOutputStreamCpi::FileOutputStreamCpi().

Preferences io::FileOutputStream::preferences [protected]
 

Definition at line 27 of file FileOutputStream.java.

Referenced by io::FileOutputStream::create(), io::FileOutputStream::FileOutputStream(), and cpi::FileOutputStreamCpi::FileOutputStreamCpi().

File io::FileOutputStream::file [protected]
 

Definition at line 28 of file FileOutputStream.java.

Referenced by cpi::FileOutputStreamCpi::FileOutputStreamCpi().


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