From fc44b85de78353cb3930e3d59346863bf344ef93 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Wed, 25 Sep 2002 17:14:09 +0000 Subject: 2002-09-25 Michael Koch * java/net/DatagramSocket.java (DatagramSocket): Initialize new instance variables. (close): Reset new instance variables. (getLocalAddress): Remove unneeded SecurityManager usage. (getLocalPort): Check if socket is already bound. (isConnected): New method. (getInetAddress): Implemented. (getPort): Better Implementation, documentation fixed. (getRemoteSocketAddress): New method. * java/net/JarURLConnection.java (element): Typo fixed. (getMainAttributes): New method. (getAttributes): New method (stub only). (getManifest): New method (stub only). * java/net/NetPermission.java: Added serialVersionsUID. * java/net/Socket.java (connect): Check blocking mode of associated channel, documentation added. (getLocalSocketAddress): Better implementation. (getRemoteSocketAddress): Implemented. (isBound): New method. (setSendBufferSize): Documentation added. * java/net/SocketAddress.java: Added serialVersionsUID. * java/net/SocketPermission.java: Added serialVersionsUID. * java/net/URL.java (URL): Wrap for shorter lines, initialize new instance variables, documentation added. (equals): Check new instance variables too. (getContent): Documentation added. (getPath): Documentation added. (getAuthority): New method. (getHost): Documentation added. (getPort): Documentation added. (getDefaultPort): New method. (getProtocol): Documentation added. (getUserInfo): Documentation added. (set): Initialize new instance variables, documentation added. * java/net/URLStreamHandler.java (setURL): New method. * java/net/natPlainDatagramSocketImpl.cc (connect): Fix exception name. (disconnect): Fix exception name. From-SVN: r57501 --- libjava/java/net/URLStreamHandler.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libjava/java/net/URLStreamHandler.java') diff --git a/libjava/java/net/URLStreamHandler.java b/libjava/java/net/URLStreamHandler.java index ea21ee928e5..cade4f3d066 100644 --- a/libjava/java/net/URLStreamHandler.java +++ b/libjava/java/net/URLStreamHandler.java @@ -183,6 +183,29 @@ public abstract class URLStreamHandler u.set(protocol, host, port, file, ref); } + /** + * Sets the fields of the URL argument to the indicated values + * + * @param u The URL to modify + * @param protocol The protocol to set + * @param host The host name to set + * @param port The port number to set + * @param authority The authority to set + * @param userInfo The user information to set + * @param path The path/filename to set + * @param query The query part to set + * @param ref The reference + * + * @exception SecurityException If the protocol handler of the URL is + * different from this one + */ + protected void setURL(URL u, String protocol, String host, int port, + String authority, String userInfo, String path, + String query, String ref) + { + u.set(protocol, host, port, authority, userInfo, path, query, ref); + } + /** * Converts an URL of a specific protocol to a string * -- cgit v1.2.3