[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath: java.net roundup
Kaffe CVS
cvs-commits at kaffe.org
Mon May 17 15:59:03 PDT 2004
PatchSet 4740
Date: 2004/05/17 22:24:59
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: java.net roundup
2004-05-17 Dalibor Topic <robilad at kaffe.org>
* libraries/clib/net/NetworkInterface.c:
(java_net_NetworkInterface_getRealNetworkInterfaces) Switched over
to use Vectors like in GNU Classpath.
* libraries/clib/net/PlainDatagramSocketImpl.c:
(gnu_java_net_PlainDatagramSocketImpl_receive0) Fixed constructor
invocations to match updated versions.
* libraries/javalib/Klasses.jar.bootstrap,
libraries/javalib/java/net/Authenticator.java,
libraries/javalib/java/net/BindException.java,
libraries/javalib/java/net/ConnectException.java,
libraries/javalib/java/net/ContentHandler.java,
libraries/javalib/java/net/ContentHandlerFactory.java,
libraries/javalib/java/net/DatagramPacket.java,
libraries/javalib/java/net/DatagramSocket.java,
libraries/javalib/java/net/DatagramSocketImpl.java,
libraries/javalib/java/net/DatagramSocketImplFactory.java,
libraries/javalib/java/net/FileNameMap.java,
libraries/javalib/java/net/HttpURLConnection.java,
libraries/javalib/java/net/Inet4Address.java,
libraries/javalib/java/net/Inet6Address.java,
libraries/javalib/java/net/InetAddress.java,
libraries/javalib/java/net/InetSocketAddress.java,
libraries/javalib/java/net/JarURLConnection.java,
libraries/javalib/java/net/MalformedURLException.java,
libraries/javalib/java/net/MimeTypeMapper.java,
libraries/javalib/java/net/MulticastSocket.java,
libraries/javalib/java/net/NetPermission.java,
libraries/javalib/java/net/NetworkInterface.java,
libraries/javalib/java/net/NoRouteToHostException.java,
libraries/javalib/java/net/PasswordAuthentication.java,
libraries/javalib/java/net/PortUnreachableException.java,
libraries/javalib/java/net/ProtocolException.java,
libraries/javalib/java/net/ServerSocket.java,
libraries/javalib/java/net/Socket.java,
libraries/javalib/java/net/SocketAddress.java,
libraries/javalib/java/net/SocketException.java,
libraries/javalib/java/net/SocketImpl.java,
libraries/javalib/java/net/SocketImplFactory.java,
libraries/javalib/java/net/SocketOptions.java,
libraries/javalib/java/net/SocketPermission.java,
libraries/javalib/java/net/SocketTimeoutException.java,
libraries/javalib/java/net/URI.java,
libraries/javalib/java/net/URISyntaxException.java,
libraries/javalib/java/net/URL.java,
libraries/javalib/java/net/URLClassLoader.java,
libraries/javalib/java/net/URLConnection.java,
libraries/javalib/java/net/URLDecoder.java,
libraries/javalib/java/net/URLEncoder.java,
libraries/javalib/java/net/URLStreamHandler.java,
libraries/javalib/java/net/URLStreamHandlerFactory.java,
libraries/javalib/java/net/UnknownHostException.java,
libraries/javalib/java/net/UnknownServiceException.java:
Resynced with GNU Classpath.
2004-04-08 Michael Koch <konqueror at gmx.de>
* java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/JarURLConnection.java,
java/net/MimeTypeMapper.java,
java/net/URI.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLStreamHandler.java:
Reworked javadocs and coding style.
2004-04-08 Michael Koch <konqueror at gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/InetSocketAddress.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketTimeoutException.java,
java/net/URISyntaxException.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Reworked javadoc and coding style all over.
2004-02-12 Michael Koch <konqueror at gmx.de>
* java/net/URLStreamHandler.java
(hostSEquals): Fix checking host addresses.
(toExternalForm): Dont check protocol for null. We know already its
not null.
2004-04-23 Tom Tromey <tromey at redhat.com>
* java/net/URLStreamHandler.java (toExternalForm): Removed
unused variables.
* java/net/URLConnection.java: Removed unused imports.
* java/net/URLClassLoader.java (URLClassLoader): Removed
unused constructor.
2004-04-20 Jeroen Frijters <jeroen at sumatra.nl>
* java/net/URLStreamHandler.java
(parseURL): Convert the file path to using '/' instead of native
file separator.
2004-04-20 Guilhem Lavaux <guilhem at kaffe.org>
* java/net/URLStreamHandler.java
(parseURL): Take care of the query tag. Build authority.
(toExternalForm): Fixed URL building using authority.
2004-04-23 Michael Koch <konqueror at gmx.de>
* java/net/URL.java,
java/net/URLConnection.java:
Fixed coding style.
2004-04-17 Michael Koch <konqueror at gmx.de>
* java/net/JarURLConnection.java,
java/net/NetPermission.java,
java/net/SocketPermission.java,
java/net/URLConnection.java:
Fixed HTML tags in javadocs all over.
2004-04-09 Jeroen Frijters <jeroen at frijters.net>
* java/net/URLConnection.java: (setContentHandlerFactory): Fixed
to check static field instead of argument.
2004-04-23 Mark Wielaard <mark at klomp.org>
* java/net/URL.java
(set(String, String, int, String, String, String, String, String)):
Assign this.file to path or path + ? + query.
2004-04-23 Guilhem Lavaux <guilhem at kaffe.org>
* java/net/URL.java
(DEFAULT_SEARCH_PATH): Added gnu.inet.
2004-04-12 Michael Koch <konqueror at gmx.de>
* java/net/InetAddress.java,
java/net/SocketPermission.java:
Jalopied.
2004-04-21 Michael Koch <konqueror at gmx.de>
* java/net/Socket.java
(impl): Made package-private.
* java/net/ServerSocket.java
(implAccept): Access Socket.impl field directly.
2004-05-05 Michael Koch <konqueror at gmx.de>
* java/net/NetworkInterface.java
(getByName): Return null when no interface was found.
2004-04-29 Michael Koch <konqueror at gmx.de>
* java/net/InetAddress.java
(static): ANY_IF should be an instance of Inet4Address.
(InetAddress): Remove unused constructors.
(getByName): Create instance of Inet4Address for IPv4 addresses.
(getAllByName): Likewise.
(getInaddrAny): Likewise.
* java/net/Inet4Address.java
(Inet4Address): New constructor which takes hostname_alias. route all
other construtors through this one.
* java/net/Inet6Address.java
(Inet6Address): Call correct super constructor.
Members:
ChangeLog:1.2314->1.2315
libraries/clib/net/NetworkInterface.c:1.7->1.8
libraries/clib/net/PlainDatagramSocketImpl.c:1.43->1.44
libraries/javalib/java/net/Authenticator.java:1.2->1.3
libraries/javalib/java/net/BindException.java:1.4->1.5
libraries/javalib/java/net/ConnectException.java:1.4->1.5
libraries/javalib/java/net/ContentHandler.java:1.3->1.4
libraries/javalib/java/net/ContentHandlerFactory.java:1.5->1.6
libraries/javalib/java/net/DatagramPacket.java:1.11->1.12
libraries/javalib/java/net/DatagramSocket.java:1.22->1.23
libraries/javalib/java/net/DatagramSocketImpl.java:1.6->1.7
libraries/javalib/java/net/DatagramSocketImplFactory.java:1.4->1.5
libraries/javalib/java/net/FileNameMap.java:1.5->1.6
libraries/javalib/java/net/HttpURLConnection.java:1.9->1.10
libraries/javalib/java/net/Inet4Address.java:1.5->1.6
libraries/javalib/java/net/Inet6Address.java:1.3->1.4
libraries/javalib/java/net/InetAddress.java:1.21->1.22
libraries/javalib/java/net/InetSocketAddress.java:1.10->1.11
libraries/javalib/java/net/JarURLConnection.java:1.5->1.6
libraries/javalib/java/net/MalformedURLException.java:1.4->1.5
libraries/javalib/java/net/MimeTypeMapper.java:1.1->1.2
libraries/javalib/java/net/MulticastSocket.java:1.13->1.14
libraries/javalib/java/net/NetPermission.java:1.2->1.3
libraries/javalib/java/net/NetworkInterface.java:1.5->1.6
libraries/javalib/java/net/NoRouteToHostException.java:1.4->1.5
libraries/javalib/java/net/PasswordAuthentication.java:1.2->1.3
libraries/javalib/java/net/PortUnreachableException.java:1.1->1.2
libraries/javalib/java/net/ProtocolException.java:1.4->1.5
libraries/javalib/java/net/ServerSocket.java:1.26->1.27
libraries/javalib/java/net/Socket.java:1.33->1.34
libraries/javalib/java/net/SocketAddress.java:1.3->1.4
libraries/javalib/java/net/SocketException.java:1.4->1.5
libraries/javalib/java/net/SocketImpl.java:1.14->1.15
libraries/javalib/java/net/SocketImplFactory.java:1.5->1.6
libraries/javalib/java/net/SocketOptions.java:1.13->1.14
libraries/javalib/java/net/SocketPermission.java:1.3->1.4
libraries/javalib/java/net/SocketTimeoutException.java:1.1->1.2
libraries/javalib/java/net/URI.java:1.6->1.7
libraries/javalib/java/net/URISyntaxException.java:1.1->1.2
libraries/javalib/java/net/URL.java:1.42->1.43
libraries/javalib/java/net/URLClassLoader.java:1.15->1.16
libraries/javalib/java/net/URLConnection.java:1.18->1.19
libraries/javalib/java/net/URLDecoder.java:1.5->1.6
libraries/javalib/java/net/URLEncoder.java:1.5->1.6
libraries/javalib/java/net/URLStreamHandler.java:1.17->1.18
libraries/javalib/java/net/URLStreamHandlerFactory.java:1.5->1.6
libraries/javalib/java/net/UnknownHostException.java:1.5->1.6
libraries/javalib/java/net/UnknownServiceException.java:1.4->1.5
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2314 kaffe/ChangeLog:1.2315
--- kaffe/ChangeLog:1.2314 Mon May 17 15:01:00 2004
+++ kaffe/ChangeLog Mon May 17 22:24:59 2004
@@ -1,5 +1,203 @@
2004-05-17 Dalibor Topic <robilad at kaffe.org>
+ * libraries/clib/net/NetworkInterface.c:
+ (java_net_NetworkInterface_getRealNetworkInterfaces) Switched over
+ to use Vectors like in GNU Classpath.
+
+ * libraries/clib/net/PlainDatagramSocketImpl.c:
+ (gnu_java_net_PlainDatagramSocketImpl_receive0) Fixed constructor
+ invocations to match updated versions.
+
+ * libraries/javalib/Klasses.jar.bootstrap,
+ libraries/javalib/java/net/Authenticator.java,
+ libraries/javalib/java/net/BindException.java,
+ libraries/javalib/java/net/ConnectException.java,
+ libraries/javalib/java/net/ContentHandler.java,
+ libraries/javalib/java/net/ContentHandlerFactory.java,
+ libraries/javalib/java/net/DatagramPacket.java,
+ libraries/javalib/java/net/DatagramSocket.java,
+ libraries/javalib/java/net/DatagramSocketImpl.java,
+ libraries/javalib/java/net/DatagramSocketImplFactory.java,
+ libraries/javalib/java/net/FileNameMap.java,
+ libraries/javalib/java/net/HttpURLConnection.java,
+ libraries/javalib/java/net/Inet4Address.java,
+ libraries/javalib/java/net/Inet6Address.java,
+ libraries/javalib/java/net/InetAddress.java,
+ libraries/javalib/java/net/InetSocketAddress.java,
+ libraries/javalib/java/net/JarURLConnection.java,
+ libraries/javalib/java/net/MalformedURLException.java,
+ libraries/javalib/java/net/MimeTypeMapper.java,
+ libraries/javalib/java/net/MulticastSocket.java,
+ libraries/javalib/java/net/NetPermission.java,
+ libraries/javalib/java/net/NetworkInterface.java,
+ libraries/javalib/java/net/NoRouteToHostException.java,
+ libraries/javalib/java/net/PasswordAuthentication.java,
+ libraries/javalib/java/net/PortUnreachableException.java,
+ libraries/javalib/java/net/ProtocolException.java,
+ libraries/javalib/java/net/ServerSocket.java,
+ libraries/javalib/java/net/Socket.java,
+ libraries/javalib/java/net/SocketAddress.java,
+ libraries/javalib/java/net/SocketException.java,
+ libraries/javalib/java/net/SocketImpl.java,
+ libraries/javalib/java/net/SocketImplFactory.java,
+ libraries/javalib/java/net/SocketOptions.java,
+ libraries/javalib/java/net/SocketPermission.java,
+ libraries/javalib/java/net/SocketTimeoutException.java,
+ libraries/javalib/java/net/URI.java,
+ libraries/javalib/java/net/URISyntaxException.java,
+ libraries/javalib/java/net/URL.java,
+ libraries/javalib/java/net/URLClassLoader.java,
+ libraries/javalib/java/net/URLConnection.java,
+ libraries/javalib/java/net/URLDecoder.java,
+ libraries/javalib/java/net/URLEncoder.java,
+ libraries/javalib/java/net/URLStreamHandler.java,
+ libraries/javalib/java/net/URLStreamHandlerFactory.java,
+ libraries/javalib/java/net/UnknownHostException.java,
+ libraries/javalib/java/net/UnknownServiceException.java:
+ Resynced with GNU Classpath.
+
+ 2004-04-08 Michael Koch <konqueror at gmx.de>
+
+ * java/net/ContentHandler.java,
+ java/net/ContentHandlerFactory.java,
+ java/net/Inet4Address.java,
+ java/net/Inet6Address.java,
+ java/net/JarURLConnection.java,
+ java/net/MimeTypeMapper.java,
+ java/net/URI.java,
+ java/net/URL.java,
+ java/net/URLClassLoader.java,
+ java/net/URLConnection.java,
+ java/net/URLStreamHandler.java:
+ Reworked javadocs and coding style.
+
+ 2004-04-08 Michael Koch <konqueror at gmx.de>
+
+ * java/net/Authenticator.java,
+ java/net/BindException.java,
+ java/net/ConnectException.java,
+ java/net/DatagramPacket.java,
+ java/net/DatagramSocket.java,
+ java/net/DatagramSocketImpl.java,
+ java/net/DatagramSocketImplFactory.java,
+ java/net/FileNameMap.java,
+ java/net/HttpURLConnection.java,
+ java/net/InetSocketAddress.java,
+ java/net/MalformedURLException.java,
+ java/net/MulticastSocket.java,
+ java/net/NetPermission.java,
+ java/net/NetworkInterface.java,
+ java/net/NoRouteToHostException.java,
+ java/net/PasswordAuthentication.java,
+ java/net/PortUnreachableException.java,
+ java/net/ProtocolException.java,
+ java/net/ServerSocket.java,
+ java/net/Socket.java,
+ java/net/SocketAddress.java,
+ java/net/SocketException.java,
+ java/net/SocketImpl.java,
+ java/net/SocketImplFactory.java,
+ java/net/SocketOptions.java,
+ java/net/SocketTimeoutException.java,
+ java/net/URISyntaxException.java,
+ java/net/URLDecoder.java,
+ java/net/URLEncoder.java,
+ java/net/URLStreamHandlerFactory.java,
+ java/net/UnknownHostException.java,
+ java/net/UnknownServiceException.java:
+ Reworked javadoc and coding style all over.
+
+ 2004-02-12 Michael Koch <konqueror at gmx.de>
+
+ * java/net/URLStreamHandler.java
+ (hostSEquals): Fix checking host addresses.
+ (toExternalForm): Dont check protocol for null. We know already its
+ not null.
+
+ 2004-04-23 Tom Tromey <tromey at redhat.com>
+
+ * java/net/URLStreamHandler.java (toExternalForm): Removed
+ unused variables.
+ * java/net/URLConnection.java: Removed unused imports.
+ * java/net/URLClassLoader.java (URLClassLoader): Removed
+ unused constructor.
+
+ 2004-04-20 Jeroen Frijters <jeroen at sumatra.nl>
+
+ * java/net/URLStreamHandler.java
+ (parseURL): Convert the file path to using '/' instead of native
+ file separator.
+
+ 2004-04-20 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * java/net/URLStreamHandler.java
+ (parseURL): Take care of the query tag. Build authority.
+ (toExternalForm): Fixed URL building using authority.
+
+ 2004-04-23 Michael Koch <konqueror at gmx.de>
+
+ * java/net/URL.java,
+ java/net/URLConnection.java:
+ Fixed coding style.
+
+ 2004-04-17 Michael Koch <konqueror at gmx.de>
+
+ * java/net/JarURLConnection.java,
+ java/net/NetPermission.java,
+ java/net/SocketPermission.java,
+ java/net/URLConnection.java:
+ Fixed HTML tags in javadocs all over.
+
+ 2004-04-09 Jeroen Frijters <jeroen at frijters.net>
+
+ * java/net/URLConnection.java: (setContentHandlerFactory): Fixed
+ to check static field instead of argument.
+
+ 2004-04-23 Mark Wielaard <mark at klomp.org>
+
+ * java/net/URL.java
+ (set(String, String, int, String, String, String, String, String)):
+ Assign this.file to path or path + "?" + query.
+
+ 2004-04-23 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * java/net/URL.java
+ (DEFAULT_SEARCH_PATH): Added "gnu.inet".
+
+ 2004-04-12 Michael Koch <konqueror at gmx.de>
+
+ * java/net/InetAddress.java,
+ java/net/SocketPermission.java:
+ Jalopied.
+
+ 2004-04-21 Michael Koch <konqueror at gmx.de>
+
+ * java/net/Socket.java
+ (impl): Made package-private.
+ * java/net/ServerSocket.java
+ (implAccept): Access Socket.impl field directly.
+
+ 2004-05-05 Michael Koch <konqueror at gmx.de>
+
+ * java/net/NetworkInterface.java
+ (getByName): Return null when no interface was found.
+
+ 2004-04-29 Michael Koch <konqueror at gmx.de>
+
+ * java/net/InetAddress.java
+ (static): ANY_IF should be an instance of Inet4Address.
+ (InetAddress): Remove unused constructors.
+ (getByName): Create instance of Inet4Address for IPv4 addresses.
+ (getAllByName): Likewise.
+ (getInaddrAny): Likewise.
+ * java/net/Inet4Address.java
+ (Inet4Address): New constructor which takes hostname_alias. route all
+ other construtors through this one.
+ * java/net/Inet6Address.java
+ (Inet6Address): Call correct super constructor.
+
+2004-05-17 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/java/nio/ByteBuffer.java,
libraries/javalib/java/nio/CharBuffer.java,
libraries/javalib/java/nio/DirectByteBufferImpl.java,
Index: kaffe/libraries/clib/net/NetworkInterface.c
diff -u kaffe/libraries/clib/net/NetworkInterface.c:1.7 kaffe/libraries/clib/net/NetworkInterface.c:1.8
--- kaffe/libraries/clib/net/NetworkInterface.c:1.7 Sat Mar 27 16:07:33 2004
+++ kaffe/libraries/clib/net/NetworkInterface.c Mon May 17 22:25:02 2004
@@ -120,15 +120,15 @@
return( retval );
}
-struct Hjava_util_Hashtable*
+struct Hjava_util_Vector*
java_net_NetworkInterface_getRealNetworkInterfaces(void)
{
- struct Hjava_util_Hashtable* hashtable;
+ struct Hjava_util_Vector* vector;
struct ifaddrs* addrs;
struct ifaddrs* ifa;
- hashtable =
- (struct Hjava_util_Hashtable*)execute_java_constructor("java/util/Hashtable", 0, 0, "()V");
+ vector =
+ (struct Hjava_util_Vector*)execute_java_constructor("java/util/Vector", 0, 0, "()V");
ifa = addrs = detectInterfaces();
while (ifa != NULL)
@@ -141,20 +141,22 @@
if (addr != NULL)
{
- if (do_execute_java_method(hashtable, "get", "(Ljava/lang/Object;)Ljava/lang/Object;",
- 0, 0, iface_name).l == NULL)
- {
- do_execute_java_method
- (hashtable, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", 0, 0,
- iface_name,
- execute_java_constructor("java/net/NetworkInterface", 0, 0,
- "(Ljava/lang/String;Ljava/net/InetAddress;)V",
- iface_name, addr));
- }
+ do_execute_java_method
+ (vector,
+ "add",
+ "(Ljava/lang/Object;)Z",
+ 0,
+ 0,
+ execute_java_constructor("java/net/NetworkInterface",
+ 0,
+ 0,
+ "(Ljava/lang/String;Ljava/net/InetAddress;)V",
+ iface_name,
+ addr));
}
ifa = ifa->ifa_next;
}
freeInterfaces(addrs);
- return hashtable;
+ return vector;
}
Index: kaffe/libraries/clib/net/PlainDatagramSocketImpl.c
diff -u kaffe/libraries/clib/net/PlainDatagramSocketImpl.c:1.43 kaffe/libraries/clib/net/PlainDatagramSocketImpl.c:1.44
--- kaffe/libraries/clib/net/PlainDatagramSocketImpl.c:1.43 Sun Apr 18 13:57:29 2004
+++ kaffe/libraries/clib/net/PlainDatagramSocketImpl.c Mon May 17 22:25:03 2004
@@ -376,7 +376,7 @@
memcpy(unhand_byte_array(array_address), &addr.addr4.sin_addr, sizeof(addr.addr4.sin_addr));
unhand(pkt)->address = (struct Hjava_net_InetAddress*)
- execute_java_constructor("java/net/InetAddress", 0, 0, "([B)V",
+ execute_java_constructor("java/net/Inet4Address", 0, 0, "([B)V",
array_address);
#if defined(HAVE_STRUCT_SOCKADDR_IN6)
Index: kaffe/libraries/javalib/java/net/Authenticator.java
diff -u kaffe/libraries/javalib/java/net/Authenticator.java:1.2 kaffe/libraries/javalib/java/net/Authenticator.java:1.3
--- kaffe/libraries/javalib/java/net/Authenticator.java:1.2 Sun Aug 10 18:47:52 2003
+++ kaffe/libraries/javalib/java/net/Authenticator.java Mon May 17 22:25:04 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath 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
@@ -37,18 +37,19 @@
package java.net;
+
/**
* This abstract class provides a model for obtaining authentication
* information (in the form of a username and password) required by
* some network operations (such as hitting a password protected
* web site).
* <p>
- * To make use of this feature, a programmer must create a subclass
+ * To make use of this feature, a programmer must create a subclass
* that knows how to obtain the necessary info. An example
- * would be a class that popped up a dialog box to prompt the user.
- * After creating an instance of that subclass, the static
- * <code>setDefault</code> method of this class is called to set up
- * that instance as the object to use on subsequent calls to obtain
+ * would be a class that popped up a dialog box to prompt the user.
+ * After creating an instance of that subclass, the static
+ * <code>setDefault</code> method of this class is called to set up
+ * that instance as the object to use on subsequent calls to obtain
* authorization.
*
* @since 1.2
@@ -106,8 +107,8 @@
*/
/**
- * This method sets the default <code>Authenticator</code> object (an
- * instance of a subclass of <code>Authenticator</code>) to use when
+ * This method sets the default <code>Authenticator</code> object (an
+ * instance of a subclass of <code>Authenticator</code>) to use when
* prompting the user for
* information. Note that this method checks to see if the caller is
* allowed to set this value (the "setDefaultAuthenticator" permission)
@@ -115,9 +116,9 @@
*
* @param defAuth The new default <code>Authenticator</code> object to use
*
- * @exception SecurityException If the caller does not have permission
+ * @exception SecurityException If the caller does not have permission
* to perform this operation
- */
+ */
public static void setDefault(Authenticator defAuth)
{
SecurityManager sm = System.getSecurityManager();
@@ -125,38 +126,40 @@
sm.checkPermission(new NetPermission("setDefaultAuthenticator"));
defaultAuthenticator = defAuth;
- }
+ }
/**
* This method is called whenever a username and password for a given
* network operation is required. First, a security check is made to see
* if the caller has the "requestPasswordAuthentication"
* permission. If not, the method thows an exception. If there is no
- * default <code>Authenticator</code> object, the method then returns
- * <code>null</code>. Otherwise, the default authenticators's instance
+ * default <code>Authenticator</code> object, the method then returns
+ * <code>null</code>. Otherwise, the default authenticators's instance
* variables are initialized and it's <code>getPasswordAuthentication</code>
* method is called to get the actual authentication information to return.
*
* @param addr The address requesting authentication
* @param port The port requesting authentication
* @param protocol The protocol requesting authentication
- * @param prompt The prompt to display to the user when requesting
+ * @param prompt The prompt to display to the user when requesting
* authentication info
* @param scheme The authentication scheme in use
- *
- * @return A <code>PasswordAuthentication</code> object with the user's
+ *
+ * @return A <code>PasswordAuthentication</code> object with the user's
* authentication info.
*
- * @exception SecurityException If the caller does not have permission to
+ * @exception SecurityException If the caller does not have permission to
* perform this operation
- */
- public static PasswordAuthentication
- requestPasswordAuthentication(InetAddress addr, int port, String protocol,
- String prompt, String scheme)
+ */
+ public static PasswordAuthentication requestPasswordAuthentication(InetAddress addr,
+ int port,
+ String protocol,
+ String prompt,
+ String scheme)
throws SecurityException
{
- return(requestPasswordAuthentication (null, addr, port, protocol,
- prompt, scheme));
+ return requestPasswordAuthentication(null, addr, port, protocol, prompt,
+ scheme);
}
/**
@@ -175,21 +178,24 @@
* @param addr The address requesting authentication
* @param port The port requesting authentication
* @param protocol The protocol requesting authentication
- * @param prompt The prompt to display to the user when requesting
+ * @param prompt The prompt to display to the user when requesting
* authentication info
* @param scheme The authentication scheme in use
*
- * @return A <code>PasswordAuthentication</code> object with the user's
+ * @return A <code>PasswordAuthentication</code> object with the user's
* authentication info.
*
- * @exception SecurityException If the caller does not have permission to
+ * @exception SecurityException If the caller does not have permission to
* perform this operation
*
* @since 1.4
*/
- public static PasswordAuthentication
- requestPasswordAuthentication(String host, InetAddress addr, int port,
- String protocol, String prompt, String scheme)
+ public static PasswordAuthentication requestPasswordAuthentication(String host,
+ InetAddress addr,
+ int port,
+ String protocol,
+ String prompt,
+ String scheme)
throws SecurityException
{
SecurityManager sm = System.getSecurityManager();
@@ -197,7 +203,7 @@
sm.checkPermission(new NetPermission("requestPasswordAuthentication"));
if (defaultAuthenticator == null)
- return(null);
+ return null;
defaultAuthenticator.host = host;
defaultAuthenticator.addr = addr;
@@ -206,7 +212,7 @@
defaultAuthenticator.prompt = prompt;
defaultAuthenticator.scheme = scheme;
- return(defaultAuthenticator.getPasswordAuthentication());
+ return defaultAuthenticator.getPasswordAuthentication();
}
/*
@@ -232,7 +238,7 @@
*/
protected final InetAddress getRequestingSite()
{
- return(addr);
+ return addr;
}
/**
@@ -240,24 +246,24 @@
* or <code>null</code> if not available.
*
* @return The name of the host requesting authentication, or
- * </code>null</code> if it is not available.
+ * <code>null</code> if it is not available.
*
* @since 1.4
*/
protected final String getRequestingHost()
{
- return(host);
+ return host;
}
/**
- * This method returns the port of the site that is requesting
+ * This method returns the port of the site that is requesting
* authentication.
*
* @return The requesting port
*/
protected final int getRequestingPort()
{
- return(port);
+ return port;
}
/**
@@ -268,18 +274,18 @@
*/
protected final String getRequestingProtocol()
{
- return(protocol);
+ return protocol;
}
/**
- * Returns the prompt that should be used when requesting authentication
+ * Returns the prompt that should be used when requesting authentication
* information from the user
- *
+ *
* @return The user prompt
*/
protected final String getRequestingPrompt()
{
- return(prompt);
+ return prompt;
}
/**
@@ -289,7 +295,7 @@
*/
protected final String getRequestingScheme()
{
- return(scheme);
+ return scheme;
}
/**
@@ -302,8 +308,6 @@
*/
protected PasswordAuthentication getPasswordAuthentication()
{
- return(null);
+ return null;
}
-
} // class Authenticator
-
Index: kaffe/libraries/javalib/java/net/BindException.java
diff -u kaffe/libraries/javalib/java/net/BindException.java:1.4 kaffe/libraries/javalib/java/net/BindException.java:1.5
--- kaffe/libraries/javalib/java/net/BindException.java:1.4 Thu Aug 7 18:36:33 2003
+++ kaffe/libraries/javalib/java/net/BindException.java Mon May 17 22:25:04 2004
@@ -37,6 +37,7 @@
package java.net;
+
/**
* This exception indicates that an error occurred while attempting to bind
* socket to a particular port.
Index: kaffe/libraries/javalib/java/net/ConnectException.java
diff -u kaffe/libraries/javalib/java/net/ConnectException.java:1.4 kaffe/libraries/javalib/java/net/ConnectException.java:1.5
--- kaffe/libraries/javalib/java/net/ConnectException.java:1.4 Thu Aug 7 18:36:33 2003
+++ kaffe/libraries/javalib/java/net/ConnectException.java Mon May 17 22:25:04 2004
@@ -35,8 +35,8 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package java.net;
+
/**
* This exception indicates that an error occurred while attempting to
Index: kaffe/libraries/javalib/java/net/ContentHandler.java
diff -u kaffe/libraries/javalib/java/net/ContentHandler.java:1.3 kaffe/libraries/javalib/java/net/ContentHandler.java:1.4
--- kaffe/libraries/javalib/java/net/ContentHandler.java:1.3 Wed Oct 29 18:30:51 2003
+++ kaffe/libraries/javalib/java/net/ContentHandler.java Mon May 17 22:25:04 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath 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
@@ -47,11 +47,11 @@
/**
* This is an abstract class that is the superclass for classes that read
- * objects from URL's. Calling the <code>getContent()</code> method in the
- * <code>URL</code> class or the <code>URLConnection</code> class will cause
- * an instance of a subclass of <code>ContentHandler</code> to be created for
- * the MIME type of the object being downloaded from the URL. Thus, this
- * class is seldom needed by applications/applets directly, but only
+ * objects from URL's. Calling the <code>getContent()</code> method in the
+ * <code>URL</code> class or the <code>URLConnection</code> class will cause
+ * an instance of a subclass of <code>ContentHandler</code> to be created for
+ * the MIME type of the object being downloaded from the URL. Thus, this
+ * class is seldom needed by applications/applets directly, but only
* indirectly through methods in other classes.
*
* @author Aaron M. Renn (arenn at urbanophile.com)
@@ -66,8 +66,8 @@
/**
* Default, no-argument constructor.
*/
- public ContentHandler()
- {
+ public ContentHandler()
+ {
}
/*
@@ -75,10 +75,10 @@
*/
/**
- * This method reads from the <code>InputStream</code> of the passed in URL
- * connection and uses the data downloaded to create an <code>Object</code>
- * represening the content. For example, if the URL is pointing to a GIF
- * file, this method might return an <code>Image</code> object. This method
+ * This method reads from the <code>InputStream</code> of the passed in URL
+ * connection and uses the data downloaded to create an <code>Object</code>
+ * represening the content. For example, if the URL is pointing to a GIF
+ * file, this method might return an <code>Image</code> object. This method
* must be implemented by subclasses.
*
* @param urlc A <code>URLConnection</code> object to read data from.
@@ -87,16 +87,16 @@
*
* @exception IOException If an error occurs
*/
- public abstract Object getContent(URLConnection urlc)
+ public abstract Object getContent(URLConnection urlc)
throws IOException;
/**
* This method reads from the <code>InputStream</code> of the passed in URL
* connection and uses the data downloaded to create an <code>Object</code>
- * represening the content. For example, if the URL is pointing to a GIF
- * file, this method might return an <code>Image</code> object. This method
+ * represening the content. For example, if the URL is pointing to a GIF
+ * file, this method might return an <code>Image</code> object. This method
* must be implemented by subclasses. This method uses the list of
- * supplied classes as candidate types. If the data read doesn't match
+ * supplied classes as candidate types. If the data read doesn't match
* any of the supplied type, <code>null</code> is returned.
*
* @param urlc A <code>URLConnection</code> object to read data from.
@@ -113,15 +113,14 @@
public Object getContent(URLConnection urlc, Class[] classes)
throws IOException
{
- Object obj = getContent (urlc);
+ Object obj = getContent(urlc);
for (int i = 0; i < classes.length; i++)
{
- if (classes [i].isInstance (obj))
- return obj;
+ if (classes[i].isInstance(obj))
+ return obj;
}
return null;
}
-
} // class ContentHandler
Index: kaffe/libraries/javalib/java/net/ContentHandlerFactory.java
diff -u kaffe/libraries/javalib/java/net/ContentHandlerFactory.java:1.5 kaffe/libraries/javalib/java/net/ContentHandlerFactory.java:1.6
--- kaffe/libraries/javalib/java/net/ContentHandlerFactory.java:1.5 Wed Oct 29 18:30:51 2003
+++ kaffe/libraries/javalib/java/net/ContentHandlerFactory.java Mon May 17 22:25:04 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath 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
@@ -35,18 +35,17 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package java.net;
+
/**
* Written using on-line Java Platform 1.2 API Specification, as well
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
* Status: Believed complete and correct.
*/
-
/**
- * This interface maps MIME types to <code>ContentHandler</code> objects.
- * It consists of one method that, when passed a MIME type, returns a
+ * This interface maps MIME types to <code>ContentHandler</code> objects.
+ * It consists of one method that, when passed a MIME type, returns a
* handler for that type.
*
* @author Aaron M. Renn (arenn at urbanophile.com)
@@ -63,6 +62,4 @@
* @return The <code>ContentHandler</code> for the passed in MIME type
*/
ContentHandler createContentHandler(String mimeType);
-
} // interface ContentHandlerFactory
-
Index: kaffe/libraries/javalib/java/net/DatagramPacket.java
diff -u kaffe/libraries/javalib/java/net/DatagramPacket.java:1.11 kaffe/libraries/javalib/java/net/DatagramPacket.java:1.12
--- kaffe/libraries/javalib/java/net/DatagramPacket.java:1.11 Mon Dec 29 11:15:17 2003
+++ kaffe/libraries/javalib/java/net/DatagramPacket.java Mon May 17 22:25:04 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath 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
@@ -37,6 +37,7 @@
package java.net;
+
/*
* Written using on-line Java Platform 1.2 API Specification, as well
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
@@ -86,7 +87,7 @@
* The maximal length of the buffer.
*/
int maxlen;
-
+
/**
* The address to which the packet should be sent or from which it
* was received.
@@ -134,14 +135,14 @@
*
* @param buf A buffer containing the data to send
* @param offset The offset into the buffer to start writing from.
- * @param len The length of the buffer (must be <= buf.length)
- * @param addr The address to send to
+ * @param length The length of the buffer (must be <= buf.length)
+ * @param address The address to send to
* @param port The port to send to
*
* @since 1.2
*/
public DatagramPacket(byte[] buf, int offset, int length,
- InetAddress address, int port)
+ InetAddress address, int port)
{
setData(buf, offset, length);
setAddress(address);
@@ -177,8 +178,7 @@
* @since 1.4
*/
public DatagramPacket(byte[] buf, int offset, int length,
- SocketAddress address)
- throws SocketException
+ SocketAddress address) throws SocketException
{
if (! (address instanceof InetSocketAddress))
*** Patch too long, truncated ***
More information about the kaffe
mailing list