[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath

Kaffe CVS cvs-commits at kaffe.org
Wed Dec 3 12:30:03 PST 2003


PatchSet 4184 
Date: 2003/12/03 20:26:03
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath

2003-12-03  Dalibor Topic <robilad at kaffe.org>

        * libraries/javalib/gnu/java/net/protocol/file/Connection.java:
        Resynced with GNU Classpath.

        2003-12-02  Michael Koch  <konqueror at gmx.de>

        * gnu/java/net/protocol/file/Connection.java: Reformated.
        (inputStream): Made an InputStream.
        (outputStream): Made an OutputStream.

Members: 
	ChangeLog:1.1775->1.1776 
	libltdl/config-h.in:1.8->1.9 
	libraries/javalib/gnu/java/net/protocol/file/Connection.java:1.2->1.3 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1775 kaffe/ChangeLog:1.1776
--- kaffe/ChangeLog:1.1775	Wed Dec  3 20:19:23 2003
+++ kaffe/ChangeLog	Wed Dec  3 20:26:03 2003
@@ -1,5 +1,18 @@
 2003-12-03  Dalibor Topic <robilad at kaffe.org>
 
+	* libraries/javalib/gnu/java/net/protocol/file/Connection.java:
+	Resynced with GNU Classpath.
+
+	2003-12-02  Michael Koch  <konqueror at gmx.de>
+
+        * gnu/java/net/protocol/file/Connection.java: Reformated.
+        (inputStream): Made an InputStream.
+        (outputStream): Made an OutputStream.
+        (connect): Don't throw FileNotFoundException directly. FileInputStream
+        constructor does this for us.
+
+2003-12-03  Dalibor Topic <robilad at kaffe.org>
+
 	* libraries/javalib/gnu/java/io/PlatformHelper.java:
 	Resynced with GNU Classpath.
 
Index: kaffe/libltdl/config-h.in
diff -u kaffe/libltdl/config-h.in:1.8 kaffe/libltdl/config-h.in:1.9
--- kaffe/libltdl/config-h.in:1.8	Wed Jun 11 22:36:45 2003
+++ kaffe/libltdl/config-h.in	Wed Dec  3 20:26:05 2003
@@ -188,6 +188,8 @@
 /* Define to a type to use for `error_t' if it is not otherwise available. */
 #undef error_t
 
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
-   if it is not supported. */
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
 #undef inline
+#endif
Index: kaffe/libraries/javalib/gnu/java/net/protocol/file/Connection.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/file/Connection.java:1.2 kaffe/libraries/javalib/gnu/java/net/protocol/file/Connection.java:1.3
--- kaffe/libraries/javalib/gnu/java/net/protocol/file/Connection.java:1.2	Thu Nov 13 00:28:03 2003
+++ kaffe/libraries/javalib/gnu/java/net/protocol/file/Connection.java	Wed Dec  3 20:26:06 2003
@@ -42,7 +42,6 @@
 import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.FilePermission;
 import java.io.InputStream;
@@ -68,6 +67,11 @@
 public class Connection extends URLConnection
 {
   /**
+   * Default permission for a file
+   */
+  private static final String DEFAULT_PERMISSION = "read";
+
+  /**
    * This is a File object for this connection
    */
   private File file;
@@ -75,12 +79,12 @@
   /**
    * InputStream if we are reading from the file
    */
-  private BufferedInputStream inputStream;
+  private InputStream inputStream;
 
   /**
    * OutputStream if we are writing to the file
    */
-  private BufferedOutputStream outputStream;
+  private OutputStream outputStream;
 
   /**
    * FilePermission to read the file
@@ -88,14 +92,9 @@
   private FilePermission permission;
 
   /**
-   * Default permission for a file
-   */
-  private static final String DEFAULT_PERMISSION = "read";
-
-  /**
    * Calls superclass constructor to initialize.
    */
-  public Connection (URL url)
+  public Connection(URL url)
   {
     super (url);
     
@@ -116,15 +115,11 @@
     
     // If not connected, then file needs to be openned.
     file = new File (getURL().getFile());
-
-    if (!file.exists())
-      throw new FileNotFoundException (file.getPath());
-
     if (doInput)
-      inputStream = new BufferedInputStream (new FileInputStream (file));
+      inputStream = new BufferedInputStream(new FileInputStream(file));
     
     if (doOutput)
-      outputStream = new BufferedOutputStream (new FileOutputStream (file));
+      outputStream = new BufferedOutputStream(new FileOutputStream(file));
     
     connected = true;
   }
@@ -140,7 +135,7 @@
     throws IOException
   {
     if (!doInput)
-      throw new ProtocolException ("Can't open InputStream if doInput is false");
+      throw new ProtocolException("Can't open InputStream if doInput is false");
     
     if (!connected)
       connect();
@@ -159,7 +154,8 @@
     throws IOException
   {
     if (!doOutput)
-      throw new ProtocolException ("Can't open OutputStream if doOutput is false");
+      throw new
+	ProtocolException("Can't open OutputStream if doOutput is false");
 
     if (!connected)
       connect();
@@ -178,7 +174,7 @@
       {
 	if (!connected)
 	  connect();
-        
+
 	return file.lastModified();
       }
     catch (IOException e)
@@ -206,8 +202,7 @@
 	return -1;
       }
   }
-
-
+  
   /**
    * This method returns a <code>Permission</code> object representing the
    * permissions required to access this URL.  This method returns a
@@ -321,5 +316,5 @@
 	}
       };
   }
-  
+
 } // class FileURLConnection




More information about the kaffe mailing list