Writing Files

The java.io.FileOutputStream class represents an OutputStream that writes bytes to a file. It has the following public methods:

 public FileOutputStream(String name) throws IOException
 public FileOutputStream(String name, boolean append) throws IOException
 public FileOutputStream(File file) throws IOException
 public FileOutputStream(FileDescriptor fdObj)
 public native void write(int b) throws IOException
 public void write(byte[] data) throws IOException
 public void write(byte[] data, int offset, int length) throws IOException
 public native void close() throws IOException
 public final FileDescriptor getFD() throws IOException


Previous | Next | Top | Cafe con Leche

Copyright 2000 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified January 28, 2000