diff options
| author | Mark Wielaard <mark@gcc.gnu.org> | 2002-02-14 23:16:11 +0000 |
|---|---|---|
| committer | Mark Wielaard <mark@gcc.gnu.org> | 2002-02-14 23:16:11 +0000 |
| commit | 894286989e3b53d5c10f385763171672c1c0035c (patch) | |
| tree | 2b8e89cbcec8051aec3a4bab7d43c0c0d2c02ffe /libjava/java/net/DatagramSocketImpl.java | |
| parent | 9a360704f9edf14fd0dd3a04dcf16923164c09b2 (diff) | |
[multiple changes]
2002-02-14 Mark Wielaard <mark@klomp.org>
* java/math/BigInteger.java: import gnu.java.math.MPN not the whole
package as a workaround for gcj 3.0.x
2002-02-14 Mark Wielaard <mark@klomp.org>
* java/security/BasicPermission.java: extends with fully qualified
classname as workaround for gcj 3.0.4.
2002-02-14 Eric Blake <ebb9@email.byu.edu>
* java/net/DatagramSocketImpl.java (setOption, getOption): Work
around gcj bug of wrong emitted qualifier for inherited method.
* java/net/SocketImpl.java (setOption, getOption): Ditto.
* java/util/WeakHashMap.java (WeakEntrySet): Add non-private
constructor to reduce amount of emitted bytecode. While this
happens to work around a jikes 1.15 bug, it is still a useful
patch even for correct compilers.
* java/rmi/server/RMIClassLoader.java (MyClassLoader): Ditto.
* gnu/java/rmi/server/UnicastRemoteCall.java
(DummyObjectOutputStream, DummyObjectInputStream): Ditto.
2002-02-14 Eric Blake <ebb9@email.byu.edu>
* java/net/DatagramSocketImpl.java: Reformat (no code changes).
* java/net/SocketImpl.java: Ditto.
* java/rmi/server/RMIClassLoader.java: Ditto.
* gnu/java/rmi/server/UnicastRemoteCall.java: Ditto.
2002-02-14 Mark Wielaard <mark@klomp.org>
Thanks to Takashi Okamoto
* java/util/Arrays.java (ArrayList.indexOf()): this.equals().
* java/util/Arrays.java (ArrayList.lastIndexOf()): Likewise.
* java/util/WeakHashMap.java (WeakEntry.getEntry()): this.get().
From-SVN: r49778
Diffstat (limited to 'libjava/java/net/DatagramSocketImpl.java')
| -rw-r--r-- | libjava/java/net/DatagramSocketImpl.java | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/libjava/java/net/DatagramSocketImpl.java b/libjava/java/net/DatagramSocketImpl.java index c8d54527581..df6e1ecbf46 100644 --- a/libjava/java/net/DatagramSocketImpl.java +++ b/libjava/java/net/DatagramSocketImpl.java @@ -1,5 +1,5 @@ /* DatagramSocketImpl.java -- Abstract class for UDP socket implementations - Copyright (C) 1998, 1999 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify 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 @@ -45,10 +45,8 @@ import java.io.FileDescriptor; * 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 abstract class models a datagram socket implementation. An + * + * <p>This abstract class models a datagram socket implementation. An * actual implementation class would implement these methods, probably * via redirecting them to native code. * @@ -64,7 +62,7 @@ public abstract class DatagramSocketImpl implements SocketOptions protected int localPort; /** - * The FileDescriptor object for this object. + * The FileDescriptor object for this object. */ protected FileDescriptor fd; @@ -84,7 +82,7 @@ public abstract class DatagramSocketImpl implements SocketOptions * @exception SocketException If an error occurs */ protected abstract void bind(int lport, InetAddress laddr) - throws SocketException; + throws SocketException; /** * This methods closes the socket @@ -123,7 +121,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 + * arrives. The packet info in populated into the passed in * DatagramPacket object. * * @param p A place to store the incoming packet. @@ -152,7 +150,7 @@ public abstract class DatagramSocketImpl implements SocketOptions */ protected abstract byte getTTL() throws IOException; - /** + /** * Sets the Time to Live (TTL) setting on this socket to the specified * value. * @@ -179,7 +177,7 @@ public abstract class DatagramSocketImpl implements SocketOptions */ protected abstract void join(InetAddress inetaddr) throws IOException; - /** + /** * Causes the socket to leave the specified multicast group. * * @param inetaddr The multicast address to leave @@ -203,4 +201,36 @@ public abstract class DatagramSocketImpl implements SocketOptions { return localPort; } + + /** + * 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 + * <code>Integer</code>. For options that are set to on or off, the + * value passed will be a <code>Boolean</code>. The <code>option_id</code> + * parameter is one of the defined constants in the superinterface. + * + * @param option_id 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) + throws SocketException; + + /** + * Returns the current setting of the specified option. The + * <code>Object</code> returned will be an <code>Integer</code> for options + * that have integer values. For options that are set to on or off, a + * <code>Boolean</code> will be returned. The <code>option_id</code> + * is one of the defined constants in the superinterface. + * + * @param option_id The option identifier + * + * @return The current value of the option + * + * @exception SocketException If an error occurs + * @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. + */ + public abstract Object getOption(int option_id) throws SocketException; } |
