[kaffe] CVS kaffe (dalibor): Fixed handling of FTP URLConnections

Kaffe CVS cvs-commits at kaffe.org
Sun Jan 11 18:37:02 PST 2004


PatchSet 4326 
Date: 2004/01/12 02:34:26
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed handling of FTP URLConnections

2004-01-12  Dalibor Topic <robilad at kaffe.org>

        * libraries/javalib/gnu/inet/ftp/Handler.java:
        New file.

        * libraries/javalib/profiles/default/inet.files:
        Added gnu/inet/ftp/Handler.java.

        * libraries/javalib/gnu/java/net/protocol/file/Handler.java
        (openConnection): Attempt to open an FTP connection if necessary.

        * libraries/javalib/java/net/URL.java
        (DEFAULT_SEARCH_PATH): Added gnu.inet.

Members: 
	ChangeLog:1.1913->1.1914 
	libraries/javalib/gnu/inet/ftp/Handler.java:INITIAL->1.1 
	libraries/javalib/gnu/java/net/protocol/file/Handler.java:1.3->1.4 
	libraries/javalib/java/net/URL.java:1.38->1.39 
	libraries/javalib/profiles/default/inet.files:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1913 kaffe/ChangeLog:1.1914
--- kaffe/ChangeLog:1.1913	Mon Jan 12 02:11:39 2004
+++ kaffe/ChangeLog	Mon Jan 12 02:34:26 2004
@@ -1,5 +1,19 @@
 2004-01-12  Dalibor Topic <robilad at kaffe.org>
 
+	* libraries/javalib/gnu/inet/ftp/Handler.java:
+	New file.
+
+	* libraries/javalib/profiles/default/inet.files:
+	Added gnu/inet/ftp/Handler.java.
+
+	* libraries/javalib/gnu/java/net/protocol/file/Handler.java
+	(openConnection): Attempt to open an FTP connection if necessary.
+
+	* libraries/javalib/java/net/URL.java
+	(DEFAULT_SEARCH_PATH): Added gnu.inet.
+
+2004-01-12  Dalibor Topic <robilad at kaffe.org>
+
 	* libraries/javalib/java/awt/GridBagLayout.java:
 	Replaced by implementation from GNU Classpath. 
 
===================================================================
Checking out kaffe/libraries/javalib/gnu/inet/ftp/Handler.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/gnu/inet/ftp/Handler.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/javalib/gnu/inet/ftp/Handler.java	Mon Jan 12 02:36:35 2004
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2003 The Free Software Foundation
+ *
+ * This file is part of GNU inetlib, a library.
+ *
+ * GNU inetlib is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GNU inetlib is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * As a special exception, if you link this library with other files to
+ * produce an executable, this library does not by itself cause the
+ * resulting executable to be covered by the GNU General Public License.
+ * This exception does not however invalidate any other reasons why the
+ * executable file might be covered by the GNU General Public License.
+ */
+
+package gnu.inet.ftp;
+
+/*
+ * This is a dummy class, necessary because GNU Classpath only checks for a class
+ * called Handler.
+ */
+public class Handler extends FTPURLStreamHandler
+{
+
+}
Index: kaffe/libraries/javalib/gnu/java/net/protocol/file/Handler.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/file/Handler.java:1.3 kaffe/libraries/javalib/gnu/java/net/protocol/file/Handler.java:1.4
--- kaffe/libraries/javalib/gnu/java/net/protocol/file/Handler.java:1.3	Wed Dec 31 09:32:16 2003
+++ kaffe/libraries/javalib/gnu/java/net/protocol/file/Handler.java	Mon Jan 12 02:34:28 2004
@@ -76,8 +76,8 @@
     String host = url.getHost();
     if ((host != null) && (! host.equals("")))
       {
-        throw new IOException("ftp protocol handler not yet implemented.");
-        /*
+//        throw new IOException("ftp protocol handler not yet implemented.");
+//        /*
 	// Reset the protocol (and implicitly the handler) for this URL.
 	// Then have the URL attempt the connection again, as it will
 	// get the changed handler the next time around.
@@ -86,7 +86,7 @@
 	// Until the ftp protocol handler is written, this will cause
 	// a NullPointerException.
 	return url.openConnection();
-	*/
+//	*/
       }
 
     return new Connection(url);
Index: kaffe/libraries/javalib/java/net/URL.java
diff -u kaffe/libraries/javalib/java/net/URL.java:1.38 kaffe/libraries/javalib/java/net/URL.java:1.39
--- kaffe/libraries/javalib/java/net/URL.java:1.38	Wed Dec 31 16:53:52 2003
+++ kaffe/libraries/javalib/java/net/URL.java	Mon Jan 12 02:34:29 2004
@@ -121,7 +121,7 @@
 public final class URL implements Serializable
 {
   private static final String DEFAULT_SEARCH_PATH =
-    "gnu.java.net.protocol|sun.net.www.protocol";
+    "gnu.java.net.protocol|gnu.inet|sun.net.www.protocol";
   
   /**
    * The name of the protocol for this URL.
Index: kaffe/libraries/javalib/profiles/default/inet.files
diff -u kaffe/libraries/javalib/profiles/default/inet.files:1.1 kaffe/libraries/javalib/profiles/default/inet.files:1.2
--- kaffe/libraries/javalib/profiles/default/inet.files:1.1	Sat Jan 10 23:34:32 2004
+++ kaffe/libraries/javalib/profiles/default/inet.files	Mon Jan 12 02:34:29 2004
@@ -11,6 +11,7 @@
 gnu/inet/ftp/FTPResponse.java
 gnu/inet/ftp/FTPURLConnection.java
 gnu/inet/ftp/FTPURLStreamHandler.java
+gnu/inet/ftp/Handler.java
 gnu/inet/ftp/PassiveModeDTP.java
 gnu/inet/ftp/StreamInputStream.java
 gnu/inet/ftp/StreamOutputStream.java




More information about the kaffe mailing list