jdk/src/share/classes/java/net/MulticastSocket.java
changeset 19069 1d9cb0d080e3
parent 18156 edb590d448c5
child 21334 c60dfce46a77
--- a/jdk/src/share/classes/java/net/MulticastSocket.java	Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/MulticastSocket.java	Tue Jul 30 11:04:19 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
      * Create a multicast socket.
      *
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
+     * its {@code checkListen} method is first called
      * with 0 as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      * <p>
@@ -103,7 +103,7 @@
      * @exception IOException if an I/O exception occurs
      * while creating the MulticastSocket
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      * @see SecurityManager#checkListen
      * @see java.net.DatagramSocket#setReuseAddress(boolean)
      */
@@ -115,8 +115,8 @@
      * Create a multicast socket and bind it to a specific port.
      *
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
-     * with the <code>port</code> argument
+     * its {@code checkListen} method is first called
+     * with the {@code port} argument
      * as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      * <p>
@@ -128,7 +128,7 @@
      * @exception IOException if an I/O exception occurs
      * while creating the MulticastSocket
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      * @see SecurityManager#checkListen
      * @see java.net.DatagramSocket#setReuseAddress(boolean)
      */
@@ -139,10 +139,10 @@
     /**
      * Create a MulticastSocket bound to the specified socket address.
      * <p>
-     * Or, if the address is <code>null</code>, create an unbound socket.
+     * Or, if the address is {@code null}, create an unbound socket.
      * <p>
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
+     * its {@code checkListen} method is first called
      * with the SocketAddress port as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      * <p>
@@ -150,12 +150,12 @@
      * {@link DatagramSocket#setReuseAddress(boolean)} method is
      * called to enable the SO_REUSEADDR socket option.
      *
-     * @param bindaddr Socket address to bind to, or <code>null</code> for
+     * @param bindaddr Socket address to bind to, or {@code null} for
      *                 an unbound socket.
      * @exception IOException if an I/O exception occurs
      * while creating the MulticastSocket
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      * @see SecurityManager#checkListen
      * @see java.net.DatagramSocket#setReuseAddress(boolean)
      *
@@ -197,7 +197,7 @@
 
     /**
      * Set the default time-to-live for multicast packets sent out
-     * on this <code>MulticastSocket</code> in order to control the
+     * on this {@code MulticastSocket} in order to control the
      * scope of the multicasts.
      *
      * <p>The ttl is an <b>unsigned</b> 8-bit quantity, and so <B>must</B> be
@@ -279,11 +279,11 @@
 
     /**
      * Joins a multicast group. Its behavior may be affected by
-     * <code>setInterface</code> or <code>setNetworkInterface</code>.
+     * {@code setInterface} or {@code setNetworkInterface}.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkMulticast</code> method
-     * with the <code>mcastaddr</code> argument
+     * calls its {@code checkMulticast} method
+     * with the {@code mcastaddr} argument
      * as its argument.
      *
      * @param mcastaddr is the multicast address to join
@@ -291,7 +291,7 @@
      * @exception IOException if there is an error joining
      * or when the address is not a multicast address.
      * @exception  SecurityException  if a security manager exists and its
-     * <code>checkMulticast</code> method doesn't allow the join.
+     * {@code checkMulticast} method doesn't allow the join.
      *
      * @see SecurityManager#checkMulticast(InetAddress)
      */
@@ -325,18 +325,18 @@
 
     /**
      * Leave a multicast group. Its behavior may be affected by
-     * <code>setInterface</code> or <code>setNetworkInterface</code>.
+     * {@code setInterface} or {@code setNetworkInterface}.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkMulticast</code> method
-     * with the <code>mcastaddr</code> argument
+     * calls its {@code checkMulticast} method
+     * with the {@code mcastaddr} argument
      * as its argument.
      *
      * @param mcastaddr is the multicast address to leave
      * @exception IOException if there is an error leaving
      * or when the address is not a multicast address.
      * @exception  SecurityException  if a security manager exists and its
-     * <code>checkMulticast</code> method doesn't allow the operation.
+     * {@code checkMulticast} method doesn't allow the operation.
      *
      * @see SecurityManager#checkMulticast(InetAddress)
      */
