22.16
java.io.FileOutputStream
THE PACKAGE JAVA.IO
22.16 The Class
java.io.FileOutputStream
A file output stream writes output bytes to a file in a file system. What files are
available or may be created depends on the host environment.
public class FileOutputStream extends OutputStream {
public FileOutputStream(String path)
throws SecurityException, FileNotFoundException;
public FileOutputStream(File file)
throws SecurityException, FileNotFoundException;
public FileOutputStream(FileDescriptor fdObj)
throws SecurityException;
public final FileDescriptor getFD() throws IOException;
public void write(int b) throws IOException;
public void write(byte[] b)
throws IOException, NullPointerException;
public void write(byte[] b, int off, int len)
throws IOException, NullPointerException,
IndexOutOfBoundsException;
public void close() throws IOException;
protected void finalize() throws IOException;
}
22.16.1
public FileOutputStream(String path)
throws SecurityException, FileNotFoundException
This constructor initializes a newly created
FileOutputStream
 by opening a
connection to an actual file, the file named by the path name
path
 in the file sys 
tem. A new
FileDescriptor
 object is created to represent this file connection.
First, if there is a security manager, its
checkWrite
 method ( 20.17.21) is
called with the
path
 argument as its argument.
If the actual file cannot be opened, a
FileNotFoundException
 is thrown.
22.16.2
public FileOutputStream(File file)
throws SecurityException, FileNotFoundException
This constructor initializes a newly created
FileOutputStream
 by opening a
connection to an actual file, the file named by
file
 in the file system. A new
FileDescriptor
 object is created to represent this file connection.
First, if there is a security manager, its
checkWrite
 method ( 20.17.21) is
called with the path represented by the
file
 argument as its argument.
If the actual file cannot be opened, a
FileNotFoundException
 is thrown.
722






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved