summaryrefslogtreecommitdiff
path: root/libjava/java/net/DatagramSocketImpl.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-04-20 13:05:10 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-04-20 13:05:10 +0000
commitf6d49f66ec0e0a59285d304720cc3bfa18f28141 (patch)
tree61e0c356000f77339048c144863ae045f79523eb /libjava/java/net/DatagramSocketImpl.java
parentcf6f7d55897e0c6b1badbcfc241e512a4bb154b8 (diff)
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de> * java/net/Authenticator.java, java/net/BindException.java, java/net/ConnectException.java, java/net/ContentHandler.java, java/net/ContentHandlerFactory.java, java/net/DatagramPacket.java, java/net/DatagramSocket.java, java/net/DatagramSocketImpl.java, java/net/DatagramSocketImplFactory.java, java/net/FileNameMap.java, java/net/HttpURLConnection.java, java/net/Inet4Address.java, java/net/Inet6Address.java, java/net/InetAddress.java, java/net/InetSocketAddress.java, java/net/JarURLConnection.java, java/net/MalformedURLException.java, java/net/MulticastSocket.java, java/net/NetPermission.java, java/net/NetworkInterface.java, java/net/NoRouteToHostException.java, java/net/PasswordAuthentication.java, java/net/PortUnreachableException.java, java/net/ProtocolException.java, java/net/ServerSocket.java, java/net/Socket.java, java/net/SocketAddress.java, java/net/SocketException.java, java/net/SocketImpl.java, java/net/SocketImplFactory.java, java/net/SocketOptions.java, java/net/SocketPermission.java, java/net/SocketTimeoutException.java, java/net/URI.java, java/net/URISyntaxException.java, java/net/URL.java, java/net/URLClassLoader.java, java/net/URLConnection.java, java/net/URLDecoder.java, java/net/URLEncoder.java, java/net/URLStreamHandler.java, java/net/URLStreamHandlerFactory.java, java/net/UnknownHostException.java, java/net/UnknownServiceException.java: Fixed javadocs, coding style and argument names all over. From-SVN: r80900
Diffstat (limited to 'libjava/java/net/DatagramSocketImpl.java')
-rw-r--r--libjava/java/net/DatagramSocketImpl.java55
1 files changed, 32 insertions, 23 deletions
diff --git a/libjava/java/net/DatagramSocketImpl.java b/libjava/java/net/DatagramSocketImpl.java
index 891c8d183b5..0c21e2410d8 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,
+ Copyright (C) 1998, 1999 2000, 2001,
2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -36,11 +36,11 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package java.net;
-import java.io.IOException;
import java.io.FileDescriptor;
+import java.io.IOException;
+
/**
* This abstract class models a datagram socket implementation. An
@@ -58,7 +58,6 @@ import java.io.FileDescriptor;
*/
public abstract class DatagramSocketImpl implements SocketOptions
{
-
/**
* The local port to which this socket is bound
*/
@@ -103,7 +102,7 @@ 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 <code>InetAddress</code> to fill in with the information
+ * @param i The <code>InetAddress</code> to fill in with the information
* about the sender if the next packet
*
* @return The port number of the sender of the packet
@@ -118,19 +117,19 @@ 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 <code>DatagramPacket</code> to fill in with the data sent.
*
* @return The port number of the sender of the packet.
- *
+ *
* @exception IOException If an error occurs
* @exception PortUnreachableException May be thrown if the socket is
* connected to a currently unreachable destination. Note, there is no
* guarantee that the exception will be thrown.
- *
+ *
* @since 1.4
*/
- protected abstract int peekData (DatagramPacket p) throws IOException;
+ protected abstract int peekData(DatagramPacket p) throws IOException;
/**
* Transmits the specified packet of data to the network. The destination
@@ -169,17 +168,18 @@ public abstract class DatagramSocketImpl implements SocketOptions
*
* @since 1.4
*/
- protected void connect (InetAddress address, int port) throws SocketException
+ protected void connect(InetAddress address, int port)
+ throws SocketException
{
// This method has to be overwritten by real implementations
}
/**
* Disconnects the socket.
- *
+ *
* @since 1.4
*/
- protected void disconnect ()
+ protected void disconnect()
{
// This method has to be overwritten by real implementations
}
@@ -199,8 +199,11 @@ public abstract class DatagramSocketImpl implements SocketOptions
* This method returns the current Time to Live (TTL) setting on this
* socket. <b>Use <code>getTimeToLive()</code></b> instead.
*
+ * @return the current time-to-live
+ *
* @exception IOException If an error occurs
- * @deprecated
+ *
+ * @deprecated // FIXME: when ?
*/
protected abstract byte getTTL() throws IOException;
@@ -218,6 +221,8 @@ public abstract class DatagramSocketImpl implements SocketOptions
* This method returns the current Time to Live (TTL) setting on this
* socket.
*
+ * @return the current time-to-live
+ *
* @exception IOException If an error occurs
*/
protected abstract int getTimeToLive() throws IOException;
@@ -242,35 +247,37 @@ public abstract class DatagramSocketImpl implements SocketOptions
/**
* Causes this socket to join the specified multicast group on a specified
- * device
- *
+ * device
+ *
* @param mcastaddr The address to leave
* @param netIf The specified network interface to join the group at
*
* @exception IOException If an error occurs
- *
+ *
* @since 1.4
*/
- protected abstract void joinGroup (SocketAddress mcastaddr,
- NetworkInterface netIf)
+ protected abstract void joinGroup(SocketAddress mcastaddr,
+ NetworkInterface netIf)
throws IOException;
/**
* Leaves a multicast group
- *
+ *
* @param mcastaddr The address to join
* @param netIf The specified network interface to leave the group at
*
* @exception IOException If an error occurs
- *
+ *
* @since 1.4
*/
- protected abstract void leaveGroup (SocketAddress mcastaddr,
- NetworkInterface netIf)
+ protected abstract void leaveGroup(SocketAddress mcastaddr,
+ NetworkInterface netIf)
throws IOException;
-
+
/**
* Returns the FileDescriptor for this socket
+ *
+ * @return the file descriptor associated with this socket
*/
protected FileDescriptor getFileDescriptor()
{
@@ -279,6 +286,8 @@ public abstract class DatagramSocketImpl implements SocketOptions
/**
* Returns the local port this socket is bound to
+ *
+ * @return the local port
*/
protected int getLocalPort()
{