@@ -362,8 +362,8 @@
      * Joins the specified multicast group at the specified interface.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkMulticast</code> method
-     * with the <code>mcastaddr</code> argument
+     * calls its {@code checkMulticast} method
+     * with the {@code mcastaddr} argument
      * as its argument.
      *
      * @param mcastaddr is the multicast address to join
@@ -375,7 +375,7 @@
      * @exception IOException if there is an error joining
      * or when the address is not a multicast address.
      * @exception  SecurityException  if a security manager exists and its
-     * <code>checkMulticast</code> method doesn't allow the join.
+     * {@code checkMulticast} method doesn't allow the join.
      * @throws  IllegalArgumentException if mcastaddr is null or is a
      *          SocketAddress subclass not supported by this socket
      *
@@ -410,8 +410,8 @@
      * Leave a multicast group on a specified local interface.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkMulticast</code> method
-     * with the <code>mcastaddr</code> argument
+     * calls its {@code checkMulticast} method
+     * with the {@code mcastaddr} argument
      * as its argument.
      *
      * @param mcastaddr is the multicast address to leave
@@ -422,7 +422,7 @@
      * @exception IOException if there is an error leaving
      * or when the address is not a multicast address.
      * @exception  SecurityException  if a security manager exists and its
-     * <code>checkMulticast</code> method doesn't allow the operation.
+     * {@code checkMulticast} method doesn't allow the operation.
      * @throws  IllegalArgumentException if mcastaddr is null or is a
      *          SocketAddress subclass not supported by this socket
      *
@@ -478,7 +478,7 @@
      * Retrieve the address of the network interface used for
      * multicast packets.
      *
-     * @return An <code>InetAddress</code> representing
+     * @return An {@code InetAddress} representing
      *  the address of the network interface used for
      *  multicast packets.
      *
@@ -562,7 +562,7 @@
      *
      * @exception SocketException if there is an error in
      * the underlying protocol, such as a TCP error.
-     * @return the multicast <code>NetworkInterface</code> currently set
+     * @return the multicast {@code NetworkInterface} currently set
      * @see #setNetworkInterface(NetworkInterface)
      * @since 1.4
      */
@@ -587,7 +587,7 @@
      * <p>Because this option is a hint, applications that want to
      * verify what loopback mode is set to should call
      * {@link #getLoopbackMode()}
-     * @param disable <code>true</code> to disable the LoopbackMode
+     * @param disable {@code true} to disable the LoopbackMode
      * @throws SocketException if an error occurs while setting the value
      * @since 1.4
      * @see #getLoopbackMode
@@ -615,18 +615,18 @@
      * otherwise it is preferable to set a TTL once on the socket, and
      * use that default TTL for all packets.  This method does <B>not
      * </B> alter the default TTL for the socket. Its behavior may be
-     * affected by <code>setInterface</code>.
+     * affected by {@code setInterface}.
      *
      * <p>If there is a security manager, this method first performs some
-     * security checks. First, if <code>p.getAddress().isMulticastAddress()</code>
+     * security checks. First, if {@code p.getAddress().isMulticastAddress()}
      * is true, this method calls the
-     * security manager's <code>checkMulticast</code> method
-     * with <code>p.getAddress()</code> and <code>ttl</code> as its arguments.
+     * security manager's {@code checkMulticast} method
+     * with {@code p.getAddress()} and {@code ttl} as its arguments.
      * If the evaluation of that expression is false,
      * this method instead calls the security manager's
-     * <code>checkConnect</code> method with arguments
-     * <code>p.getAddress().getHostAddress()</code> and
-     * <code>p.getPort()</code>. Each call to a security manager method
+     * {@code checkConnect} method with arguments
+     * {@code p.getAddress().getHostAddress()} and
+     * {@code p.getPort()}. Each call to a security manager method
      * could result in a SecurityException if the operation is not allowed.
      *
      * @param p is the packet to be sent. The packet should contain
@@ -639,7 +639,7 @@
      * @exception IOException is raised if an error occurs i.e
      * error while setting ttl.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkMulticast</code> or <code>checkConnect</code>
+     *             {@code checkMulticast} or {@code checkConnect}
      *             method doesn't allow the send.
      *
      * @deprecated Use the following code or its equivalent instead: