mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
2002-09-25 Michael Koch <konqueror@gmx.de>
* 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
This commit is contained in:
committed by
Michael Koch
parent
33c31b33b5
commit
df79dc1a89
@@ -10,6 +10,8 @@ details. */
|
||||
|
||||
package java.net;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author Warren Levy <warrenl@cygnus.com>
|
||||
* @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;
|
||||
|
||||
Reference in New Issue
Block a user