/[classpath]/classpath/java/io/FileOutputStream.java
ViewVC logotype

Diff of /classpath/java/io/FileOutputStream.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by mark, Tue Jan 22 22:26:59 2002 UTC revision 1.10 by rveldema, Mon Apr 8 10:14:49 2002 UTC
# Line 39  exception statement from your version. * Line 39  exception statement from your version. *
39  package java.io;  package java.io;
40    
41  import gnu.classpath.Configuration;  import gnu.classpath.Configuration;
42    import java.nio.channels.FileChannel;
43    import gnu.java.nio.FileChannelImpl;
44    
45  /**  /**
46    * This classes allows a stream of data to be written to a disk file or    * This classes allows a stream of data to be written to a disk file or
# Line 353  finalize() throws IOException Line 355  finalize() throws IOException
355    close();    close();
356  }  }
357    
358    /*************************************************************************/
359    
360    /**
361     *  This method creates a java.nio.channels.FileChannel.
362     * Nio does not allow one to create a file channel directly.
363     * A file channel must be created by first creating an instance of
364     * Input/Output/RandomAccessFile and invoking the getChannel() method on it.
365     */
366    
367    private FileChannel ch; /* cached associated file-channel */
368    
369    public FileChannel
370    getChannel()
371    {
372        synchronized (this)
373            {
374                if (ch == null)
375                    ch = new gnu.java.nio.FileChannelImpl(native_fd,
376                                                          this);
377            }
378        return ch;
379    }
380    
381    
382  } // class FileOutputStream  } // class FileOutputStream
383    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26