Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members
io::FileOutputStream Class ReferenceA FileStream represents a connection to open file, the file may be either remote or local.
More...
Inheritance diagram for io::FileOutputStream:
[legend]Collaboration diagram for io::FileOutputStream:
[legend]List of all members.
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]
|
|
Preferences io::FileOutputStream::preferences [protected]
|
|
File io::FileOutputStream::file [protected]
|
|
The documentation for this class was generated from the following file:
|