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  

FileOutputStreamCpi.java

Go to the documentation of this file.
00001 package org.gridlab.gat.io.cpi;
00002 
00003 import java.io.IOException;
00004 
00005 import org.gridlab.gat.GATContext;
00006 import org.gridlab.gat.Preferences;
00007 import org.gridlab.gat.io.File;
00008 import org.gridlab.gat.io.FileOutputStream;
00009 import org.gridlab.gat.monitoring.Monitorable;
00010 
00011 /**
00012  * Capability provider interface to the FileStream class.
00013  * <p>
00014  * Capability provider wishing to provide the functionality of the FileStream
00015  * class must extend this class and implement all of the abstract methods in
00016  * this class. Each abstract method in this class mirrors the corresponding
00017  * method in this FileStream class and will be used to implement the
00018  * corresponding method in the FileStream class at runtime.
00019  */
00020 public abstract class FileOutputStreamCpi extends FileOutputStream implements Monitorable {
00021 
00022     /**
00023      * This creates a FileStreamCpi attached to the physical file at the
00024      * specified Location. The file may be opened in several modes:
00025      * <ul>
00026      * <li>FileStream.read --- Open file for reading. The stream is positioned
00027      * at the beginning of the file.</li>
00028      * <li>FileStream.write --- Truncate file to zero length or create file for
00029      * writing. The stream is positioned at the beginning of the file.</li>
00030      * <li>FileStream.readwrite --- Open for reading and writing. The stream is
00031      * positioned at the beginning of the file.</li>
00032      * <li>FileStream.append --- Open for appending (writing at end of file).
00033      * The file is created if it does not exist. The stream is positioned at the
00034      * end of the file.</li>
00035      * </ul>
00036      * 
00037      * @param gatContext
00038      *            The GATContext used to broker resources
00039      * @param location
00040      *            The Location of the file to open.
00041      * @param mode
00042      *            The mode to open it --- read, write, readwrite, or append,
00043      *            member variables of the FileStream class
00044      */
00045     protected FileOutputStreamCpi(GATContext gatContext, Preferences preferences,
00046             File file) throws IOException {
00047         super(gatContext, preferences, file);
00048     }
00049 }