From: Michael Koch Date: Sun, 25 May 2003 11:40:19 +0000 (+0000) Subject: PushbackInputStream.java, [...]: Merged new versions from classpath. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7684ffe55c75b893fe40988dbb8fcea9beae3ba;p=gcc.git PushbackInputStream.java, [...]: Merged new versions from classpath. 2003-05-25 Michael Koch * java/io/PushbackInputStream.java, java/net/Authenticator.java, java/net/ContentHandler.java, java/net/ContentHandlerFactory.java, java/net/DatagramSocket.java, java/net/DatagramSocketImpl.java, java/net/DatagramSocketImplFactory.java, java/net/FileNameMap.java, java/net/SocketImplFactory.java, java/net/SocketOptions.java, java/net/URLStreamHandlerFactory.java: Merged new versions from classpath. From-SVN: r67165 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index a44d88f6271..be9100e20a5 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,18 @@ +2003-05-25 Michael Koch + + * java/io/PushbackInputStream.java, + java/net/Authenticator.java, + java/net/ContentHandler.java, + java/net/ContentHandlerFactory.java, + java/net/DatagramSocket.java, + java/net/DatagramSocketImpl.java, + java/net/DatagramSocketImplFactory.java, + java/net/FileNameMap.java, + java/net/SocketImplFactory.java, + java/net/SocketOptions.java, + java/net/URLStreamHandlerFactory.java: + Merged new versions from classpath. + 2003-05-25 Michael Koch * java/awt/Checkbox.java, diff --git a/libjava/java/io/PushbackInputStream.java b/libjava/java/io/PushbackInputStream.java index ffc582f9ecf..778babd2c0b 100644 --- a/libjava/java/io/PushbackInputStream.java +++ b/libjava/java/io/PushbackInputStream.java @@ -74,8 +74,8 @@ public class PushbackInputStream extends FilterInputStream /** * This method initializes a PushbackInputStream to - * read from the * specified subordinate InputStream - * with a default pushback buffer * size of 1. + * read from the specified subordinate InputStream + * with a default pushback buffer size of 1. * * @param in The subordinate stream to read from */ @@ -302,7 +302,7 @@ public class PushbackInputStream extends FilterInputStream * skip method on the underlying InputStream to * skip additional bytes if necessary. * - * @param num_bytes The requested number of bytes to skip + * @param numBytes The requested number of bytes to skip * * @return The actual number of bytes skipped. * diff --git a/libjava/java/net/Authenticator.java b/libjava/java/net/Authenticator.java index e1e322b3bb1..7592b525a50 100644 --- a/libjava/java/net/Authenticator.java +++ b/libjava/java/net/Authenticator.java @@ -1,5 +1,5 @@ /* Authenticator.java -- Abstract class for obtaining authentication info - Copyright (C) 1998,2000 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -43,12 +43,13 @@ package java.net; * some network operations (such as hitting a password protected * web site). *

- * To make use of this feature, a programmer must create a subclass of - * Authenticator that knows how to obtain the necessary info. An example + * 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 setDefault - * method of this class is called to set up that instance as the object - * to use on subsequent calls to obtain authorization. + * After creating an instance of that subclass, the static + * setDefault 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 * @@ -57,280 +58,252 @@ package java.net; */ public abstract class Authenticator { - -/*************************************************************************/ - -/* - * Class Variables - */ - -/** - * This is the default Authenticator object to use for password requests - */ -private static Authenticator default_authenticator; - -/*************************************************************************/ - -/* - * Instance Variables - */ - -/** - * The hostname of the site requesting authentication - */ -private String host; - -/** - * InternetAddress of the site requesting authentication - */ -private InetAddress addr; - -/** - * The port number of the site requesting authentication - */ -private int port; - -/** - * The protocol name of the site requesting authentication - */ -private String protocol; - -/** - * The prompt to display to the user when requesting authentication info - */ -private String prompt; - -/** - * The authentication scheme in use - */ -private String scheme; - -/*************************************************************************/ - -/* - * Class Methods - */ - -/** - * This method sets the default Authenticator object (an - * instance of a - * subclass of Authenticator) 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) - * and throws a SecurityException if it is not. - * - * @param def_auth The new default Authenticator object to use - * - * @exception SecurityException If the caller does not have permission - * to perform this operation - */ -public static void -setDefault(Authenticator def_auth) -{ - SecurityManager sm = System.getSecurityManager(); - if (sm != null) - sm.checkPermission(new NetPermission("setDefaultAuthenticator")); - - default_authenticator = def_auth; -} - -/*************************************************************************/ - -/** - * 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 Authenticator object, the method then returns - * null. Otherwise, the default authenticators's instance - * variables are initialized and it's getPasswordAuthentication - * 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 - * authentication info - * @param scheme The authentication scheme in use - * - * @return A PasswordAuthentication object with the user's - * authentication info. - * - * @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) - throws SecurityException -{ - return(requestPasswordAuthentication (null, addr, port, protocol, - prompt, scheme)); -} - -/** - * 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 Authenticator object, the method then returns - * null. Otherwise, the default authenticators's instance - * variables are initialized and it's getPasswordAuthentication - * method is called to get the actual authentication information to return. - * This method is the preferred one as it can be used with hostname - * when addr is unknown. - * - * @param host The hostname requesting authentication - * @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 - * authentication info - * @param scheme The authentication scheme in use - * - * @return A PasswordAuthentication object with the user's - * authentication info. - * - * @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) - throws SecurityException -{ - SecurityManager sm = System.getSecurityManager(); - if (sm != null) - sm.checkPermission(new NetPermission("requestPasswordAuthentication")); - - if (default_authenticator == null) + /* + * Class Variables + */ + + /** + * This is the default Authenticator object to use for password requests + */ + private static Authenticator defaultAuthenticator; + + /* + * Instance Variables + */ + + /** + * The hostname of the site requesting authentication + */ + private String host; + + /** + * InternetAddress of the site requesting authentication + */ + private InetAddress addr; + + /** + * The port number of the site requesting authentication + */ + private int port; + + /** + * The protocol name of the site requesting authentication + */ + private String protocol; + + /** + * The prompt to display to the user when requesting authentication info + */ + private String prompt; + + /** + * The authentication scheme in use + */ + private String scheme; + + /* + * Class Methods + */ + + /** + * This method sets the default Authenticator object (an + * instance of a subclass of Authenticator) 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) + * and throws a SecurityException if it is not. + * + * @param defAuth The new default Authenticator object to use + * + * @exception SecurityException If the caller does not have permission + * to perform this operation + */ + public static void setDefault(Authenticator defAuth) + { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) + 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 Authenticator object, the method then returns + * null. Otherwise, the default authenticators's instance + * variables are initialized and it's getPasswordAuthentication + * 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 + * authentication info + * @param scheme The authentication scheme in use + * + * @return A PasswordAuthentication object with the user's + * authentication info. + * + * @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) + throws SecurityException + { + return(requestPasswordAuthentication (null, addr, port, protocol, + prompt, scheme)); + } + + /** + * 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 Authenticator object, the method then returns + * null. Otherwise, the default authenticators's instance + * variables are initialized and it's getPasswordAuthentication + * method is called to get the actual authentication information to return. + * This method is the preferred one as it can be used with hostname + * when addr is unknown. + * + * @param host The hostname requesting authentication + * @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 + * authentication info + * @param scheme The authentication scheme in use + * + * @return A PasswordAuthentication object with the user's + * authentication info. + * + * @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) + throws SecurityException + { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) + sm.checkPermission(new NetPermission("requestPasswordAuthentication")); + + if (defaultAuthenticator == null) + return(null); + + defaultAuthenticator.host = host; + defaultAuthenticator.addr = addr; + defaultAuthenticator.port = port; + defaultAuthenticator.protocol = protocol; + defaultAuthenticator.prompt = prompt; + defaultAuthenticator.scheme = scheme; + + return(defaultAuthenticator.getPasswordAuthentication()); + } + + /* + * Constructors + */ + + /** + * Default, no-argument constructor for subclasses to call. + */ + public Authenticator() + { + } + + /* + * Instance Methods + */ + + /** + * This method returns the address of the site that is requesting + * authentication. + * + * @return The requesting site's address + */ + protected final InetAddress getRequestingSite() + { + return(addr); + } + + /** + * Returns the hostname of the host or proxy requesting authorization, + * or null if not available. + * + * @return The name of the host requesting authentication, or + * null if it is not available. + * + * @since 1.4 + */ + protected final String getRequestingHost() + { + return(host); + } + + /** + * This method returns the port of the site that is requesting + * authentication. + * + * @return The requesting port + */ + protected final int getRequestingPort() + { + return(port); + } + + /** + * This method returns the requesting protocol of the operation that is + * requesting authentication + * + * @return The requesting protocol + */ + protected final String getRequestingProtocol() + { + return(protocol); + } + + /** + * Returns the prompt that should be used when requesting authentication + * information from the user + * + * @return The user prompt + */ + protected final String getRequestingPrompt() + { + return(prompt); + } + + /** + * This method returns the authentication scheme in use + * + * @return The authentication scheme + */ + protected final String getRequestingScheme() + { + return(scheme); + } + + /** + * This method is called whenever a request for authentication is made. It + * can call the other getXXX methods to determine the information relevant + * to this request. Subclasses should override this method, which returns + * null by default. + * + * @return The PasswordAuthentication information + */ + protected PasswordAuthentication getPasswordAuthentication() + { return(null); - - default_authenticator.host = host; - default_authenticator.addr = addr; - default_authenticator.port = port; - default_authenticator.protocol = protocol; - default_authenticator.prompt = prompt; - default_authenticator.scheme = scheme; - - return(default_authenticator.getPasswordAuthentication()); -} - -/** - * Returns the hostname of the host or proxy requesting authorization, - * or null if not available. - * - * @since 1.4 - */ -protected final String getRequestingHost() -{ - return(host); -} - -/*************************************************************************/ - -/* - * Constructors - */ - -/** - * Default, no-argument constructor for subclasses to call. - */ -public -Authenticator() -{ -} - -/*************************************************************************/ - -/* - * Instance Methods - */ - -/** - * This method returns the address of the site that is requesting - * authentication. - * - * @return The requesting site - */ -protected final InetAddress -getRequestingSite() -{ - return(addr); -} - -/*************************************************************************/ - -/** - * This method returns the port of the site that is requesting - * authentication. - * - * @return The requesting port - */ -protected final int -getRequestingPort() -{ - return(port); -} - -/*************************************************************************/ - -/** - * This method returns the requesting protocol of the operation that is - * requesting authentication - * - * @return The requesting protocol - */ -protected final String -getRequestingProtocol() -{ - return(protocol); -} - -/*************************************************************************/ - -/** - * Returns the prompt that should be used when requesting authentication - * information from the user - * - * @return The user prompt - */ -protected final String -getRequestingPrompt() -{ - return(prompt); -} - -/*************************************************************************/ - -/** - * This method returns the authentication scheme in use - * - * @return The authentication scheme - */ -protected final String -getRequestingScheme() -{ - return(scheme); -} - -/*************************************************************************/ - -/** - * This method is called whenever a request for authentication is made. It - * can call the other getXXX methods to determine the information relevant - * to this request. Subclasses should override this method, which returns - * null by default. - * - * @return The PasswordAuthentication information - */ -protected PasswordAuthentication -getPasswordAuthentication() -{ - return(null); -} + } } // class Authenticator diff --git a/libjava/java/net/ContentHandler.java b/libjava/java/net/ContentHandler.java index ce8d7ee8bdd..ed746984775 100644 --- a/libjava/java/net/ContentHandler.java +++ b/libjava/java/net/ContentHandler.java @@ -1,5 +1,5 @@ /* ContentHandler.java -- Abstract class for handling content from URL's - Copyright (C) 1998, 1999 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,65 +59,69 @@ import java.io.IOException; */ public abstract class ContentHandler { - -/*************************************************************************/ - -/* - * Constructors - */ - -/** - * Default, no-argument constructor. - */ -public ContentHandler() { } - -/*************************************************************************/ - -/** - * This method reads from the InputStream of the passed in URL - * connection and uses the data downloaded to create an Object - * represening the content. For example, if the URL is pointing to a GIF - * file, this method might return an Image object. This method - * must be implemented by subclasses. - * - * @param urlc A URLConnection object to read data from. - * - * @return An object representing the data read - * - * @exception IOException If an error occurs - */ -public abstract Object getContent(URLConnection urlc) throws IOException; - -/*************************************************************************/ - -/** - * This method reads from the InputStream of the passed in URL - * connection and uses the data downloaded to create an Object - * represening the content. For example, if the URL is pointing to a GIF - * file, this method might return an Image object. This method - * must be implemented by subclasses. If the object doesnt match any type in - * classes it returns null. - * - * @param urlc A URLConnection object to read data from. - * - * @return An object representing the data read - * - * @exception IOException If an error occurs - * - * @since 1.3 - */ -public Object getContent(URLConnection urlc, Class[] classes) - throws IOException -{ - Object obj = getContent (urlc); - - for (int i = 0; i < classes.length; i++) - { - if (classes [i].isInstance (obj)) - return obj; - } - - return null; -} + /* + * Constructors + */ + + /** + * Default, no-argument constructor. + */ + public ContentHandler() + { + } + + /* + * Instance Methods + */ + + /** + * This method reads from the InputStream of the passed in URL + * connection and uses the data downloaded to create an Object + * represening the content. For example, if the URL is pointing to a GIF + * file, this method might return an Image object. This method + * must be implemented by subclasses. + * + * @param urlc A URLConnection object to read data from. + * + * @return An object representing the data read + * + * @exception IOException If an error occurs + */ + public abstract Object getContent(URLConnection urlc) + throws IOException; + + /** + * This method reads from the InputStream of the passed in URL + * connection and uses the data downloaded to create an Object + * represening the content. For example, if the URL is pointing to a GIF + * file, this method might return an Image 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 + * any of the supplied type, null is returned. + * + * @param urlc A URLConnection object to read data from. + * @param classes An array of types of objects that are candidate types + * for the data to be read. + * + * @return An object representing the data read, or null + * if the data does not match any of the candidate types. + * + * @exception IOException If an error occurs + * + * @since 1.3 + */ + public Object getContent(URLConnection urlc, Class[] classes) + throws IOException + { + Object obj = getContent (urlc); + + for (int i = 0; i < classes.length; i++) + { + if (classes [i].isInstance (obj)) + return obj; + } + + return null; + } } // class ContentHandler diff --git a/libjava/java/net/ContentHandlerFactory.java b/libjava/java/net/ContentHandlerFactory.java index d954f9ad440..04fa3f11945 100644 --- a/libjava/java/net/ContentHandlerFactory.java +++ b/libjava/java/net/ContentHandlerFactory.java @@ -1,5 +1,5 @@ /* ContentHandlerFactory.java -- Interface for creating content handlers - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,25 +45,24 @@ package java.net; */ /** - * This interface maps MIME types to ContentHandler objects. It consists - * of one method that, when passed a MIME type, returns a handler for that - * type. + * This interface maps MIME types to ContentHandler objects. + * It consists of one method that, when passed a MIME type, returns a + * handler for that type. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy */ public interface ContentHandlerFactory { -/** - * This method is passed a MIME type as a string and is responsible for - * returning the appropriate ContentType object. - * - * @param mime_type The MIME type to map to a ContentHandler - * - * @return The ContentHandler for the passed in MIME type - */ -ContentHandler -createContentHandler(String mime_type); + /** + * This method is passed a MIME type as a string and is responsible for + * returning the appropriate ContentHandler object. + * + * @param mimeType The MIME type to map to a ContentHandler + * + * @return The ContentHandler for the passed in MIME type + */ + public ContentHandler createContentHandler(String mimeType); } // interface ContentHandlerFactory diff --git a/libjava/java/net/DatagramSocket.java b/libjava/java/net/DatagramSocket.java index 45c15fdb6e0..d300f20df92 100644 --- a/libjava/java/net/DatagramSocket.java +++ b/libjava/java/net/DatagramSocket.java @@ -1,5 +1,5 @@ /* DatagramSocket.java -- A class to model UDP sockets - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,9 +94,11 @@ public class DatagramSocket private boolean closed = false; /** - * Creates a DatagramSocket from a specified DatagramSocketImpl instance + * Creates a DatagramSocket from a specified + * DatagramSocketImpl instance * - * @param impl The DatagramSocketImpl the socket will be created from + * @param impl The DatagramSocketImpl the socket will be + * created from * * @since 1.4 */ @@ -113,7 +115,7 @@ public class DatagramSocket * * @exception SocketException If an error occurs. * @exception SecurityException If a security manager exists and - * its checkListen method doesn't allow the operation. + * its checkListen method doesn't allow the operation. */ public DatagramSocket() throws SocketException { @@ -127,7 +129,7 @@ public class DatagramSocket * @param port The local port number to bind to. * * @exception SecurityException If a security manager exists and its - * checkListen method doesn't allow the operation. + * checkListen method doesn't allow the operation. * @exception SocketException If an error occurs. */ public DatagramSocket(int port) throws SocketException @@ -190,7 +192,7 @@ public class DatagramSocket * @param laddr The local address to bind to. * * @exception SecurityException If a security manager exists and its - * checkListen method doesn't allow the operation. + * checkListen method doesn't allow the operation. * @exception SocketException If an error occurs. * * @since 1.4 diff --git a/libjava/java/net/DatagramSocketImpl.java b/libjava/java/net/DatagramSocketImpl.java index 5a0aa3e4acd..d225645a88a 100644 --- a/libjava/java/net/DatagramSocketImpl.java +++ b/libjava/java/net/DatagramSocketImpl.java @@ -1,5 +1,6 @@ /* DatagramSocketImpl.java -- Abstract class for UDP socket implementations - Copyright (C) 1998, 1999 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 2000, 2001, + 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -102,8 +103,8 @@ public abstract class DatagramSocketImpl implements SocketOptions * Takes a peek at the next packet received in order to retrieve the * address of the sender * - * @param i The InetAddress to fill in with the information about the - * sender if the next packet + * @param i The InetAddress to fill in with the information + * about the sender if the next packet * * @return The port number of the sender of the packet * @@ -118,7 +119,7 @@ public abstract class DatagramSocketImpl implements SocketOptions * Takes a peek at the next packet received. This packet is not consumed. * With the next peekData/receive operation this packet will be read again. * - * @param p The DatagramPacket to fill in with the data sent. + * @param p The DatagramPacket to fill in with the data sent. * * @return The port number of the sender of the packet. * @@ -147,7 +148,7 @@ public abstract class DatagramSocketImpl implements SocketOptions /** * Receives a packet of data from the network Will block until a packet * arrives. The packet info in populated into the passed in - * DatagramPacket object. + * DatagramPacket object. * * @param p A place to store the incoming packet. * @@ -161,7 +162,7 @@ public abstract class DatagramSocketImpl implements SocketOptions /** * Connects the socket to a host specified by address and port. * - * @param address The InetAddress of the host to connect to + * @param address The InetAddress of the host to connect to * @param port The port number of the host to connect to * * @exception SocketException If an error occurs @@ -288,26 +289,26 @@ public abstract class DatagramSocketImpl implements SocketOptions * Sets the specified option on a socket to the passed in object. For * options that take an integer argument, the passed in object is an * Integer. For options that are set to on or off, the - * value passed will be a Boolean. The option_id + * value passed will be a Boolean. The optionId * parameter is one of the defined constants in the superinterface. * - * @param option_id The identifier of the option + * @param optionId The identifier of the option * @param val The value to set the option to * * @exception SocketException If an error occurs * @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. */ - public abstract void setOption(int option_id, Object val) + public abstract void setOption(int optionId, Object val) throws SocketException; /** * Returns the current setting of the specified option. The * Object returned will be an Integer for options * that have integer values. For options that are set to on or off, a - * Boolean will be returned. The option_id + * Boolean will be returned. The optionId * is one of the defined constants in the superinterface. * - * @param option_id The option identifier + * @param optionId The option identifier * * @return The current value of the option * diff --git a/libjava/java/net/DatagramSocketImplFactory.java b/libjava/java/net/DatagramSocketImplFactory.java index 60fe838458b..ab39dd45786 100644 --- a/libjava/java/net/DatagramSocketImplFactory.java +++ b/libjava/java/net/DatagramSocketImplFactory.java @@ -1,5 +1,5 @@ /* DatagramSocketImplFactory.java - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,7 +42,8 @@ package java.net; */ /** - * This interface defines one method which returns a DatagramSocketImpl object. + * This interface defines one method which returns a + * DatagramSocketImpl object. * This should not be needed by ordinary applications. * * @author Michael Koch @@ -55,5 +56,5 @@ public interface DatagramSocketImplFactory * * @return A DatagramSocketImpl object */ - DatagramSocketImpl createDatagramSocketImpl(); + public DatagramSocketImpl createDatagramSocketImpl(); } // interface DatagramSocketImplFactory diff --git a/libjava/java/net/FileNameMap.java b/libjava/java/net/FileNameMap.java index 538dbe8e19a..b4f9e19160c 100644 --- a/libjava/java/net/FileNameMap.java +++ b/libjava/java/net/FileNameMap.java @@ -1,5 +1,5 @@ /* FileNameMap.java -- Maps filenames to MIME types - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,16 +54,15 @@ package java.net; */ public interface FileNameMap { -/** - * This method is passed a filename and is responsible for determining - * the appropriate MIME type for that file. - * - * @param filename The name of the file to generate a MIME type for. - * - * @return The MIME type for the filename passed in. - */ -String -getContentTypeFor(String filename); + /** + * This method is passed a filename and is responsible for determining + * the appropriate MIME type for that file. + * + * @param filename The name of the file to generate a MIME type for. + * + * @return The MIME type for the filename passed in. + */ + public String getContentTypeFor(String filename); } // interface FileNameMap diff --git a/libjava/java/net/SocketImplFactory.java b/libjava/java/net/SocketImplFactory.java index f9b3f418670..fc5de7a0851 100644 --- a/libjava/java/net/SocketImplFactory.java +++ b/libjava/java/net/SocketImplFactory.java @@ -1,5 +1,5 @@ /* SocketImplFactory.java -- Interface to create a SocketImpl object - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -43,21 +43,20 @@ package java.net; */ /** - * This interface defines one method which returns a SocketImpl object. - * This should not be needed by ordinary applications. + * This interface defines one method which returns a SocketImpl + * object. This should not be needed by ordinary applications. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner */ public interface SocketImplFactory { -/** - * This method returns an instance of the SocketImpl object - * - * @return A SocketImpl object - */ -SocketImpl -createSocketImpl(); + /** + * This method returns an instance of the SocketImpl object + * + * @return A SocketImpl object + */ + public SocketImpl createSocketImpl(); } // interface SocketImplFactory diff --git a/libjava/java/net/SocketOptions.java b/libjava/java/net/SocketOptions.java index f62afef9aab..b0404e8409c 100644 --- a/libjava/java/net/SocketOptions.java +++ b/libjava/java/net/SocketOptions.java @@ -1,5 +1,6 @@ /* SocketOptions.java -- Implements options for sockets (duh!) - Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, + 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -138,30 +139,30 @@ public interface SocketOptions * Sets the specified option on a socket to the passed in object. For * options that take an integer argument, the passed in object is an * Integer. For options that are set to on or off, the - * value passed will be a Boolean. The option_id + * value passed will be a Boolean. The optionId * parameter is one of the defined constants in this interface. * - * @param option_id The identifier of the option + * @param optionId The identifier of the option * @param val The value to set the option to * * @exception SocketException If an error occurs */ - void setOption(int option_id, Object val) throws SocketException; + void setOption(int optionId, Object val) throws SocketException; /** * Returns the current setting of the specified option. The * Object returned will be an Integer for options * that have integer values. For options that are set to on or off, a - * Boolean will be returned. The option_id - * is one of the defined constants in this interface. + * Boolean will be returned. The optionId + * parameter is one of the defined constants in this interface. * - * @param option_id The option identifier + * @param optionId The option identifier * * @return The current value of the option * * @exception SocketException If an error occurs */ - Object getOption(int option_id) throws SocketException; + Object getOption(int optionId) throws SocketException; } // interface SocketOptions diff --git a/libjava/java/net/URLStreamHandlerFactory.java b/libjava/java/net/URLStreamHandlerFactory.java index 1e67d1d37b7..a9ecbad8f06 100644 --- a/libjava/java/net/URLStreamHandlerFactory.java +++ b/libjava/java/net/URLStreamHandlerFactory.java @@ -1,5 +1,5 @@ /* URLStreamHandlerFactory.java -- Maps protocols to URLStreamHandlers - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -46,23 +46,22 @@ package java.net; /** * This interface contains one method which maps the protocol portion of * a URL (eg, "http" in "http://www.urbanophile.com/arenn/") to a - * URLStreamHandler object. + * URLStreamHandler object. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy */ public interface URLStreamHandlerFactory { -/** - * This method maps the protocol portion of a URL to a URLStreamHandler - * object. - * - * @param protocol The protocol name to map ("http", "ftp", etc). - * - * @return The URLStreamHandler for the specified protocol - */ -URLStreamHandler -createURLStreamHandler(String protocol); + /** + * This method maps the protocol portion of a URL to a + * URLStreamHandler object. + * + * @param protocol The protocol name to map ("http", "ftp", etc). + * + * @return The URLStreamHandler for the specified protocol + */ + public URLStreamHandler createURLStreamHandler(String protocol); } // interface URLStreamHandlerFactory