java::io::FileOutputStream Class Reference

Inheritance diagram for java::io::FileOutputStream:

Inheritance graph
java::lang::Objectjava::lang::Interfacejava::io::OutputStream
[legend]
Collaboration diagram for java::io::FileOutputStream:

Collaboration graph
java::lang::Objectjava::lang::Interfacejava::lang::ObjectRefjava::io::OutputStreamjava::lang::Comparable
[legend]

List of all members.


Detailed Description

A file output stream is an output stream for writing data to a File or to a FileDescriptor.

Author:
Arthur van Hoff
Version:
1.27, 07/01/98
Since:
JDK1.0

Public Member Functions

 FileOutputStream (const FileDescriptor &fd=FileDescriptor())
 Creates an output file stream to write to the specified file descriptor.
 FileOutputStream (const String &name, jboolean append=false)
 Creates an output file with the specified system dependent file name.
 FileOutputStream (const File &file, jboolean append=false)
 Creates an output file with the specified system dependent file name.
virtual void write (jint b)
 Writes the specified byte to this file output stream.
virtual void write (const Array< jbyte > &b, jint off=0, jint len=-1)
 Writes len bytes from the specified byte array starting at offset off to this file output stream.
virtual void flush ()
 Flushes this output stream and forces any buffered output bytes to be written out to the stream.
virtual void close ()
 Closes this file output stream and releases any system resources associated with this stream.
FileDescriptor getFD ()
 Returns the file descriptor associated with this stream.

Constructor & Destructor Documentation

java::io::FileOutputStream::FileOutputStream ( const FileDescriptor fd = FileDescriptor()  ) 

Creates an output file stream to write to the specified file descriptor.

Parameters:
fdObj the file descriptor to be opened for writing.
Exceptions:
SecurityException if a security manager exists, its checkWrite method is called with the file descriptor to see if the application is allowed to write to the specified file descriptor.
Since:
JDK1.0

java::io::FileOutputStream::FileOutputStream ( const String name,
jboolean  append = false 
)

Creates an output file with the specified system dependent file name.

Parameters:
name the system dependent file name
Exceptions:
IOException If the file is not found.
Since:
JDK1.1

java::io::FileOutputStream::FileOutputStream ( const File file,
jboolean  append = false 
)

Creates an output file with the specified system dependent file name.

Parameters:
file the file to be opended for writing.
Exceptions:
IOException If the file is not found.
Since:
JDK1.1


Member Function Documentation

virtual void java::io::FileOutputStream::write ( jint  b  )  [virtual]

Writes the specified byte to this file output stream.

Parameters:
b the byte to be written.
Exceptions:
IOException if an I/O error occurs.
Since:
JDK1.0

Implements java::io::OutputStream.

virtual void java::io::FileOutputStream::write ( const Array< jbyte > &  b,
jint  off = 0,
jint  len = -1 
) [virtual]

Writes len bytes from the specified byte array starting at offset off to this file output stream.

Parameters:
b the data.
off the start offset in the data.
len the number of bytes to write.
Exceptions:
IOException if an I/O error occurs.
Since:
JDK1.0

Implements java::io::OutputStream.

virtual void java::io::FileOutputStream::flush (  )  [virtual]

Flushes this output stream and forces any buffered output bytes to be written out to the stream.

The flush method of FileOutputStream calls the flush method of its underlying output stream.

Exceptions:
IOException if an I/O error occurs.

Reimplemented from java::io::OutputStream.

virtual void java::io::FileOutputStream::close (  )  [virtual]

Closes this file output stream and releases any system resources associated with this stream.

Exceptions:
IOException if an I/O error occurs.
Since:
JDK1.0

Reimplemented from java::io::OutputStream.

FileDescriptor java::io::FileOutputStream::getFD (  ) 

Returns the file descriptor associated with this stream.

Returns:
the file descriptor object associated with this stream.
Exceptions:
IOException if an I/O error occurs.
See also:
java.io.FileDescriptor
Since:
JDK1.0


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:30 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3