API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. FileOutputStream View Source
Author(s)
Arthur van Hoff
Since
JDK1.0
Version
1.58, 11/17/05
Serial
Hierarchy
 Object
      OutputStream
          FileOutputStream
Implements
Subclasses
Description
public class FileOutputStream
  A file output stream is an output stream for writing data to a File or to a FileDescriptor.
Constructors
public FileOutputStream (File file) throws FileNotFoundException
  Creates a file output stream to write to the file represented by the specified File object.
public FileOutputStream (File file, boolean append) throws FileNotFoundException
  Creates a file output stream to write to the file represented by the specified File object.
public FileOutputStream (FileDescriptor fdObj)
  Creates an output file stream to write to the specified file descriptor, which represents an existing connection to an actual file in the file system.
public FileOutputStream (String name) throws FileNotFoundException
  Creates an output file stream to write to the file with the specified name.
public FileOutputStream (String name, boolean append) throws FileNotFoundException
  Creates an output file stream to write to the file with the specified name.
Methods
Hide/Show inherited methods
public void close () throws IOException [Overrides OutputStream]
  Closes this file output stream and releases any system resources associated with this stream.
protected void finalize () throws IOException
  Cleans up the connection to the file, and ensures that the close method of this file output stream is called when there are no more references to this stream.
public void flush () throws IOException [Inherited From OutputStream]
  Flushes this output stream and forces any buffered output bytes to be written out.
public FileChannel getChannel ()
  Returns the unique FileChannel object associated with this file output stream.
publicfinal FileDescriptor getFD () throws IOException
  Returns the file descriptor associated with this stream.
public void write (byte[] b) throws IOException [Overrides OutputStream]
  Writes b.length bytes from the specified byte array to this file output stream.
public void write (byte[] b, int off, int len) throws IOException [Overrides OutputStream]
  Writes len bytes from the specified byte array starting at offset off to this file output stream.
publicnative void write (int b) throws IOException [Specified in OutputStream]
  Writes the specified byte to this file output stream.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar