This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: java.lang.Process


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attached patch to merge java.lang.Process completely 
with classpath.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+eF+IWSOgCCdjSDsRAqaoAKCLf514pgB8wkL1EGL/SpPPdSOs0ACgimd3
ugGdoHoRN7dbrIWdetlXuv0=
=bxWD
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1789
diff -u -r1.1789 ChangeLog
--- ChangeLog	18 Mar 2003 18:16:53 -0000	1.1789
+++ ChangeLog	19 Mar 2003 12:13:24 -0000
@@ -1,3 +1,10 @@
+2003-03-19  Michael Koch  <konqueror at gmx dot de>
+
+	* java/io/FileOutputStream.java
+	(FileOutputStream): New constructor, merged from classpath.
+	* java/io/FileWriter.java
+	(FileWriter): New constructor, merged from classpath.
+
 2003-03-18  Michael Koch  <konqueror at gmx dot de>
 
 	* java/awt/ScrollPane.java
Index: java/io/FileOutputStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/FileOutputStream.java,v
retrieving revision 1.5
diff -u -r1.5 FileOutputStream.java
--- java/io/FileOutputStream.java	20 Nov 2002 16:19:05 -0000	1.5
+++ java/io/FileOutputStream.java	19 Mar 2003 12:13:24 -0000
@@ -47,6 +47,32 @@
     this (file.getPath(), false);
   }
 
+  /**
+   * This method initializes a <code>FileOutputStream</code> object to write
+   * to the specified <code>File</code> object.  The file is created if it 
+   * does not exist, and the bytes written are written starting at the 
+   * beginning of the file if the <code>append</code> parameter is 
+   * <code>false</code>.  Otherwise bytes are written at the end of the
+   * file.
+   * <p>
+   * Before opening a file, a security check is performed by calling the
+   * <code>checkWrite</code> method of the <code>SecurityManager</code> (if
+   * one exists) with the name of the file to be opened.  An exception is
+   * thrown if writing is not allowed. 
+   *
+   * @param file The <code>File</code> object this stream should write to
+   * @param append <code>true</code> to append bytes to the end of the file,
+   * or <code>false</code> to write bytes to the beginning
+   *
+   * @exception SecurityException If write access to the file is not allowed
+   * @exception FileNotFoundException If a non-security error occurs
+   */
+  public
+  FileOutputStream(File file, boolean append) throws FileNotFoundException
+  {
+    this(file.getPath(), append);
+  }
+
   public FileOutputStream (FileDescriptor fdObj)
     throws SecurityException
   {
Index: java/io/FileWriter.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/FileWriter.java,v
retrieving revision 1.6
diff -u -r1.6 FileWriter.java
--- java/io/FileWriter.java	18 Mar 2003 06:00:25 -0000	1.6
+++ java/io/FileWriter.java	19 Mar 2003 12:13:24 -0000
@@ -1,5 +1,5 @@
 /* FileWriter.java -- Convenience class for writing to files.
-   Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -73,6 +73,25 @@
   public FileWriter(File file) throws SecurityException, IOException
   {
     super(new FileOutputStream(file));
+  }
+
+  /*************************************************************************/
+
+  /**
+    * This method initializes a new <code>FileWriter</code> object to write
+    * to the specified <code>File</code> object.
+    *
+    * @param file The <code>File</code> object to write to.
+    * @param append <code>true</code> to start adding data at the end of the
+    *               file, <code>false</code> otherwise.
+    *
+    * @param SecurityException If writing to this file is forbidden by the
+    *                          <code>SecurityManager</code>.
+    * @param IOException If any other error occurs
+    */
+  public FileWriter(File file, boolean append) throws IOException
+  {
+    super(new FileOutputStream(file, append));
   }
 
   /*************************************************************************/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]