FileOutputStream.FileOutputStream
Class Overview | Class Members |
This Package |
All Packages
public FileOutputStream( String name ) throws IOException
Parameters
- name
- the system-dependent filename.
Description
Creates an output file stream to write to the file with the
specified name.
Exceptions
IOException
if the file could not be opened for writing.
Exceptions
SecurityException
if a security manager exists, its
checkWrite method is called with the name
argument to see if the application is allowed write access
to the file.
See Also
checkWrite
public FileOutputStream( String name,
boolean append ) throws IOException
Parameters
- name
- the system dependent file name
Description
Creates an output file with the specified system dependent
file name.
Exceptions
IOException
If the file is not found.
public FileOutputStream( File file ) throws IOException
Parameters
- file
- the file to be opened for writing.
Description
Creates a file output stream to write to the specified
File object.
Exceptions
IOException
if the file could not be opened for
writing.
Exceptions
SecurityException
if a security manager exists, its
checkWrite method is called with the pathname
of the File argument to see if the
application is allowed write access to the file. This may
result in a security exception.
See Also
getPath, SecurityException, checkWrite
public FileOutputStream( FileDescriptor fdObj )
Parameters
- fdObj
- the file descriptor to be opened for writing.
Description
Creates an output file stream to write to the specified file descriptor.
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.
See Also
checkWrite