From df79dc1a89017f6b70525fcafc94c1ec476fead0 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Wed, 25 Sep 2002 09:05:53 +0000 Subject: 2002-09-25 Michael Koch * java/net/DatagramSocket.java (DatagramSocket): Exception documentation added. (bind): Exception documentation added, addded SecurityManager check, added SocketAddress type check. (getSoTimeout): Check impl. (receive): Fix SecurityManager check, check impl, documentation added. (send): Check channel mode, documentation added. (connect): New method. (disconnect): Implemented. (getLocalSocketAddress): New method. (getReceiveBufferSize): Check impl. (setReuseAddress): Check impl. (getReuseAddress): Check impl. (setBroadcast): Check impl. (getBroadcast): Check impl. (setTrafficClass): Check impl, Documentation cleared. (getTrafficClass): Check impl. (getSendBufferSize): Check impl. (setReceiveBufferSize): Check impl, documentation added. (setSendBufferSize): Documentation added. (setDatagramSocketImplFactory): New method. * java/net/HttpURLConnection.java (HTTP_INTERNAL_ERROR): The correct code is 500. (HTTP_NOT_IMPLEMENTED): Added new constant. (setFollowRedirects): Documentation added. (getInstanceFollowRedirects): New method. (setInstanceFollowRedirects): New method. (setRequestMethod): Documentation added. (getResponseCode): Documentation added. (getResponseMessage): Documentation added. * java/net/JarURLConnection.java (JarURLConnection): protected since JDK 1.4. (getJarEntry): java.io.IOException to IOException, documentation added. (getJarFile): Documentation added. * java/net/ServerSocket.java (ServerSocket): Private to public, exception added. (ServerSocket): java.io.IOException to IOException, documentation added. (bind): Check socket address type, documentation added. (bind): java.io.IOException to IOException, documentation added. (accept): Documentation added. (implAccept): Check ch is not non-blocking, documentation added. (setSoTimeout): Documentation fixed. (setReceiveBufferSize): Documentation added. * java/net/Socket.java (Socket): Documentation added. (bind): Documentation added. (connect): Check socket address type, documentation added. (getRemoteSocketAddress): New method. From-SVN: r57494 --- libjava/java/net/URLStreamHandler.java | 45 +++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'libjava/java/net/URLStreamHandler.java') diff --git a/libjava/java/net/URLStreamHandler.java b/libjava/java/net/URLStreamHandler.java index bb3d8e8..ea21ee9 100644 --- a/libjava/java/net/URLStreamHandler.java +++ b/libjava/java/net/URLStreamHandler.java @@ -10,6 +10,8 @@ details. */ package java.net; +import java.io.IOException; + /** * @author Warren Levy * @date March 4, 1999. @@ -24,8 +26,16 @@ package java.net; public abstract class URLStreamHandler { protected abstract URLConnection openConnection(URL u) - throws java.io.IOException; - + throws IOException; + + /** + * Pasrses the given URL + * + * @param u The URL to parse + * @param spec The specification to use + * @param start FIXME + * @param limit FIXME + */ protected void parseURL(URL u, String spec, int start, int limit) { String host = u.getHost(); @@ -119,7 +129,15 @@ public abstract class URLStreamHandler return file; } - public boolean sameFile(URL url1, URL url2) + /** + * Compares two URLs, excluding the fragment component + * + * @param url1 The first url + * @param url2 The second url to compare with the first + * + * @specnote Now protected + */ + protected boolean sameFile(URL url1, URL url2) { if (url1 == url2) return true; @@ -143,12 +161,33 @@ public abstract class URLStreamHandler return true; } + /** + * 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 et + * @param port The port number to set + * @param file The filename to set + * @param ref The reference + * + * @exception SecurityException If the protocol handler of the URL is + * different from this one + * + * @deprecated 1.2 Please use + * #setURL(URL,String,String,int,String,String,String,String); + */ protected void setURL(URL u, String protocol, String host, int port, String file, String ref) { u.set(protocol, host, port, file, ref); } + /** + * Converts an URL of a specific protocol to a string + * + * @param u The URL to convert + */ protected String toExternalForm(URL u) { String resStr, host, file, ref; -- cgit v1.1