diff --git a/jdk/src/share/classes/java/net/Authenticator.java b/jdk/src/share/classes/java/net/Authenticator.java index bc9945c5ddb..28df05ca0d3 100644 --- a/jdk/src/share/classes/java/net/Authenticator.java +++ b/jdk/src/share/classes/java/net/Authenticator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -103,17 +103,17 @@ class Authenticator { * Sets the authenticator that will be used by the networking code * when a proxy or an HTTP server asks for authentication. *
- * First, if there is a security manager, its checkPermission
+ * First, if there is a security manager, its {@code checkPermission}
* method is called with a
- * NetPermission("setDefaultAuthenticator") permission.
+ * {@code NetPermission("setDefaultAuthenticator")} permission.
* This may result in a java.lang.SecurityException.
*
- * @param a The authenticator to be set. If a is null then
+ * @param a The authenticator to be set. If a is {@code null} then
* any previously set authenticator is removed.
*
* @throws SecurityException
* if a security manager exists and its
- * checkPermission method doesn't allow
+ * {@code checkPermission} method doesn't allow
* setting the default authenticator.
*
* @see SecurityManager#checkPermission
@@ -134,9 +134,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system
* for a password.
*
- * First, if there is a security manager, its checkPermission
+ * First, if there is a security manager, its {@code checkPermission}
* method is called with a
- * NetPermission("requestPasswordAuthentication") permission.
+ * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param addr The InetAddress of the site requesting authorization,
@@ -151,7 +151,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
- * checkPermission method doesn't allow
+ * {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
@@ -193,9 +193,9 @@ class Authenticator {
* because the hostname can be provided in cases where the InetAddress
* is not available.
*
- * First, if there is a security manager, its checkPermission
+ * First, if there is a security manager, its {@code checkPermission}
* method is called with a
- * NetPermission("requestPasswordAuthentication") permission.
+ * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
@@ -211,7 +211,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
- * checkPermission method doesn't allow
+ * {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
@@ -254,9 +254,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system
* for a password.
*
- * First, if there is a security manager, its checkPermission
+ * First, if there is a security manager, its {@code checkPermission}
* method is called with a
- * NetPermission("requestPasswordAuthentication") permission.
+ * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
@@ -275,7 +275,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
- * checkPermission method doesn't allow
+ * {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
@@ -320,8 +320,8 @@ class Authenticator {
}
/**
- * Gets the hostname of the
- * site or proxy requesting authentication, or null
+ * Gets the {@code hostname} of the
+ * site or proxy requesting authentication, or {@code null}
* if not available.
*
* @return the hostname of the connection requiring authentication, or null
@@ -333,8 +333,8 @@ class Authenticator {
}
/**
- * Gets the InetAddress of the
- * site requesting authorization, or null
+ * Gets the {@code InetAddress} of the
+ * site requesting authorization, or {@code null}
* if not available.
*
* @return the InetAddress of the site requesting authorization, or null
@@ -346,7 +346,7 @@ class Authenticator {
/**
* Gets the port number for the requested connection.
- * @return an int indicating the
+ * @return an {@code int} indicating the
* port for the requested connection.
*/
protected final int getRequestingPort() {
diff --git a/jdk/src/share/classes/java/net/ContentHandler.java b/jdk/src/share/classes/java/net/ContentHandler.java
index 79bcb0a30ca..8c585cbf354 100644
--- a/jdk/src/share/classes/java/net/ContentHandler.java
+++ b/jdk/src/share/classes/java/net/ContentHandler.java
@@ -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
@@ -28,21 +28,21 @@ package java.net;
import java.io.IOException;
/**
- * The abstract class ContentHandler is the superclass
- * of all classes that read an Object from a
- * URLConnection.
+ * The abstract class {@code ContentHandler} is the superclass
+ * of all classes that read an {@code Object} from a
+ * {@code URLConnection}.
*
* An application does not generally call the
- * getContent method in this class directly. Instead, an
- * application calls the getContent method in class
- * URL or in URLConnection.
+ * {@code getContent} method in this class directly. Instead, an
+ * application calls the {@code getContent} method in class
+ * {@code URL} or in {@code URLConnection}.
* The application's content handler factory (an instance of a class that
- * implements the interface ContentHandlerFactory set
- * up by a call to setContentHandler) is
- * called with a String giving the MIME type of the
+ * implements the interface {@code ContentHandlerFactory} set
+ * up by a call to {@code setContentHandler}) is
+ * called with a {@code String} giving the MIME type of the
* object being received on the socket. The factory returns an
- * instance of a subclass of ContentHandler, and its
- * getContent method is called to create the object.
+ * instance of a subclass of {@code ContentHandler}, and its
+ * {@code getContent} method is called to create the object.
*
* If no content handler could be found, URLConnection will
* look for a content handler in a user-defineable set of places.
@@ -75,7 +75,7 @@ abstract public class ContentHandler {
* creates an object from it.
*
* @param urlc a URL connection.
- * @return the object read by the ContentHandler.
+ * @return the object read by the {@code ContentHandler}.
* @exception IOException if an I/O error occurs while reading the object.
*/
abstract public Object getContent(URLConnection urlc) throws IOException;
@@ -90,7 +90,7 @@ abstract public class ContentHandler {
*
* @param urlc a URL connection.
* @param classes an array of types requested
- * @return the object read by the ContentHandler that is
+ * @return the object read by the {@code ContentHandler} that is
* the first match of the suggested types.
* null if none of the requested are supported.
* @exception IOException if an I/O error occurs while reading the object.
diff --git a/jdk/src/share/classes/java/net/ContentHandlerFactory.java b/jdk/src/share/classes/java/net/ContentHandlerFactory.java
index 69a909c5795..64112e3a806 100644
--- a/jdk/src/share/classes/java/net/ContentHandlerFactory.java
+++ b/jdk/src/share/classes/java/net/ContentHandlerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1997, 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
@@ -28,10 +28,10 @@ package java.net;
/**
* This interface defines a factory for content handlers. An
* implementation of this interface should map a MIME type into an
- * instance of ContentHandler.
+ * instance of {@code ContentHandler}.
*
- * This interface is used by the URLStreamHandler class
- * to create a ContentHandler for a MIME type.
+ * This interface is used by the {@code URLStreamHandler} class
+ * to create a {@code ContentHandler} for a MIME type.
*
* @author James Gosling
* @see java.net.ContentHandler
@@ -40,13 +40,13 @@ package java.net;
*/
public interface ContentHandlerFactory {
/**
- * Creates a new ContentHandler to read an object from
- * a URLStreamHandler.
+ * Creates a new {@code ContentHandler} to read an object from
+ * a {@code URLStreamHandler}.
*
* @param mimetype the MIME type for which a content handler is desired.
- * @return a new ContentHandler to read an object from a
- * URLStreamHandler.
+ * @return a new {@code ContentHandler} to read an object from a
+ * {@code URLStreamHandler}.
* @see java.net.ContentHandler
* @see java.net.URLStreamHandler
*/
diff --git a/jdk/src/share/classes/java/net/CookieHandler.java b/jdk/src/share/classes/java/net/CookieHandler.java
index 3fbc5bc1ce1..ef91d009feb 100644
--- a/jdk/src/share/classes/java/net/CookieHandler.java
+++ b/jdk/src/share/classes/java/net/CookieHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -66,7 +66,7 @@ public abstract class CookieHandler {
* there is no system-wide cookie handler currently set.
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}("getCookieHandler")
+ * {@link NetPermission}{@code ("getCookieHandler")}
* @see #setDefault(CookieHandler)
*/
public synchronized static CookieHandler getDefault() {
@@ -83,10 +83,10 @@ public abstract class CookieHandler {
* Note: non-standard http protocol handlers may ignore this setting.
*
* @param cHandler The HTTP cookie handler, or
- * null to unset.
+ * {@code null} to unset.
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}("setCookieHandler")
+ * {@link NetPermission}{@code ("setCookieHandler")}
* @see #getDefault()
*/
public synchronized static void setDefault(CookieHandler cHandler) {
@@ -114,7 +114,7 @@ public abstract class CookieHandler {
* called after all request headers related to choosing cookies
* are added, and before the request is sent.
URI representing the intended use for the
+ * @param uri a {@code URI} representing the intended use for the
* cookies
* @param requestHeaders - a Map from request header
* field names to lists of field values representing
@@ -136,7 +136,7 @@ public abstract class CookieHandler {
* fields that are named Set-Cookie2, present in the response
* headers into a cookie cache.
*
- * @param uri a URI where the cookies come from
+ * @param uri a {@code URI} where the cookies come from
* @param responseHeaders an immutable map from field names to
* lists of field values representing the response
* header fields returned
diff --git a/jdk/src/share/classes/java/net/CookieManager.java b/jdk/src/share/classes/java/net/CookieManager.java
index b8cae55342b..bb80f0a7f25 100644
--- a/jdk/src/share/classes/java/net/CookieManager.java
+++ b/jdk/src/share/classes/java/net/CookieManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -131,7 +131,7 @@ public class CookieManager extends CookieHandler
*
* This constructor will create new cookie manager with default * cookie store and accept policy. The effect is same as - * CookieManager(null, null). + * {@code CookieManager(null, null)}. */ public CookieManager() { this(null, null); @@ -141,12 +141,12 @@ public class CookieManager extends CookieHandler /** * Create a new cookie manager with specified cookie store and cookie policy. * - * @param store a CookieStore to be used by cookie manager. - * if null, cookie manager will use a default one, + * @param store a {@code CookieStore} to be used by cookie manager. + * if {@code null}, cookie manager will use a default one, * which is an in-memory CookieStore implmentation. - * @param cookiePolicy a CookiePolicy instance + * @param cookiePolicy a {@code CookiePolicy} instance * to be used by cookie manager as policy callback. - * if null, ACCEPT_ORIGINAL_SERVER will + * if {@code null}, ACCEPT_ORIGINAL_SERVER will * be used. */ public CookieManager(CookieStore store, @@ -170,11 +170,11 @@ public class CookieManager extends CookieHandler /** * To set the cookie policy of this cookie manager. * - *
A instance of CookieManager will have + *
A instance of {@code CookieManager} will have * cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always * can call this method to set another cookie policy. * - * @param cookiePolicy the cookie policy. Can be null, which + * @param cookiePolicy the cookie policy. Can be {@code null}, which * has no effects on current cookie policy. */ public void setCookiePolicy(CookiePolicy cookiePolicy) { diff --git a/jdk/src/share/classes/java/net/CookiePolicy.java b/jdk/src/share/classes/java/net/CookiePolicy.java index 3de98f904da..80948359153 100644 --- a/jdk/src/share/classes/java/net/CookiePolicy.java +++ b/jdk/src/share/classes/java/net/CookiePolicy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -71,8 +71,8 @@ public interface CookiePolicy { * * @param uri the URI to consult accept policy with * @param cookie the HttpCookie object in question - * @return true if this cookie should be accepted; - * otherwise, false + * @return {@code true} if this cookie should be accepted; + * otherwise, {@code false} */ public boolean shouldAccept(URI uri, HttpCookie cookie); } diff --git a/jdk/src/share/classes/java/net/CookieStore.java b/jdk/src/share/classes/java/net/CookieStore.java index 89b9c41dd01..648817e4b52 100644 --- a/jdk/src/share/classes/java/net/CookieStore.java +++ b/jdk/src/share/classes/java/net/CookieStore.java @@ -32,8 +32,8 @@ import java.util.Map; * A CookieStore object represents a storage for cookie. Can store and retrieve * cookies. * - *
{@link CookieManager} will call CookieStore.add to save cookies - * for every incoming HTTP response, and call CookieStore.get to + *
{@link CookieManager} will call {@code CookieStore.add} to save cookies
+ * for every incoming HTTP response, and call {@code CookieStore.get} to
* retrieve cookie for every outgoing HTTP request. A CookieStore
* is responsible for removing HttpCookie instances which have expired.
*
@@ -55,11 +55,11 @@ public interface CookieStore {
* then it is replaced with the new one.
*
* @param uri the uri this cookie associated with.
- * if null, this cookie will not be associated
+ * if {@code null}, this cookie will not be associated
* with an URI
* @param cookie the cookie to store
*
- * @throws NullPointerException if cookie is null
+ * @throws NullPointerException if {@code cookie} is {@code null}
*
* @see #get
*
@@ -77,7 +77,7 @@ public interface CookieStore {
*
* @param uri the uri associated with the cookies to be returned
*
- * @throws NullPointerException if uri is null
+ * @throws NullPointerException if {@code uri} is {@code null}
*
* @see #add
*
@@ -108,14 +108,14 @@ public interface CookieStore {
* Remove a cookie from store.
*
* @param uri the uri this cookie associated with.
- * if null, the cookie to be removed is not associated
- * with an URI when added; if not null, the cookie
+ * if {@code null}, the cookie to be removed is not associated
+ * with an URI when added; if not {@code null}, the cookie
* to be removed is associated with the given URI when added.
* @param cookie the cookie to remove
*
- * @return true if this store contained the specified cookie
+ * @return {@code true} if this store contained the specified cookie
*
- * @throws NullPointerException if cookie is null
+ * @throws NullPointerException if {@code cookie} is {@code null}
*/
public boolean remove(URI uri, HttpCookie cookie);
@@ -123,7 +123,7 @@ public interface CookieStore {
/**
* Remove all cookies in this cookie store.
*
- * @return true if this store changed as a result of the call
+ * @return {@code true} if this store changed as a result of the call
*/
public boolean removeAll();
}
diff --git a/jdk/src/share/classes/java/net/DatagramPacket.java b/jdk/src/share/classes/java/net/DatagramPacket.java
index 1f6af9eb939..b0728f01cd0 100644
--- a/jdk/src/share/classes/java/net/DatagramPacket.java
+++ b/jdk/src/share/classes/java/net/DatagramPacket.java
@@ -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
@@ -68,11 +68,11 @@ class DatagramPacket {
int port;
/**
- * Constructs a DatagramPacket for receiving packets of
- * length length, specifying an offset into the buffer.
+ * Constructs a {@code DatagramPacket} for receiving packets of
+ * length {@code length}, specifying an offset into the buffer.
*
- * The length argument must be less than or equal to
- * buf.length.
+ * The {@code length} argument must be less than or equal to
+ * {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param offset the offset for the buffer
@@ -87,11 +87,11 @@ class DatagramPacket {
}
/**
- * Constructs a DatagramPacket for receiving packets of
- * length length.
+ * Constructs a {@code DatagramPacket} for receiving packets of
+ * length {@code length}.
*
- * The length argument must be less than or equal to
- * buf.length.
+ * The {@code length} argument must be less than or equal to
+ * {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param length the number of bytes to read.
@@ -102,10 +102,10 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
- * length with offset ioffsetto the
+ * {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
- * length argument must be less than or equal to
- * buf.length.
+ * {@code length} argument must be less than or equal to
+ * {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
@@ -125,10 +125,10 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
- * length with offset ioffsetto the
+ * {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
- * length argument must be less than or equal to
- * buf.length.
+ * {@code length} argument must be less than or equal to
+ * {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
@@ -147,9 +147,9 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
- * length to the specified port number on the specified
- * host. The length argument must be less than or equal
- * to buf.length.
+ * {@code length} to the specified port number on the specified
+ * host. The {@code length} argument must be less than or equal
+ * to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
@@ -164,9 +164,9 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
- * length to the specified port number on the specified
- * host. The length argument must be less than or equal
- * to buf.length.
+ * {@code length} to the specified port number on the specified
+ * host. The {@code length} argument must be less than or equal
+ * to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
@@ -207,8 +207,8 @@ class DatagramPacket {
/**
* Returns the data buffer. The data received or the data to be sent
- * starts from the offset in the buffer,
- * and runs for length long.
+ * starts from the {@code offset} in the buffer,
+ * and runs for {@code length} long.
*
* @return the buffer used to receive or send data
* @see #setData(byte[], int, int)
@@ -277,7 +277,7 @@ class DatagramPacket {
/**
* Sets the IP address of the machine to which this datagram
* is being sent.
- * @param iaddr the InetAddress
+ * @param iaddr the {@code InetAddress}
* @since JDK1.1
* @see #getAddress()
*/
@@ -303,7 +303,7 @@ class DatagramPacket {
* Sets the SocketAddress (usually IP address + port number) of the remote
* host to which this datagram is being sent.
*
- * @param address the SocketAddress
+ * @param address the {@code SocketAddress}
* @throws IllegalArgumentException if address is null or is a
* SocketAddress subclass not supported by this socket
*
@@ -324,7 +324,7 @@ class DatagramPacket {
* Gets the SocketAddress (usually IP address + port number) of the remote
* host that this packet is being sent to or is coming from.
*
- * @return the SocketAddress
+ * @return the {@code SocketAddress}
* @since 1.4
* @see #setSocketAddress
*/
@@ -335,7 +335,7 @@ class DatagramPacket {
/**
* Set the data buffer for this packet. With the offset of
* this DatagramPacket set to 0, and the length set to
- * the length of buf.
+ * the length of {@code buf}.
*
* @param buf the buffer to set for this packet.
*
diff --git a/jdk/src/share/classes/java/net/DatagramSocket.java b/jdk/src/share/classes/java/net/DatagramSocket.java
index d6ffca23755..ab60a263ac7 100644
--- a/jdk/src/share/classes/java/net/DatagramSocket.java
+++ b/jdk/src/share/classes/java/net/DatagramSocket.java
@@ -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
@@ -47,14 +47,14 @@ import java.security.PrivilegedExceptionAction;
* a DatagramSocket is bound to a more specific address.
*
* Example:
- *
+ * {@code
* DatagramSocket s = new DatagramSocket(null);
* s.bind(new InetSocketAddress(8888));
- *
+ * }
* Which is equivalent to:
- *
+ * {@code
* DatagramSocket s = new DatagramSocket(8888);
- *
+ * }
* Both cases will create a DatagramSocket able to receive broadcasts on
* UDP port 8888.
*
@@ -161,14 +161,14 @@ class DatagramSocket implements java.io.Closeable {
* an IP address chosen by the kernel.
*
*
If there is a security manager,
- * its checkListen 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.
*
* @exception SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
- * checkListen method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
*/
@@ -195,21 +195,21 @@ class DatagramSocket implements java.io.Closeable {
* Creates a datagram socket, bound to the specified local
* socket address.
*
- * If, if the address is null, creates an unbound socket.
+ * If, if the address is {@code null}, creates an unbound socket.
*
*
If there is a security manager,
- * its checkListen method is first called
+ * its {@code checkListen} method is first called
* with the port from the socket address
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * @param bindaddr local socket address to bind, or null
+ * @param bindaddr local socket address to bind, or {@code null}
* for an unbound socket.
*
* @exception SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
- * checkListen method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
* @since 1.4
@@ -234,8 +234,8 @@ class DatagramSocket implements java.io.Closeable {
* an IP address chosen by the kernel.
*
*
If there is a security manager,
- * its checkListen method is first called
- * with the port 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.
*
@@ -243,7 +243,7 @@ class DatagramSocket implements java.io.Closeable {
* @exception SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
- * checkListen method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
*/
@@ -259,8 +259,8 @@ class DatagramSocket implements java.io.Closeable {
* an IP address chosen by the kernel.
*
*
If there is a security manager,
- * its checkListen method is first called
- * with the port 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.
*
@@ -270,7 +270,7 @@ class DatagramSocket implements java.io.Closeable {
* @exception SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
- * checkListen method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
* @since JDK1.1
@@ -319,10 +319,10 @@ class DatagramSocket implements java.io.Closeable {
}
/**
- * Get the DatagramSocketImpl attached to this socket,
+ * Get the {@code DatagramSocketImpl} attached to this socket,
* creating it if necessary.
*
- * @return the DatagramSocketImpl attached to that
+ * @return the {@code DatagramSocketImpl} attached to that
* DatagramSocket
* @throws SocketException if creation fails.
* @since 1.4
@@ -336,14 +336,14 @@ class DatagramSocket implements java.io.Closeable {
/**
* Binds this DatagramSocket to a specific address and port.
*
- * If the address is null, then the system will pick up
+ * If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
*
* @param addr The address and port to bind to.
* @throws SocketException if any error happens during the bind, or if the
* socket is already bound.
* @throws SecurityException if a security manager exists and its
- * checkListen method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
* @throws IllegalArgumentException if addr is a SocketAddress subclass
* not supported by this socket.
* @since 1.4
@@ -496,7 +496,7 @@ class DatagramSocket implements java.io.Closeable {
* Returns the binding state of the socket.
*
* If the socket was bound prior to being {@link #close closed},
- * then this method will continue to return true
+ * then this method will continue to return {@code true}
* after the socket is closed.
*
* @return true if the socket successfully bound to an address
@@ -510,7 +510,7 @@ class DatagramSocket implements java.io.Closeable {
* Returns the connection state of the socket.
*
* If the socket was connected prior to being {@link #close closed},
- * then this method will continue to return true
+ * then this method will continue to return {@code true}
* after the socket is closed.
*
* @return true if the socket successfully connected to a server
@@ -522,7 +522,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Returns the address to which this socket is connected. Returns
- * null if the socket is not connected.
+ * {@code null} if the socket is not connected.
*
* If the socket was connected prior to being {@link #close closed},
* then this method will continue to return the connected address
@@ -536,7 +536,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Returns the port number to which this socket is connected.
- * Returns -1 if the socket is not connected.
+ * Returns {@code -1} if the socket is not connected.
*
* If the socket was connected prior to being {@link #close closed},
* then this method will continue to return the connected port number
@@ -550,14 +550,14 @@ class DatagramSocket implements java.io.Closeable {
/**
* Returns the address of the endpoint this socket is connected to, or
- * null if it is unconnected.
+ * {@code null} if it is unconnected.
*
* If the socket was connected prior to being {@link #close closed},
* then this method will continue to return the connected address
* after the socket is closed.
*
- * @return a SocketAddress representing the remote
- * endpoint of this socket, or null if it is
+ * @return a {@code SocketAddress} representing the remote
+ * endpoint of this socket, or {@code null} if it is
* not connected yet.
* @see #getInetAddress()
* @see #getPort()
@@ -573,8 +573,8 @@ class DatagramSocket implements java.io.Closeable {
/**
* Returns the address of the endpoint this socket is bound to.
*
- * @return a SocketAddress representing the local endpoint of this
- * socket, or null if it is closed or not bound yet.
+ * @return a {@code SocketAddress} representing the local endpoint of this
+ * socket, or {@code null} if it is closed or not bound yet.
* @see #getLocalAddress()
* @see #getLocalPort()
* @see #bind(SocketAddress)
@@ -591,28 +591,28 @@ class DatagramSocket implements java.io.Closeable {
/**
* Sends a datagram packet from this socket. The
- * DatagramPacket includes information indicating the
+ * {@code DatagramPacket} includes information indicating the
* data to be sent, its length, the IP address of the remote host,
* and the port number on the remote host.
*
*
If there is a security manager, and the socket is not currently
* connected to a remote address, this method first performs some
- * security checks. First, if p.getAddress().isMulticastAddress()
+ * security checks. First, if {@code p.getAddress().isMulticastAddress()}
* is true, this method calls the
- * security manager's checkMulticast method
- * with p.getAddress() as its argument.
+ * security manager's {@code checkMulticast} method
+ * with {@code p.getAddress()} as its argument.
* If the evaluation of that expression is false,
* this method instead calls the security manager's
- * checkConnect method with arguments
- * p.getAddress().getHostAddress() and
- * p.getPort(). 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 the DatagramPacket to be sent.
+ * @param p the {@code DatagramPacket} to be sent.
*
* @exception IOException if an I/O error occurs.
* @exception SecurityException if a security manager exists and its
- * checkMulticast or checkConnect
+ * {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
* @exception PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no
@@ -674,20 +674,20 @@ class DatagramSocket implements java.io.Closeable {
/**
* Receives a datagram packet from this socket. When this method
- * returns, the DatagramPacket's buffer is filled with
+ * returns, the {@code DatagramPacket}'s buffer is filled with
* the data received. The datagram packet also contains the sender's
* IP address, and the port number on the sender's machine.
*
* This method blocks until a datagram is received. The
- * length field of the datagram packet object contains
+ * {@code length} field of the datagram packet object contains
* the length of the received message. If the message is longer than
* the packet's length, the message is truncated.
*
* If there is a security manager, a packet cannot be received if the
- * security manager's checkAccept method
+ * security manager's {@code checkAccept} method
* does not allow it.
*
- * @param p the DatagramPacket into which to place
+ * @param p the {@code DatagramPacket} into which to place
* the incoming data.
* @exception IOException if an I/O error occurs.
* @exception SocketTimeoutException if setSoTimeout was previously called
@@ -786,17 +786,17 @@ class DatagramSocket implements java.io.Closeable {
* Gets the local address to which the socket is bound.
*
*
If there is a security manager, its
- * checkConnect method is first called
- * with the host address and -1
+ * {@code checkConnect} method is first called
+ * with the host address and {@code -1}
* as its arguments to see if the operation is allowed.
*
* @see SecurityManager#checkConnect
* @return the local address to which the socket is bound,
- * null if the socket is closed, or
- * an InetAddress representing
+ * {@code null} if the socket is closed, or
+ * an {@code InetAddress} representing
* {@link InetAddress#isAnyLocalAddress wildcard}
* address if either the socket is not bound, or
- * the security manager checkConnect
+ * the security manager {@code checkConnect}
* method does not allow the operation
* @since 1.1
*/
@@ -824,8 +824,8 @@ class DatagramSocket implements java.io.Closeable {
* is bound.
*
* @return the port number on the local host to which this socket is bound,
- -1 if the socket is closed, or
- 0 if it is not bound yet.
+ {@code -1} if the socket is closed, or
+ {@code 0} if it is not bound yet.
*/
public int getLocalPort() {
if (isClosed())
@@ -883,7 +883,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Sets the SO_SNDBUF option to the specified value for this
- * DatagramSocket. The SO_SNDBUF option is used by the
+ * {@code DatagramSocket}. The SO_SNDBUF option is used by the
* network implementation as a hint to size the underlying
* network I/O buffers. The SO_SNDBUF setting may also be used
* by the network implementation to determine the maximum size
@@ -897,7 +897,7 @@ class DatagramSocket implements java.io.Closeable {
* is high.
*
* Note: If {@link #send(DatagramPacket)} is used to send a
- * DatagramPacket that is larger than the setting
+ * {@code DatagramPacket} that is larger than the setting
* of SO_SNDBUF then it is implementation specific if the
* packet is sent or discarded.
*
@@ -921,10 +921,10 @@ class DatagramSocket implements java.io.Closeable {
}
/**
- * Get value of the SO_SNDBUF option for this DatagramSocket, that is the
- * buffer size used by the platform for output on this DatagramSocket.
+ * Get value of the SO_SNDBUF option for this {@code DatagramSocket}, that is the
+ * buffer size used by the platform for output on this {@code DatagramSocket}.
*
- * @return the value of the SO_SNDBUF option for this DatagramSocket
+ * @return the value of the SO_SNDBUF option for this {@code DatagramSocket}
* @exception SocketException if there is an error in
* the underlying protocol, such as an UDP error.
* @see #setSendBufferSize
@@ -942,7 +942,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Sets the SO_RCVBUF option to the specified value for this
- * DatagramSocket. The SO_RCVBUF option is used by the
+ * {@code DatagramSocket}. The SO_RCVBUF option is used by the
* the network implementation as a hint to size the underlying
* network I/O buffers. The SO_RCVBUF setting may also be used
* by the network implementation to determine the maximum size
@@ -979,10 +979,10 @@ class DatagramSocket implements java.io.Closeable {
}
/**
- * Get value of the SO_RCVBUF option for this DatagramSocket, that is the
- * buffer size used by the platform for input on this DatagramSocket.
+ * Get value of the SO_RCVBUF option for this {@code DatagramSocket}, that is the
+ * buffer size used by the platform for input on this {@code DatagramSocket}.
*
- * @return the value of the SO_RCVBUF option for this DatagramSocket
+ * @return the value of the SO_RCVBUF option for this {@code DatagramSocket}
* @exception SocketException if there is an error in the underlying protocol, such as an UDP error.
* @see #setReceiveBufferSize(int)
*/
@@ -1005,26 +1005,26 @@ class DatagramSocket implements java.io.Closeable {
* socket to the same socket address. This is typically for the
* purpose of receiving multicast packets
* (See {@link java.net.MulticastSocket}). The
- * SO_REUSEADDR socket option allows multiple
+ * {@code SO_REUSEADDR} socket option allows multiple
* sockets to be bound to the same socket address if the
- * SO_REUSEADDR socket option is enabled prior
+ * {@code SO_REUSEADDR} socket option is enabled prior
* to binding the socket using {@link #bind(SocketAddress)}.
*
* Note: This functionality is not supported by all existing platforms,
* so it is implementation specific whether this option will be ignored
* or not. However, if it is not supported then
- * {@link #getReuseAddress()} will always return false.
+ * {@link #getReuseAddress()} will always return {@code false}.
*
- * When a DatagramSocket is created the initial setting - * of SO_REUSEADDR is disabled. + * When a {@code DatagramSocket} is created the initial setting + * of {@code SO_REUSEADDR} is disabled. *
- * The behaviour when SO_REUSEADDR is enabled or
+ * The behaviour when {@code SO_REUSEADDR} is enabled or
* disabled after a socket is bound (See {@link #isBound()})
* is not defined.
*
* @param on whether to enable or disable the
* @exception SocketException if an error occurs enabling or
- * disabling the SO_RESUEADDR socket option,
+ * disabling the {@code SO_RESUEADDR} socket option,
* or the socket is closed.
* @since 1.4
* @see #getReuseAddress()
@@ -1045,7 +1045,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Tests if SO_REUSEADDR is enabled.
*
- * @return a boolean indicating whether or not SO_REUSEADDR is enabled.
+ * @return a {@code boolean} indicating whether or not SO_REUSEADDR is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @since 1.4
@@ -1083,7 +1083,7 @@ class DatagramSocket implements java.io.Closeable {
/**
* Tests if SO_BROADCAST is enabled.
- * @return a boolean indicating whether or not SO_BROADCAST is enabled.
+ * @return a {@code boolean} indicating whether or not SO_BROADCAST is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @since 1.4
@@ -1105,7 +1105,7 @@ class DatagramSocket implements java.io.Closeable {
* 255} or an IllegalArgumentException will be thrown.
*
Notes: *
For Internet Protocol v4 the value consists of an
- * integer, the least significant 8 bits of which
+ * {@code integer}, the least significant 8 bits of which
* represent the value of the TOS octet in IP packets sent by
* the socket.
* RFC 1349 defines the TOS values as follows:
@@ -1123,10 +1123,10 @@ class DatagramSocket implements java.io.Closeable {
* SocketException indicating that the operation is not
* permitted.
*
- * for Internet Protocol v6 tc is the value that
+ * for Internet Protocol v6 {@code tc} is the value that
* would be placed into the sin6_flowinfo field of the IP header.
*
- * @param tc an int value for the bitset.
+ * @param tc an {@code int} value for the bitset.
* @throws SocketException if there is an error setting the
* traffic class or type-of-service
* @since 1.4
@@ -1205,7 +1205,7 @@ class DatagramSocket implements java.io.Closeable {
* DatagramChannel.open} method.
*
* @return the datagram channel associated with this datagram socket,
- * or null if this socket was not created for a channel
+ * or {@code null} if this socket was not created for a channel
*
* @since 1.4
* @spec JSR-51
@@ -1224,14 +1224,14 @@ class DatagramSocket implements java.io.Closeable {
* application. The factory can be specified only once.
*
* When an application creates a new datagram socket, the socket
- * implementation factory's createDatagramSocketImpl method is
+ * implementation factory's {@code createDatagramSocketImpl} method is
* called to create the actual datagram socket implementation.
*
- * Passing null to the method is a no-op unless the factory
+ * Passing {@code null} to the method is a no-op unless the factory
* was already set.
*
*
If there is a security manager, this method first calls
- * the security manager's checkSetFactory method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
@@ -1240,7 +1240,7 @@ class DatagramSocket implements java.io.Closeable {
* datagram socket factory.
* @exception SocketException if the factory is already defined.
* @exception SecurityException if a security manager exists and its
- * checkSetFactory method doesn't allow the
+ * {@code checkSetFactory} method doesn't allow the
operation.
* @see
java.net.DatagramSocketImplFactory#createDatagramSocketImpl()
diff --git a/jdk/src/share/classes/java/net/DatagramSocketImpl.java b/jdk/src/share/classes/java/net/DatagramSocketImpl.java
index 3ed11e4b9d2..524f06b83ca 100644
--- a/jdk/src/share/classes/java/net/DatagramSocketImpl.java
+++ b/jdk/src/share/classes/java/net/DatagramSocketImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -101,7 +101,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
protected void disconnect() {}
/**
- * Peek at the packet to see who it is from. Updates the specified InetAddress
+ * Peek at the packet to see who it is from. Updates the specified {@code InetAddress}
* to the address which the packet came from.
* @param i an InetAddress object
* @return the port number which the packet came from.
@@ -114,7 +114,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Peek at the packet to see who it is from. The data is copied into the specified
- * DatagramPacket. The data is returned,
+ * {@code DatagramPacket}. The data is returned,
* but not consumed, so that a subsequent peekData/receive operation
* will see the same data.
* @param p the Packet Received.
@@ -163,7 +163,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Set the TTL (time-to-live) option.
- * @param ttl an int specifying the time-to-live value
+ * @param ttl an {@code int} specifying the time-to-live value
* @exception IOException if an I/O exception occurs
* while setting the time-to-live option.
* @see #getTimeToLive()
@@ -174,7 +174,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* Retrieve the TTL (time-to-live) option.
* @exception IOException if an I/O exception occurs
* while retrieving the time-to-live option
- * @return an int representing the time-to-live value
+ * @return an {@code int} representing the time-to-live value
* @see #setTimeToLive(int)
*/
protected abstract int getTimeToLive() throws IOException;
@@ -227,7 +227,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Gets the local port.
- * @return an int representing the local port value
+ * @return an {@code int} representing the local port value
*/
protected int getLocalPort() {
return localPort;
@@ -235,7 +235,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Gets the datagram socket file descriptor.
- * @return a FileDescriptor object representing the datagram socket
+ * @return a {@code FileDescriptor} object representing the datagram socket
* file descriptor
*/
protected FileDescriptor getFileDescriptor() {
diff --git a/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java b/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java
index e89aeb30a6c..4d891962ae2 100644
--- a/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java
+++ b/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -27,7 +27,7 @@ package java.net;
/**
* This interface defines a factory for datagram socket implementations. It
- * is used by the classes DatagramSocket to create actual socket
+ * is used by the classes {@code DatagramSocket} to create actual socket
* implementations.
*
* @author Yingxian Wang
@@ -37,9 +37,9 @@ package java.net;
public
interface DatagramSocketImplFactory {
/**
- * Creates a new DatagramSocketImpl instance.
+ * Creates a new {@code DatagramSocketImpl} instance.
*
- * @return a new instance of DatagramSocketImpl.
+ * @return a new instance of {@code DatagramSocketImpl}.
* @see java.net.DatagramSocketImpl
*/
DatagramSocketImpl createDatagramSocketImpl();
diff --git a/jdk/src/share/classes/java/net/FileNameMap.java b/jdk/src/share/classes/java/net/FileNameMap.java
index b9bdb6e53e0..393b5aa6d9e 100644
--- a/jdk/src/share/classes/java/net/FileNameMap.java
+++ b/jdk/src/share/classes/java/net/FileNameMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -37,7 +37,7 @@ public interface FileNameMap {
/**
* Gets the MIME type for the specified file name.
* @param fileName the specified file name
- * @return a String indicating the MIME
+ * @return a {@code String} indicating the MIME
* type for the specified file name.
*/
public String getContentTypeFor(String fileName);
diff --git a/jdk/src/share/classes/java/net/HttpCookie.java b/jdk/src/share/classes/java/net/HttpCookie.java
index d265e284c26..fb02ae3e03d 100644
--- a/jdk/src/share/classes/java/net/HttpCookie.java
+++ b/jdk/src/share/classes/java/net/HttpCookie.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -470,7 +470,7 @@ public final class HttpCookie implements Cloneable {
* protocol.
*
* @return {@code false} if the cookie can be sent over any standard
- * protocol; otherwise, true
+ * protocol; otherwise, {@code true}
*
* @see #setSecure
*/
diff --git a/jdk/src/share/classes/java/net/HttpRetryException.java b/jdk/src/share/classes/java/net/HttpRetryException.java
index 8829c1e90dd..d498a653f1c 100644
--- a/jdk/src/share/classes/java/net/HttpRetryException.java
+++ b/jdk/src/share/classes/java/net/HttpRetryException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -43,7 +43,7 @@ class HttpRetryException extends IOException {
private String location;
/**
- * Constructs a new HttpRetryException from the
+ * Constructs a new {@code HttpRetryException} from the
* specified response code and exception detail message
*
* @param detail the detail message.
@@ -55,7 +55,7 @@ class HttpRetryException extends IOException {
}
/**
- * Constructs a new HttpRetryException with detail message
+ * Constructs a new {@code HttpRetryException} with detail message
* responseCode and the contents of the Location response header field.
*
* @param detail the detail message.
diff --git a/jdk/src/share/classes/java/net/HttpURLConnection.java b/jdk/src/share/classes/java/net/HttpURLConnection.java
index b93f1e731bd..be23241e5a6 100644
--- a/jdk/src/share/classes/java/net/HttpURLConnection.java
+++ b/jdk/src/share/classes/java/net/HttpURLConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -76,14 +76,14 @@ abstract public class HttpURLConnection extends URLConnection {
/**
* The chunk-length when using chunked encoding streaming mode for output.
- * A value of -1 means chunked encoding is disabled for output.
+ * A value of {@code -1} means chunked encoding is disabled for output.
* @since 1.5
*/
protected int chunkLength = -1;
/**
* The fixed content-length when using fixed-length streaming mode.
- * A value of -1 means fixed-length streaming mode is disabled
+ * A value of {@code -1} means fixed-length streaming mode is disabled
* for output.
*
*
NOTE: {@link #fixedContentLengthLong} is recommended instead
@@ -103,15 +103,15 @@ abstract public class HttpURLConnection extends URLConnection {
protected long fixedContentLengthLong = -1;
/**
- * Returns the key for the nth header field.
- * Some implementations may treat the 0th
+ * Returns the key for the {@code n}th header field.
+ * Some implementations may treat the {@code 0}th
* header field as special, i.e. as the status line returned by the HTTP
* server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status
- * line, but getHeaderFieldKey(0) returns null.
+ * line, but {@code getHeaderFieldKey(0)} returns null.
*
* @param n an index, where {@code n >=0}.
- * @return the key for the nth header field,
- * or null if the key does not exist.
+ * @return the key for the {@code n}th header field,
+ * or {@code null} if the key does not exist.
*/
public String getHeaderFieldKey (int n) {
return null;
@@ -251,8 +251,8 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
- * Returns the value for the nth header field.
- * Some implementations may treat the 0th
+ * Returns the value for the {@code n}th header field.
+ * Some implementations may treat the {@code 0}th
* header field as special, i.e. as the status line returned by the HTTP
* server.
*
@@ -261,8 +261,8 @@ abstract public class HttpURLConnection extends URLConnection {
* the headers in the message.
*
* @param n an index, where {@code n>=0}.
- * @return the value of the nth header field,
- * or null if the value does not exist.
+ * @return the value of the {@code n}th header field,
+ * or {@code null} if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int)
*/
public String getHeaderField(int n) {
@@ -270,7 +270,7 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
- * An int representing the three digit HTTP Status-Code.
+ * An {@code int} representing the three digit HTTP Status-Code.
*
true, the protocol will automatically follow redirects.
- * If false, the protocol will not automatically follow
+ * If {@code true}, the protocol will automatically follow redirects.
+ * If {@code false}, the protocol will not automatically follow
* redirects.
*
- * This field is set by the setInstanceFollowRedirects
- * method. Its value is returned by the getInstanceFollowRedirects
+ * This field is set by the {@code setInstanceFollowRedirects}
+ * method. Its value is returned by the {@code getInstanceFollowRedirects}
* method.
*
* Its default value is based on the value of the static followRedirects @@ -328,14 +328,14 @@ abstract public class HttpURLConnection extends URLConnection { * cannot change this variable. *
* If there is a security manager, this method first calls
- * the security manager's checkSetFactory method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * @param set a boolean indicating whether or not
+ * @param set a {@code boolean} indicating whether or not
* to follow HTTP redirects.
* @exception SecurityException if a security manager exists and its
- * checkSetFactory method doesn't
+ * {@code checkSetFactory} method doesn't
* allow the operation.
* @see SecurityManager#checkSetFactory
* @see #getFollowRedirects()
@@ -350,12 +350,12 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
- * Returns a boolean indicating
+ * Returns a {@code boolean} indicating
* whether or not HTTP redirects (3xx) should
* be automatically followed.
*
- * @return true if HTTP redirects should
- * be automatically followed, false if not.
+ * @return {@code true} if HTTP redirects should
+ * be automatically followed, {@code false} if not.
* @see #setFollowRedirects(boolean)
*/
public static boolean getFollowRedirects() {
@@ -364,13 +364,13 @@ abstract public class HttpURLConnection extends URLConnection {
/**
* Sets whether HTTP redirects (requests with response code 3xx) should
- * be automatically followed by this HttpURLConnection
+ * be automatically followed by this {@code HttpURLConnection}
* instance.
*
* The default value comes from followRedirects, which defaults to
* true.
*
- * @param followRedirects a boolean indicating
+ * @param followRedirects a {@code boolean} indicating
* whether or not to follow HTTP redirects.
*
* @see java.net.HttpURLConnection#instanceFollowRedirects
@@ -382,11 +382,11 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
- * Returns the value of this HttpURLConnection's
- * instanceFollowRedirects field.
+ * Returns the value of this {@code HttpURLConnection}'s
+ * {@code instanceFollowRedirects} field.
*
- * @return the value of this HttpURLConnection's
- * instanceFollowRedirects field.
+ * @return the value of this {@code HttpURLConnection}'s
+ * {@code instanceFollowRedirects} field.
* @see java.net.HttpURLConnection#instanceFollowRedirects
* @see #setInstanceFollowRedirects(boolean)
* @since 1.3
@@ -540,7 +540,7 @@ abstract public class HttpURLConnection extends URLConnection {
* Returns null if none could be discerned from the responses
* (the result was not valid HTTP).
* @throws IOException if an error occurred connecting to the server.
- * @return the HTTP response message, or null
+ * @return the HTTP response message, or {@code null}
*/
public String getResponseMessage() throws IOException {
getResponseCode();
@@ -583,7 +583,7 @@ abstract public class HttpURLConnection extends URLConnection {
* @exception IOException if an error occurs while computing
* the permission.
*
- * @return a SocketPermission object representing the
+ * @return a {@code SocketPermission} object representing the
* permission necessary to connect to the destination
* host and port.
*/
diff --git a/jdk/src/share/classes/java/net/IDN.java b/jdk/src/share/classes/java/net/IDN.java
index 563d356804f..0e481558956 100644
--- a/jdk/src/share/classes/java/net/IDN.java
+++ b/jdk/src/share/classes/java/net/IDN.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -104,7 +104,7 @@ public final class IDN {
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
- * @return the translated String
+ * @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
@@ -130,13 +130,13 @@ public final class IDN {
*
*
This convenience method works as if by invoking the * two-argument counterpart as follows: - *
+ *+ * * * @param input the string to be processed * - * @return the translated String + * @return the translated {@code String} * * @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification */ @@ -161,7 +161,7 @@ public final class IDN { * @param input the string to be processed * @param flag process flag; can be 0 or any logical OR of possible flags * - * @return the translated String + * @return the translated {@code String} */ public static String toUnicode(String input, int flag) { int p = 0, q = 0; @@ -184,13 +184,13 @@ public final class IDN { * ** {@link #toASCII(String, int) toASCII}(input, 0); - *
This convenience method works as if by invoking the * two-argument counterpart as follows: - *
+ *+ * * * @param input the string to be processed * - * @return the translated String + * @return the translated {@code String} */ public static String toUnicode(String input) { return toUnicode(input, 0); diff --git a/jdk/src/share/classes/java/net/Inet4Address.java b/jdk/src/share/classes/java/net/Inet4Address.java index 6c59a692f82..528b2767465 100644 --- a/jdk/src/share/classes/java/net/Inet4Address.java +++ b/jdk/src/share/classes/java/net/Inet4Address.java @@ -42,10 +42,10 @@ import java.io.ObjectStreamException; * takes one of the following forms: * ** {@link #toUnicode(String, int) toUnicode}(input, 0); - *
* *- *
- * d.d.d.d - * d.d.d - * d.d + * d + * {@code d.d.d.d} + * {@code d.d.d} + * {@code d.d} * {@code d}
When four parts are specified, each is interpreted as a byte of
@@ -153,7 +153,7 @@ class Inet4Address extends InetAddress {
* Utility routine to check if the InetAddress is an
* IP multicast address. IP multicast address is a Class D
* address i.e first four bits of the address are 1110.
- * @return a boolean indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
@@ -163,7 +163,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress in a wildcard address.
- * @return a boolean indicating if the Inetaddress is
+ * @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
@@ -174,7 +174,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is a loopback address.
*
- * @return a boolean indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
@@ -187,7 +187,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is an link local address.
*
- * @return a boolean indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
@@ -204,7 +204,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is a site local address.
*
- * @return a boolean indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
@@ -224,7 +224,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has global scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
@@ -240,7 +240,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has node scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
@@ -253,7 +253,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has link scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
@@ -269,7 +269,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has site scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
@@ -284,7 +284,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has organization scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
@@ -299,9 +299,9 @@ class Inet4Address extends InetAddress {
}
/**
- * Returns the raw IP address of this InetAddress
+ * Returns the raw IP address of this {@code InetAddress}
* object. The result is in network byte order: the highest order
- * byte of the address is in getAddress()[0].
+ * byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
@@ -337,18 +337,18 @@ class Inet4Address extends InetAddress {
/**
* Compares this object against the specified object.
- * The result is true if and only if the argument is
- * not null and it represents the same IP address as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same IP address as
* this object.
*
- * Two instances of InetAddress represent the same IP
+ * Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
- * getAddress is the same for both, and each of the
+ * {@code getAddress} is the same for both, and each of the
* array components is the same for the byte arrays.
*
* @param obj the object to compare against.
- * @return true if the objects are the same;
- * false otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
diff --git a/jdk/src/share/classes/java/net/Inet6Address.java b/jdk/src/share/classes/java/net/Inet6Address.java
index 169a180de11..7b10db96c08 100644
--- a/jdk/src/share/classes/java/net/Inet6Address.java
+++ b/jdk/src/share/classes/java/net/Inet6Address.java
@@ -47,7 +47,7 @@ import java.util.Enumeration;
* address. This is the full form. For example,
*
*
* *- *
+ * 1080:0:0:0:8:800:200C:417A * {@code 1080:0:0:0:8:800:200C:417A}
Note that it is not necessary to write the leading zeros in @@ -64,7 +64,7 @@ import java.util.Enumeration; * zeros in an address. For example, * *
* *- *
+ * 1080::8:800:200C:417A * {@code 1080::8:800:200C:417A}
An alternative form that is sometimes more convenient @@ -75,8 +75,8 @@ import java.util.Enumeration; * standard IPv4 representation address, for example, * *
* *- *
- * ::FFFF:129.144.52.38 + * ::129.144.52.38 + * {@code ::FFFF:129.144.52.38} * {@code ::129.144.52.38}
where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the @@ -85,23 +85,23 @@ import java.util.Enumeration; * in the "d.d.d.d" form. The following forms are invalid: * *
* *- *
- * ::FFFF:d.d.d - * ::FFFF:d.d - * ::d.d.d + * ::d.d + * {@code ::FFFF:d.d.d} + * {@code ::FFFF:d.d} + * {@code ::d.d.d} * {@code ::d.d}
The following form: * *
* *- *
+ * ::FFFF:d * {@code ::FFFF:d}
is valid, however it is an unconventional representation of * the IPv4-compatible IPv6 address, * *
* *- *
+ * ::255.255.0.d * {@code ::255.255.0.d}
while "::d" corresponds to the general IPv6 address
@@ -258,7 +258,7 @@ class Inet6Address extends InetAddress {
* Create an Inet6Address in the exact manner of {@link
* InetAddress#getByAddress(String,byte[])} except that the IPv6 scope_id is
* set to the value corresponding to the given interface for the address
- * type specified in addr. The call will fail with an
+ * type specified in {@code addr}. The call will fail with an
* UnknownHostException if the given interface does not have a numeric
* scope_id assigned for the given address type (eg. link-local or site-local).
* See here for a description of IPv6
diff --git a/jdk/src/share/classes/java/net/InetAddress.java b/jdk/src/share/classes/java/net/InetAddress.java
index aa5ef16705d..0232cfc4198 100644
--- a/jdk/src/share/classes/java/net/InetAddress.java
+++ b/jdk/src/share/classes/java/net/InetAddress.java
@@ -296,7 +296,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is an
* IP multicast address.
- * @return a boolean indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
@@ -306,7 +306,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress in a wildcard address.
- * @return a boolean indicating if the Inetaddress is
+ * @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
@@ -317,7 +317,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is a loopback address.
*
- * @return a boolean indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
@@ -328,7 +328,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is an link local address.
*
- * @return a boolean indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
@@ -339,7 +339,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is a site local address.
*
- * @return a boolean indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
@@ -350,7 +350,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has global scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
@@ -362,7 +362,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has node scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
@@ -374,7 +374,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has link scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
@@ -386,7 +386,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has site scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
@@ -398,7 +398,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has organization scope.
*
- * @return a boolean indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
@@ -424,9 +424,9 @@ class InetAddress implements java.io.Serializable {
* in an IllegalArgumentException being thrown.
*
* @param timeout the time, in milliseconds, before the call aborts
- * @return a boolean indicating if the address is reachable.
+ * @return a {@code boolean} indicating if the address is reachable.
* @throws IOException if a network error occurs
- * @throws IllegalArgumentException if timeout is negative.
+ * @throws IllegalArgumentException if {@code timeout} is negative.
* @since 1.5
*/
public boolean isReachable(int timeout) throws IOException {
@@ -442,10 +442,10 @@ class InetAddress implements java.io.Serializable {
* privilege can be obtained, otherwise it will try to establish
* a TCP connection on port 7 (Echo) of the destination host.
*
- * The network interface and ttl parameters
+ * The {@code network interface} and {@code ttl} parameters
* let the caller specify which network interface the test will go through
* and the maximum number of hops the packets should go through.
- * A negative value for the ttl will result in an
+ * A negative value for the {@code ttl} will result in an
* IllegalArgumentException being thrown.
*
* The timeout value, in milliseconds, indicates the maximum amount of time
@@ -458,9 +458,9 @@ class InetAddress implements java.io.Serializable {
* @param ttl the maximum numbers of hops to try or 0 for the
* default
* @param timeout the time, in milliseconds, before the call aborts
- * @throws IllegalArgumentException if either timeout
- * or ttl are negative.
- * @return a booleanindicating if the address is reachable.
+ * @throws IllegalArgumentException if either {@code timeout}
+ * or {@code ttl} are negative.
+ * @return a {@code boolean}indicating if the address is reachable.
* @throws IOException if a network error occurs
* @since 1.5
*/
@@ -486,8 +486,8 @@ class InetAddress implements java.io.Serializable {
* {@link #getCanonicalHostName() getCanonicalHostName}.
*
*
If there is a security manager, its
- * checkConnect method is first called
- * with the hostname and -1
+ * {@code checkConnect} method is first called
+ * with the hostname and {@code -1}
* as its arguments to see if the operation is allowed.
* If the operation is not allowed, it will return
* the textual representation of the IP address.
@@ -511,8 +511,8 @@ class InetAddress implements java.io.Serializable {
* here without a security check.
*
*
If there is a security manager, this method first
- * calls its checkConnect method
- * with the hostname and -1
+ * calls its {@code checkConnect} method
+ * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
@@ -539,8 +539,8 @@ class InetAddress implements java.io.Serializable {
* the FQDN depending on the underlying system configuration.
*
*
If there is a security manager, this method first
- * calls its checkConnect method
- * with the hostname and -1
+ * calls its {@code checkConnect} method
+ * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
@@ -566,8 +566,8 @@ class InetAddress implements java.io.Serializable {
* Returns the hostname for this address.
*
*
If there is a security manager, this method first
- * calls its checkConnect method
- * with the hostname and -1
+ * calls its {@code checkConnect} method
+ * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
@@ -633,9 +633,9 @@ class InetAddress implements java.io.Serializable {
}
/**
- * Returns the raw IP address of this InetAddress
+ * Returns the raw IP address of this {@code InetAddress}
* object. The result is in network byte order: the highest order
- * byte of the address is in getAddress()[0].
+ * byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
@@ -664,18 +664,18 @@ class InetAddress implements java.io.Serializable {
/**
* Compares this object against the specified object.
- * The result is true if and only if the argument is
- * not null and it represents the same IP address as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same IP address as
* this object.
*
- * Two instances of InetAddress represent the same IP
+ * Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
- * getAddress is the same for both, and each of the
+ * {@code getAddress} is the same for both, and each of the
* array components is the same for the byte arrays.
*
* @param obj the object to compare against.
- * @return true if the objects are the same;
- * false otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
@@ -683,7 +683,7 @@ class InetAddress implements java.io.Serializable {
}
/**
- * Converts this IP address to a String. The
+ * Converts this IP address to a {@code String}. The
* string returned is of the form: hostname / literal IP
* address.
*
@@ -974,7 +974,7 @@ class InetAddress implements java.io.Serializable {
* No name service is checked for the validity of the address.
*
*
The host name can either be a machine name, such as
- * "java.sun.com", or a textual representation of its IP
+ * "{@code java.sun.com}", or a textual representation of its IP
* address.
*
No validity checking is done on the host name either. * @@ -1019,26 +1019,26 @@ class InetAddress implements java.io.Serializable { * Determines the IP address of a host, given the host's name. * *
The host name can either be a machine name, such as
- * "java.sun.com", or a textual representation of its
+ * "{@code java.sun.com}", or a textual representation of its
* IP address. If a literal IP address is supplied, only the
* validity of the address format is checked.
*
- *
For host specified in literal IPv6 address,
+ *
For {@code host} specified in literal IPv6 address, * either the form defined in RFC 2732 or the literal IPv6 address * format defined in RFC 2373 is accepted. IPv6 scoped addresses are also * supported. See here for a description of IPv6 * scoped addresses. * - *
If the host is null then an InetAddress + *
If the host is {@code null} then an {@code InetAddress} * representing an address of the loopback interface is returned. * See RFC 3330 * section 2 and RFC 2373 * section 2.5.3.
* - * @param host the specified host, ornull.
+ * @param host the specified host, or {@code null}.
* @return an IP address for the given host name.
* @exception UnknownHostException if no IP address for the
- * host could be found, or if a scope_id was specified
+ * {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists
* and its checkConnect method doesn't allow the operation
@@ -1059,37 +1059,37 @@ class InetAddress implements java.io.Serializable {
* based on the configured name service on the system.
*
* The host name can either be a machine name, such as
- * "java.sun.com", or a textual representation of its IP
+ * "{@code java.sun.com}", or a textual representation of its IP
* address. If a literal IP address is supplied, only the
* validity of the address format is checked.
*
- *
For host specified in literal IPv6 address,
+ *
For {@code host} specified in literal IPv6 address, * either the form defined in RFC 2732 or the literal IPv6 address * format defined in RFC 2373 is accepted. A literal IPv6 address may * also be qualified by appending a scoped zone identifier or scope_id. * The syntax and usage of scope_ids is described * here. - *
If the host is null then an InetAddress + *
If the host is {@code null} then an {@code InetAddress} * representing an address of the loopback interface is returned. * See RFC 3330 * section 2 and RFC 2373 * section 2.5.3.
* - * If there is a security manager and host is not
- * null and host.length() is not equal to zero, the
+ *
If there is a security manager and {@code host} is not
+ * null and {@code host.length() } is not equal to zero, the
* security manager's
- * checkConnect method is called
- * with the hostname and -1
+ * {@code checkConnect} method is called
+ * with the hostname and {@code -1}
* as its arguments to see if the operation is allowed.
*
- * @param host the name of the host, or null.
+ * @param host the name of the host, or {@code null}.
* @return an array of all the IP addresses for a given host name.
*
* @exception UnknownHostException if no IP address for the
- * host could be found, or if a scope_id was specified
+ * {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists and its
- * checkConnect method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
*
* @see SecurityManager#checkConnect
*/
@@ -1389,9 +1389,9 @@ class InetAddress implements java.io.Serializable {
}
/**
- * Returns an InetAddress object given the raw IP address .
+ * Returns an {@code InetAddress} object given the raw IP address .
* The argument is in network byte order: the highest order
- * byte of the address is in getAddress()[0].
+ * byte of the address is in {@code getAddress()[0]}.
*
*
This method doesn't block, i.e. no reverse name service lookup
* is performed.
@@ -1417,14 +1417,14 @@ class InetAddress implements java.io.Serializable {
/**
* Returns the address of the local host. This is achieved by retrieving
* the name of the host from the system, then resolving that name into
- * an InetAddress.
+ * an {@code InetAddress}.
*
*
Note: The resolved address may be cached for a short period of time. *
* *If there is a security manager, its
- * checkConnect method is called
- * with the local host name and -1
+ * {@code checkConnect} method is called
+ * with the local host name and {@code -1}
* as its arguments to see if the operation is allowed.
* If the operation is not allowed, an InetAddress representing
* the loopback address is returned.
diff --git a/jdk/src/share/classes/java/net/InetSocketAddress.java b/jdk/src/share/classes/java/net/InetSocketAddress.java
index 44604c664aa..6792979312b 100644
--- a/jdk/src/share/classes/java/net/InetSocketAddress.java
+++ b/jdk/src/share/classes/java/net/InetSocketAddress.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -43,7 +43,7 @@ import java.io.ObjectStreamField;
* as returned values.
*
* The wildcard is a special local IP address. It usually means "any"
- * and can only be used for bind operations.
+ * and can only be used for {@code bind} operations.
*
* @see java.net.Socket
* @see java.net.ServerSocket
@@ -155,8 +155,8 @@ public class InetSocketAddress
* and the port number a specified value.
*
* A valid port value is between 0 and 65535.
- * A port number of zero will let the system pick up an
- * ephemeral port in a bind operation.
+ * A port number of {@code zero} will let the system pick up an
+ * ephemeral port in a {@code bind} operation.
*
* @param port The port number * @throws IllegalArgumentException if the port parameter is outside the specified @@ -171,10 +171,10 @@ public class InetSocketAddress * Creates a socket address from an IP address and a port number. *
* A valid port value is between 0 and 65535.
- * A port number of zero will let the system pick up an
- * ephemeral port in a bind operation.
+ * A port number of {@code zero} will let the system pick up an
+ * ephemeral port in a {@code bind} operation.
*
- * A null address will assign the wildcard address.
+ * A {@code null} address will assign the wildcard address.
*
* @param addr The IP address * @param port The port number @@ -195,13 +195,13 @@ public class InetSocketAddress * An attempt will be made to resolve the hostname into an InetAddress. * If that attempt fails, the address will be flagged as unresolved. *
- * If there is a security manager, its checkConnect method
+ * If there is a security manager, its {@code checkConnect} method
* is called with the host name as its argument to check the permissiom
* to resolve it. This could result in a SecurityException.
*
* A valid port value is between 0 and 65535.
- * A port number of zero will let the system pick up an
- * ephemeral port in a bind operation.
+ * A port number of {@code zero} will let the system pick up an
+ * ephemeral port in a {@code bind} operation.
*
* @param hostname the Host name * @param port The port number @@ -237,8 +237,8 @@ public class InetSocketAddress * The address will be flagged as unresolved. *
* A valid port value is between 0 and 65535.
- * A port number of zero will let the system pick up an
- * ephemeral port in a bind operation.
+ * A port number of {@code zero} will let the system pick up an
+ * ephemeral port in a {@code bind} operation.
*
* @param host the Host name
* @param port The port number
@@ -246,7 +246,7 @@ public class InetSocketAddress
* the range of valid port values, or if the hostname
* parameter is null.
* @see #isUnresolved()
- * @return a InetSocketAddress representing the unresolved
+ * @return a {@code InetSocketAddress} representing the unresolved
* socket address
* @since 1.5
*/
@@ -326,16 +326,16 @@ public class InetSocketAddress
/**
*
- * Gets the InetAddress.
+ * Gets the {@code InetAddress}.
*
- * @return the InetAdress or null if it is unresolved.
+ * @return the InetAdress or {@code null} if it is unresolved.
*/
public final InetAddress getAddress() {
return holder.getAddress();
}
/**
- * Gets the hostname.
+ * Gets the {@code hostname}.
* Note: This method may trigger a name service reverse lookup if the
* address was created with a literal IP address.
*
@@ -360,8 +360,8 @@ public class InetSocketAddress
/**
* Checks whether the address has been resolved or not.
*
- * @return true if the hostname couldn't be resolved into
- * an InetAddress.
+ * @return {@code true} if the hostname couldn't be resolved into
+ * an {@code InetAddress}.
*/
public final boolean isUnresolved() {
return holder.isUnresolved();
@@ -382,11 +382,11 @@ public class InetSocketAddress
/**
* Compares this object against the specified object.
- * The result is true if and only if the argument is
- * not null and it represents the same address as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same address as
* this object.
*
- * Two instances of InetSocketAddress represent the same
+ * Two instances of {@code InetSocketAddress} represent the same
* address if both the InetAddresses (or hostnames if it is unresolved) and port
* numbers are equal.
* If both addresses are unresolved, then the hostname and the port number
@@ -396,8 +396,8 @@ public class InetSocketAddress
* considered equal.
*
* @param obj the object to compare against.
- * @return true if the objects are the same;
- * false otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetAddress#equals(java.lang.Object)
*/
@Override
diff --git a/jdk/src/share/classes/java/net/InterfaceAddress.java b/jdk/src/share/classes/java/net/InterfaceAddress.java
index 1fb18ae0f6c..704e1fae9d5 100644
--- a/jdk/src/share/classes/java/net/InterfaceAddress.java
+++ b/jdk/src/share/classes/java/net/InterfaceAddress.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -47,23 +47,23 @@ public class InterfaceAddress {
}
/**
- * Returns an InetAddress for this address.
+ * Returns an {@code InetAddress} for this address.
*
- * @return the InetAddress for this address.
+ * @return the {@code InetAddress} for this address.
*/
public InetAddress getAddress() {
return address;
}
/**
- * Returns an InetAddress for the brodcast address
+ * Returns an {@code InetAddress} for the brodcast address
* for this InterfaceAddress.
*
* Only IPv4 networks have broadcast address therefore, in the case
- * of an IPv6 network, null will be returned.
+ * of an IPv6 network, {@code null} will be returned.
*
- * @return the InetAddress representing the broadcast
- * address or null if there is no broadcast address.
+ * @return the {@code InetAddress} representing the broadcast
+ * address or {@code null} if there is no broadcast address.
*/
public InetAddress getBroadcast() {
return broadcast;
@@ -76,7 +76,7 @@ public class InterfaceAddress {
* or 24 (255.255.255.0).
* Typical IPv6 values would be 128 (::1/128) or 10 (fe80::203:baff:fe27:1243/10)
*
- * @return a short representing the prefix length for the
+ * @return a {@code short} representing the prefix length for the
* subnet of that address.
*/
public short getNetworkPrefixLength() {
@@ -85,17 +85,17 @@ public class InterfaceAddress {
/**
* Compares this object against the specified object.
- * The result is true if and only if the argument is
- * not null and it represents the same interface address as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same interface address as
* this object.
*
- * Two instances of InterfaceAddress represent the same
+ * Two instances of {@code InterfaceAddress} represent the same
* address if the InetAddress, the prefix length and the broadcast are
* the same for both.
*
* @param obj the object to compare against.
- * @return true if the objects are the same;
- * false otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InterfaceAddress#hashCode()
*/
public boolean equals(Object obj) {
@@ -122,7 +122,7 @@ public class InterfaceAddress {
}
/**
- * Converts this Interface address to a String. The
+ * Converts this Interface address to a {@code String}. The
* string returned is of the form: InetAddress / prefix length [ broadcast address ].
*
* @return a string representation of this Interface address.
diff --git a/jdk/src/share/classes/java/net/JarURLConnection.java b/jdk/src/share/classes/java/net/JarURLConnection.java
index 433be8cfdb9..c6fd8cf94f7 100644
--- a/jdk/src/share/classes/java/net/JarURLConnection.java
+++ b/jdk/src/share/classes/java/net/JarURLConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -45,18 +45,14 @@ import sun.net.www.ParseUtil;
*
*
for example: * - *
- * jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class
+ *
- *
{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class} * *
Jar URLs should be used to refer to a JAR file or entries in
* a JAR file. The example above is a JAR URL which refers to a JAR
* entry. If the entry name is omitted, the URL refers to the whole
* JAR file:
*
- *
- * jar:http://www.foo.com/bar/baz.jar!/
- *
+ * {@code jar:http://www.foo.com/bar/baz.jar!/}
*
*
Users should cast the generic URLConnection to a * JarURLConnection when they know that the URL they created is a JAR @@ -76,19 +72,19 @@ import sun.net.www.ParseUtil; *
jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class
+ * jar:http://www.foo.com/bar/baz.jar!/
+ * jar:http://www.foo.com/bar/baz.jar!/COM/foo/
+ * !/ is refered to as the separator.
+ *
{@code !/} is refered to as the separator. * - *
When constructing a JAR url via new URL(context, spec),
+ *
When constructing a JAR url via {@code new URL(context, spec)}, * the following rules apply: * *
null
+ * reached. Otherwise, this method will return {@code null}
*
* @return the Certificate object for this connection if the URL
* for it points to a JAR file entry, null otherwise.
diff --git a/jdk/src/share/classes/java/net/MalformedURLException.java b/jdk/src/share/classes/java/net/MalformedURLException.java
index f6ed89219fa..7aef75c7821 100644
--- a/jdk/src/share/classes/java/net/MalformedURLException.java
+++ b/jdk/src/share/classes/java/net/MalformedURLException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, 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
@@ -39,13 +39,13 @@ public class MalformedURLException extends IOException {
private static final long serialVersionUID = -182787522200415866L;
/**
- * Constructs a MalformedURLException with no detail message.
+ * Constructs a {@code MalformedURLException} with no detail message.
*/
public MalformedURLException() {
}
/**
- * Constructs a MalformedURLException with the
+ * Constructs a {@code MalformedURLException} with the
* specified detail message.
*
* @param msg the detail message.
diff --git a/jdk/src/share/classes/java/net/MulticastSocket.java b/jdk/src/share/classes/java/net/MulticastSocket.java
index 0a4d7c1023d..9c5cb05acbb 100644
--- a/jdk/src/share/classes/java/net/MulticastSocket.java
+++ b/jdk/src/share/classes/java/net/MulticastSocket.java
@@ -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 @@ class MulticastSocket extends DatagramSocket {
* Create a multicast socket.
*
* If there is a security manager,
- * its checkListen 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.
*
@@ -103,7 +103,7 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
- * checkListen 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 @@ class MulticastSocket extends DatagramSocket {
* Create a multicast socket and bind it to a specific port.
*
*
If there is a security manager,
- * its checkListen method is first called
- * with the port 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.
*
@@ -128,7 +128,7 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
- * checkListen 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 @@ class MulticastSocket extends DatagramSocket {
/**
* Create a MulticastSocket bound to the specified socket address.
*
- * Or, if the address is null, create an unbound socket.
+ * Or, if the address is {@code null}, create an unbound socket.
*
*
If there is a security manager,
- * its checkListen 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.
*
@@ -150,12 +150,12 @@ class MulticastSocket extends DatagramSocket {
* {@link DatagramSocket#setReuseAddress(boolean)} method is
* called to enable the SO_REUSEADDR socket option.
*
- * @param bindaddr Socket address to bind to, or null 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
- * checkListen 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 @@ class MulticastSocket extends DatagramSocket {
/**
* Set the default time-to-live for multicast packets sent out
- * on this MulticastSocket in order to control the
+ * on this {@code MulticastSocket} in order to control the
* scope of the multicasts.
*
*
The ttl is an unsigned 8-bit quantity, and so must be
@@ -279,11 +279,11 @@ class MulticastSocket extends DatagramSocket {
/**
* Joins a multicast group. Its behavior may be affected by
- * setInterface or setNetworkInterface.
+ * {@code setInterface} or {@code setNetworkInterface}.
*
*
If there is a security manager, this method first
- * calls its checkMulticast method
- * with the mcastaddr 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 @@ class MulticastSocket extends DatagramSocket {
* @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
- * checkMulticast method doesn't allow the join.
+ * {@code checkMulticast} method doesn't allow the join.
*
* @see SecurityManager#checkMulticast(InetAddress)
*/
@@ -325,18 +325,18 @@ class MulticastSocket extends DatagramSocket {
/**
* Leave a multicast group. Its behavior may be affected by
- * setInterface or setNetworkInterface.
+ * {@code setInterface} or {@code setNetworkInterface}.
*
*
If there is a security manager, this method first
- * calls its checkMulticast method
- * with the mcastaddr 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
- * checkMulticast method doesn't allow the operation.
+ * {@code checkMulticast} method doesn't allow the operation.
*
* @see SecurityManager#checkMulticast(InetAddress)
*/
@@ -362,8 +362,8 @@ class MulticastSocket extends DatagramSocket {
* Joins the specified multicast group at the specified interface.
*
*
If there is a security manager, this method first
- * calls its checkMulticast method
- * with the mcastaddr 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 @@ class MulticastSocket extends DatagramSocket {
* @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
- * checkMulticast 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 @@ class MulticastSocket extends DatagramSocket {
* Leave a multicast group on a specified local interface.
*
*
If there is a security manager, this method first
- * calls its checkMulticast method
- * with the mcastaddr 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 @@ class MulticastSocket extends DatagramSocket {
* @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
- * checkMulticast 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 @@ class MulticastSocket extends DatagramSocket {
* Retrieve the address of the network interface used for
* multicast packets.
*
- * @return An InetAddress representing
+ * @return An {@code InetAddress} representing
* the address of the network interface used for
* multicast packets.
*
@@ -562,7 +562,7 @@ class MulticastSocket extends DatagramSocket {
*
* @exception SocketException if there is an error in
* the underlying protocol, such as a TCP error.
- * @return the multicast NetworkInterface currently set
+ * @return the multicast {@code NetworkInterface} currently set
* @see #setNetworkInterface(NetworkInterface)
* @since 1.4
*/
@@ -587,7 +587,7 @@ class MulticastSocket extends DatagramSocket {
*
Because this option is a hint, applications that want to
* verify what loopback mode is set to should call
* {@link #getLoopbackMode()}
- * @param disable true 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 @@ class MulticastSocket extends DatagramSocket {
* otherwise it is preferable to set a TTL once on the socket, and
* use that default TTL for all packets. This method does not
* alter the default TTL for the socket. Its behavior may be
- * affected by setInterface.
+ * affected by {@code setInterface}.
*
*
If there is a security manager, this method first performs some
- * security checks. First, if p.getAddress().isMulticastAddress()
+ * security checks. First, if {@code p.getAddress().isMulticastAddress()}
* is true, this method calls the
- * security manager's checkMulticast method
- * with p.getAddress() and ttl 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
- * checkConnect method with arguments
- * p.getAddress().getHostAddress() and
- * p.getPort(). 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 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException is raised if an error occurs i.e
* error while setting ttl.
* @exception SecurityException if a security manager exists and its
- * checkMulticast or checkConnect
+ * {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
*
* @deprecated Use the following code or its equivalent instead:
diff --git a/jdk/src/share/classes/java/net/NetPermission.java b/jdk/src/share/classes/java/net/NetPermission.java
index f11337e5b9e..cf7cbd2af67 100644
--- a/jdk/src/share/classes/java/net/NetPermission.java
+++ b/jdk/src/share/classes/java/net/NetPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -177,8 +177,8 @@ public final class NetPermission extends BasicPermission {
*
* @param name the name of the NetPermission.
*
- * @throws NullPointerException if name is null.
- * @throws IllegalArgumentException if name is empty.
+ * @throws NullPointerException if {@code name} is {@code null}.
+ * @throws IllegalArgumentException if {@code name} is empty.
*/
public NetPermission(String name)
@@ -194,8 +194,8 @@ public final class NetPermission extends BasicPermission {
* @param name the name of the NetPermission.
* @param actions should be null.
*
- * @throws NullPointerException if name is null.
- * @throws IllegalArgumentException if name is empty.
+ * @throws NullPointerException if {@code name} is {@code null}.
+ * @throws IllegalArgumentException if {@code name} is empty.
*/
public NetPermission(String name, String actions)
diff --git a/jdk/src/share/classes/java/net/NetworkInterface.java b/jdk/src/share/classes/java/net/NetworkInterface.java
index c1644dea2bc..411d8df14b9 100644
--- a/jdk/src/share/classes/java/net/NetworkInterface.java
+++ b/jdk/src/share/classes/java/net/NetworkInterface.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -98,9 +98,9 @@ public final class NetworkInterface {
* Convenience method to return an Enumeration with all or a
* subset of the InetAddresses bound to this network interface.
*
- * If there is a security manager, its checkConnect
+ * If there is a security manager, its {@code checkConnect}
* method is called for each InetAddress. Only InetAddresses where
- * the checkConnect doesn't throw a SecurityException
+ * the {@code checkConnect} doesn't throw a SecurityException
* will be returned in the Enumeration. However, if the caller has the
* {@link NetPermission}("getNetworkInformation") permission, then all
* InetAddresses are returned.
@@ -154,15 +154,15 @@ public final class NetworkInterface {
}
/**
- * Get a List of all or a subset of the InterfaceAddresses
+ * Get a List of all or a subset of the {@code InterfaceAddresses}
* of this network interface.
*
- * If there is a security manager, its checkConnect
+ * If there is a security manager, its {@code checkConnect}
* method is called with the InetAddress for each InterfaceAddress.
- * Only InterfaceAddresses where the checkConnect doesn't throw
+ * Only InterfaceAddresses where the {@code checkConnect} doesn't throw
* a SecurityException will be returned in the List.
*
- * @return a List object with all or a subset of the
+ * @return a {@code List} object with all or a subset of the
* InterfaceAddresss of this network interface
* @since 1.6
*/
@@ -216,10 +216,10 @@ public final class NetworkInterface {
/**
* Returns the parent NetworkInterface of this interface if this is
- * a subinterface, or null if it is a physical
+ * a subinterface, or {@code null} if it is a physical
* (non virtual) interface or has no parent.
*
- * @return The NetworkInterface this interface is attached to.
+ * @return The {@code NetworkInterface} this interface is attached to.
* @since 1.6
*/
public NetworkInterface getParent() {
@@ -260,15 +260,15 @@ public final class NetworkInterface {
* @param name
* The name of the network interface.
*
- * @return A NetworkInterface with the specified name,
- * or null if there is no network interface
+ * @return A {@code NetworkInterface} with the specified name,
+ * or {@code null} if there is no network interface
* with the specified name.
*
* @throws SocketException
* If an I/O error occurs.
*
* @throws NullPointerException
- * If the specified name is null.
+ * If the specified name is {@code null}.
*/
public static NetworkInterface getByName(String name) throws SocketException {
if (name == null)
@@ -303,17 +303,17 @@ public final class NetworkInterface {
* returned.
*
* @param addr
- * The InetAddress to search with.
+ * The {@code InetAddress} to search with.
*
- * @return A NetworkInterface
- * or null if there is no network interface
+ * @return A {@code NetworkInterface}
+ * or {@code null} if there is no network interface
* with the specified IP address.
*
* @throws SocketException
* If an I/O error occurs.
*
* @throws NullPointerException
- * If the specified address is null.
+ * If the specified address is {@code null}.
*/
public static NetworkInterface getByInetAddress(InetAddress addr) throws SocketException {
if (addr == null) {
@@ -378,7 +378,7 @@ public final class NetworkInterface {
/**
* Returns whether a network interface is up and running.
*
- * @return true if the interface is up and running.
+ * @return {@code true} if the interface is up and running.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -390,7 +390,7 @@ public final class NetworkInterface {
/**
* Returns whether a network interface is a loopback interface.
*
- * @return true if the interface is a loopback interface.
+ * @return {@code true} if the interface is a loopback interface.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -404,7 +404,7 @@ public final class NetworkInterface {
* A typical point to point interface would be a PPP connection through
* a modem.
*
- * @return true if the interface is a point to point
+ * @return {@code true} if the interface is a point to point
* interface.
* @exception SocketException if an I/O error occurs.
* @since 1.6
@@ -417,7 +417,7 @@ public final class NetworkInterface {
/**
* Returns whether a network interface supports multicasting or not.
*
- * @return true if the interface supports Multicasting.
+ * @return {@code true} if the interface supports Multicasting.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -432,7 +432,7 @@ public final class NetworkInterface {
* If a security manager is set, then the caller must have
* the permission {@link NetPermission}("getNetworkInformation").
*
- * @return a byte array containing the address, or null if
+ * @return a byte array containing the address, or {@code null} if
* the address doesn't exist, is not accessible or a security
* manager is set and the caller does not have the permission
* NetPermission("getNetworkInformation")
@@ -481,7 +481,7 @@ public final class NetworkInterface {
* can be several virtual interfaces attached to a single physical
* interface.
*
- * @return true if this interface is a virtual interface.
+ * @return {@code true} if this interface is a virtual interface.
* @since 1.6
*/
public boolean isVirtual() {
@@ -497,16 +497,16 @@ public final class NetworkInterface {
/**
* Compares this object against the specified object.
- * The result is true if and only if the argument is
- * not null and it represents the same NetworkInterface
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same NetworkInterface
* as this object.
*
- * Two instances of NetworkInterface represent the same
+ * Two instances of {@code NetworkInterface} represent the same
* NetworkInterface if both name and addrs are the same for both.
*
* @param obj the object to compare against.
- * @return true if the objects are the same;
- * false otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
diff --git a/jdk/src/share/classes/java/net/PasswordAuthentication.java b/jdk/src/share/classes/java/net/PasswordAuthentication.java
index ee2280fc730..5529568f3a3 100644
--- a/jdk/src/share/classes/java/net/PasswordAuthentication.java
+++ b/jdk/src/share/classes/java/net/PasswordAuthentication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -43,11 +43,11 @@ public final class PasswordAuthentication {
private char[] password;
/**
- * Creates a new PasswordAuthentication object from the given
+ * Creates a new {@code PasswordAuthentication} object from the given
* user name and password.
*
*
Note that the given user password is cloned before it is stored in
- * the new PasswordAuthentication object.
+ * the new {@code PasswordAuthentication} object.
*
* @param userName the user name
* @param password the user's password
diff --git a/jdk/src/share/classes/java/net/PortUnreachableException.java b/jdk/src/share/classes/java/net/PortUnreachableException.java
index c21345fb7d9..8d1f21b0e87 100644
--- a/jdk/src/share/classes/java/net/PortUnreachableException.java
+++ b/jdk/src/share/classes/java/net/PortUnreachableException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -36,7 +36,7 @@ public class PortUnreachableException extends SocketException {
private static final long serialVersionUID = 8462541992376507323L;
/**
- * Constructs a new PortUnreachableException with a
+ * Constructs a new {@code PortUnreachableException} with a
* detail message.
* @param msg the detail message
*/
@@ -45,7 +45,7 @@ public class PortUnreachableException extends SocketException {
}
/**
- * Construct a new PortUnreachableException with no
+ * Construct a new {@code PortUnreachableException} with no
* detailed message.
*/
public PortUnreachableException() {}
diff --git a/jdk/src/share/classes/java/net/ProtocolException.java b/jdk/src/share/classes/java/net/ProtocolException.java
index 74ff4f1322e..ebb94eb16ca 100644
--- a/jdk/src/share/classes/java/net/ProtocolException.java
+++ b/jdk/src/share/classes/java/net/ProtocolException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, 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
@@ -39,7 +39,7 @@ class ProtocolException extends IOException {
private static final long serialVersionUID = -6098449442062388080L;
/**
- * Constructs a new ProtocolException with the
+ * Constructs a new {@code ProtocolException} with the
* specified detail message.
*
* @param host the detail message.
@@ -49,7 +49,7 @@ class ProtocolException extends IOException {
}
/**
- * Constructs a new ProtocolException with no detail message.
+ * Constructs a new {@code ProtocolException} with no detail message.
*/
public ProtocolException() {
}
diff --git a/jdk/src/share/classes/java/net/Proxy.java b/jdk/src/share/classes/java/net/Proxy.java
index 4b8b6f148d5..fe481fadfa2 100644
--- a/jdk/src/share/classes/java/net/Proxy.java
+++ b/jdk/src/share/classes/java/net/Proxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -28,7 +28,7 @@ package java.net;
/**
* This class represents a proxy setting, typically a type (http, socks) and
* a socket address.
- * A Proxy is an immutable object.
+ * A {@code Proxy} is an immutable object.
*
* @see java.net.ProxySelector
* @author Yingxian Wang
@@ -61,17 +61,17 @@ public class Proxy {
private SocketAddress sa;
/**
- * A proxy setting that represents a DIRECT connection,
+ * A proxy setting that represents a {@code DIRECT} connection,
* basically telling the protocol handler not to use any proxying.
* Used, for instance, to create sockets bypassing any other global
* proxy settings (like SOCKS):
*
- * Socket s = new Socket(Proxy.NO_PROXY);
+ * {@code Socket s = new Socket(Proxy.NO_PROXY);}
*
*/
public final static Proxy NO_PROXY = new Proxy();
- // Creates the proxy that represents a DIRECT connection.
+ // Creates the proxy that represents a {@code DIRECT} connection.
private Proxy() {
type = Type.DIRECT;
sa = null;
@@ -82,11 +82,11 @@ public class Proxy {
* Certain combinations are illegal. For instance, for types Http, and
* Socks, a SocketAddress must be provided.
*
- * Use the Proxy.NO_PROXY constant
+ * Use the {@code Proxy.NO_PROXY} constant
* for representing a direct connection.
*
- * @param type the Type of the proxy
- * @param sa the SocketAddress for that proxy
+ * @param type the {@code Type} of the proxy
+ * @param sa the {@code SocketAddress} for that proxy
* @throws IllegalArgumentException when the type and the address are
* incompatible
*/
@@ -108,9 +108,9 @@ public class Proxy {
/**
* Returns the socket address of the proxy, or
- * null if its a direct connection.
+ * {@code null} if its a direct connection.
*
- * @return a SocketAddress representing the socket end
+ * @return a {@code SocketAddress} representing the socket end
* point of the proxy
*/
public SocketAddress address() {
@@ -121,7 +121,7 @@ public class Proxy {
* Constructs a string representation of this Proxy.
* This String is constructed by calling toString() on its type
* and concatenating " @ " and the toString() result from its address
- * if its type is not DIRECT.
+ * if its type is not {@code DIRECT}.
*
* @return a string representation of this object.
*/
@@ -133,16 +133,16 @@ public class Proxy {
/**
* Compares this object against the specified object.
- * The result is true if and only if the argument is
- * not null and it represents the same proxy as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same proxy as
* this object.
*
- * Two instances of Proxy represent the same
+ * Two instances of {@code Proxy} represent the same
* address if both the SocketAddresses and type are equal.
*
* @param obj the object to compare against.
- * @return true if the objects are the same;
- * false otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetSocketAddress#equals(java.lang.Object)
*/
public final boolean equals(Object obj) {
diff --git a/jdk/src/share/classes/java/net/ProxySelector.java b/jdk/src/share/classes/java/net/ProxySelector.java
index 6aa01ffd2e3..d6bb53656fd 100644
--- a/jdk/src/share/classes/java/net/ProxySelector.java
+++ b/jdk/src/share/classes/java/net/ProxySelector.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -83,9 +83,9 @@ public abstract class ProxySelector {
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}("getProxySelector")
+ * {@link NetPermission}{@code ("getProxySelector")}
* @see #setDefault(ProxySelector)
- * @return the system-wide ProxySelector
+ * @return the system-wide {@code ProxySelector}
* @since 1.5
*/
public static ProxySelector getDefault() {
@@ -102,11 +102,11 @@ public abstract class ProxySelector {
* Note: non-standard protocol handlers may ignore this setting.
*
* @param ps The HTTP proxy selector, or
- * null to unset the proxy selector.
+ * {@code null} to unset the proxy selector.
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}("setProxySelector")
+ * {@link NetPermission}{@code ("setProxySelector")}
*
* @see #getDefault()
* @since 1.5
@@ -127,7 +127,7 @@ public abstract class ProxySelector {
*
socket://host:portResponseCache
+ * @return the system-wide {@code ResponseCache}
* @since 1.5
*/
public synchronized static ResponseCache getDefault() {
@@ -94,11 +94,11 @@ public abstract class ResponseCache {
* Note: non-standard procotol handlers may ignore this setting.
*
* @param responseCache The response cache, or
- * null to unset the cache.
+ * {@code null} to unset the cache.
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}("setResponseCache")
+ * {@link NetPermission}{@code ("setResponseCache")}
*
* @see #getDefault()
* @since 1.5
@@ -118,14 +118,14 @@ public abstract class ResponseCache {
* to get the network resource. If a cached response is returned,
* that resource is used instead.
*
- * @param uri a URI used to reference the requested
+ * @param uri a {@code URI} used to reference the requested
* network resource
- * @param rqstMethod a String representing the request
+ * @param rqstMethod a {@code String} representing the request
* method
* @param rqstHeaders - a Map from request header
* field names to lists of field values representing
* the current request headers
- * @return a CacheResponse instance if available
+ * @return a {@code CacheResponse} instance if available
* from cache, or null otherwise
* @throws IOException if an I/O error occurs
* @throws IllegalArgumentException if any one of the arguments is null
@@ -148,11 +148,11 @@ public abstract class ResponseCache {
* use to write the resource into the cache. If the resource is
* not to be cached, then put must return null.
*
- * @param uri a URI used to reference the requested
+ * @param uri a {@code URI} used to reference the requested
* network resource
* @param conn - a URLConnection instance that is used to fetch
* the response to be cached
- * @return a CacheRequest for recording the
+ * @return a {@code CacheRequest} for recording the
* response to be cached. Null return indicates that
* the caller does not intend to cache the response.
* @throws IOException if an I/O error occurs
diff --git a/jdk/src/share/classes/java/net/ServerSocket.java b/jdk/src/share/classes/java/net/ServerSocket.java
index 0b69ad6a266..bcc77ae42f3 100644
--- a/jdk/src/share/classes/java/net/ServerSocket.java
+++ b/jdk/src/share/classes/java/net/ServerSocket.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, 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
@@ -37,7 +37,7 @@ import java.security.PrivilegedExceptionAction;
* based on that request, and then possibly returns a result to the requester.
*
* The actual work of the server socket is performed by an instance
- * of the SocketImpl class. An application can
+ * of the {@code SocketImpl} class. An application can
* change the socket factory that creates the socket
* implementation to configure itself to create sockets
* appropriate to the local firewall.
@@ -89,31 +89,31 @@ class ServerSocket implements java.io.Closeable {
/**
* Creates a server socket, bound to the specified port. A port number
- * of 0 means that the port number is automatically
+ * of {@code 0} means that the port number is automatically
* allocated, typically from an ephemeral port range. This port
* number can then be retrieved by calling {@link #getLocalPort getLocalPort}.
*
* The maximum queue length for incoming connection indications (a
- * request to connect) is set to 50. If a connection
+ * request to connect) is set to {@code 50}. If a connection
* indication arrives when the queue is full, the connection is refused.
*
* If the application has specified a server socket factory, that
- * factory's createSocketImpl method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
*
* If there is a security manager,
- * its checkListen method is called
- * with the port argument
+ * its {@code checkListen} method is called
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
*
- * @param port the port number, or 0 to use a port
+ * @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
*
* @exception IOException if an I/O error occurs when opening the socket.
* @exception SecurityException
- * if a security manager exists and its checkListen
+ * if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
@@ -131,42 +131,42 @@ class ServerSocket implements java.io.Closeable {
/**
* Creates a server socket and binds it to the specified local port
* number, with the specified backlog.
- * A port number of 0 means that the port number is
+ * A port number of {@code 0} means that the port number is
* automatically allocated, typically from an ephemeral port range.
* This port number can then be retrieved by calling
* {@link #getLocalPort getLocalPort}.
*
* The maximum queue length for incoming connection indications (a
- * request to connect) is set to the backlog parameter. If
+ * request to connect) is set to the {@code backlog} parameter. If
* a connection indication arrives when the queue is full, the
* connection is refused.
*
* If the application has specified a server socket factory, that
- * factory's createSocketImpl method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
*
* If there is a security manager,
- * its checkListen method is called
- * with the port argument
+ * its {@code checkListen} method is called
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * The backlog argument is the requested maximum number of
+ * The {@code backlog} argument is the requested maximum number of
* pending connections on the socket. Its exact semantics are implementation
* specific. In particular, an implementation may impose a maximum length
* or may choose to ignore the parameter altogther. The value provided
- * should be greater than 0. If it is less than or equal to
- * 0, then an implementation specific default will be used.
+ * should be greater than {@code 0}. If it is less than or equal to
+ * {@code 0}, then an implementation specific default will be used.
*
*
- * @param port the port number, or 0 to use a port
+ * @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
* @param backlog requested maximum length of the queue of incoming
* connections.
*
* @exception IOException if an I/O error occurs when opening the socket.
* @exception SecurityException
- * if a security manager exists and its checkListen
+ * if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
@@ -189,32 +189,32 @@ class ServerSocket implements java.io.Closeable {
* If bindAddr is null, it will default accepting
* connections on any/all local addresses.
* The port must be between 0 and 65535, inclusive.
- * A port number of 0 means that the port number is
+ * A port number of {@code 0} means that the port number is
* automatically allocated, typically from an ephemeral port range.
* This port number can then be retrieved by calling
* {@link #getLocalPort getLocalPort}.
*
*
If there is a security manager, this method
- * calls its checkListen method
- * with the port argument
+ * calls its {@code checkListen} method
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * The backlog argument is the requested maximum number of
+ * The {@code backlog} argument is the requested maximum number of
* pending connections on the socket. Its exact semantics are implementation
* specific. In particular, an implementation may impose a maximum length
* or may choose to ignore the parameter altogther. The value provided
- * should be greater than 0. If it is less than or equal to
- * 0, then an implementation specific default will be used.
+ * should be greater than {@code 0}. If it is less than or equal to
+ * {@code 0}, then an implementation specific default will be used.
*
- * @param port the port number, or 0 to use a port
+ * @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
* @param backlog requested maximum length of the queue of incoming
* connections.
* @param bindAddr the local InetAddress the server will bind to
*
* @throws SecurityException if a security manager exists and
- * its checkListen method doesn't allow the operation.
+ * its {@code checkListen} method doesn't allow the operation.
*
* @throws IOException if an I/O error occurs when opening the socket.
* @exception IllegalArgumentException if the port parameter is outside
@@ -245,10 +245,10 @@ class ServerSocket implements java.io.Closeable {
}
/**
- * Get the SocketImpl attached to this socket, creating
+ * Get the {@code SocketImpl} attached to this socket, creating
* it if necessary.
*
- * @return the SocketImpl attached to that ServerSocket.
+ * @return the {@code SocketImpl} attached to that ServerSocket.
* @throws SocketException if creation fails.
* @since 1.4
*/
@@ -310,17 +310,17 @@ class ServerSocket implements java.io.Closeable {
/**
*
- * Binds the ServerSocket to a specific address
+ * Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
*
- * If the address is null, then the system will pick up
+ * If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
*
* @param endpoint The IP address and port number to bind to.
* @throws IOException if the bind operation fails, or if the socket
* is already bound.
- * @throws SecurityException if a SecurityManager is present and
- * its checkListen method doesn't allow the operation.
+ * @throws SecurityException if a {@code SecurityManager} is present and
+ * its {@code checkListen} method doesn't allow the operation.
* @throws IllegalArgumentException if endpoint is a
* SocketAddress subclass not supported by this socket
* @since 1.4
@@ -331,25 +331,25 @@ class ServerSocket implements java.io.Closeable {
/**
*
- * Binds the ServerSocket to a specific address
+ * Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
*
- * If the address is null, then the system will pick up
+ * If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
*
- * The backlog argument is the requested maximum number of
+ * The {@code backlog} argument is the requested maximum number of
* pending connections on the socket. Its exact semantics are implementation
* specific. In particular, an implementation may impose a maximum length
* or may choose to ignore the parameter altogther. The value provided
- * should be greater than 0. If it is less than or equal to
- * 0, then an implementation specific default will be used.
+ * should be greater than {@code 0}. If it is less than or equal to
+ * {@code 0}, then an implementation specific default will be used.
* @param endpoint The IP address and port number to bind to.
* @param backlog requested maximum length of the queue of
* incoming connections.
* @throws IOException if the bind operation fails, or if the socket
* is already bound.
- * @throws SecurityException if a SecurityManager is present and
- * its checkListen method doesn't allow the operation.
+ * @throws SecurityException if a {@code SecurityManager} is present and
+ * its {@code checkListen} method doesn't allow the operation.
* @throws IllegalArgumentException if endpoint is a
* SocketAddress subclass not supported by this socket
* @since 1.4
@@ -480,18 +480,18 @@ class ServerSocket implements java.io.Closeable {
* Listens for a connection to be made to this socket and accepts
* it. The method blocks until a connection is made.
*
- *
A new Socket s is created and, if there
+ *
A new Socket {@code s} is created and, if there
* is a security manager,
- * the security manager's checkAccept method is called
- * with s.getInetAddress().getHostAddress() and
- * s.getPort()
+ * the security manager's {@code checkAccept} method is called
+ * with {@code s.getInetAddress().getHostAddress()} and
+ * {@code s.getPort()}
* as its arguments to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @exception IOException if an I/O error occurs when waiting for a
* connection.
* @exception SecurityException if a security manager exists and its
- * checkAccept method doesn't allow the operation.
+ * {@code checkAccept} method doesn't allow the operation.
* @exception SocketTimeoutException if a timeout was previously set with setSoTimeout and
* the timeout has been reached.
* @exception java.nio.channels.IllegalBlockingModeException
@@ -597,7 +597,7 @@ class ServerSocket implements java.io.Closeable {
* method.
*
* @return the server-socket channel associated with this socket,
- * or null if this socket was not created
+ * or {@code null} if this socket was not created
* for a channel
*
* @since 1.4
@@ -678,18 +678,18 @@ class ServerSocket implements java.io.Closeable {
*
* When a TCP connection is closed the connection may remain * in a timeout state for a period of time after the connection - * is closed (typically known as the TIME_WAIT state - * or 2MSL wait state). + * is closed (typically known as the {@code TIME_WAIT} state + * or {@code 2MSL} wait state). * For applications using a well known socket address or port * it may not be possible to bind a socket to the required - * SocketAddress if there is a connection in the + * {@code SocketAddress} if there is a connection in the * timeout state involving the socket address or port. *
* Enabling {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} prior to * binding the socket using {@link #bind(SocketAddress)} allows the socket * to be bound even though a previous connection is in a timeout state. *
- * When a ServerSocket is created the initial setting
+ * When a {@code ServerSocket} is created the initial setting
* of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is not defined.
* Applications can use {@link #getReuseAddress()} to determine the initial
* setting of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}.
@@ -717,7 +717,7 @@ class ServerSocket implements java.io.Closeable {
/**
* Tests if {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
*
- * @return a boolean indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -732,7 +732,7 @@ class ServerSocket implements java.io.Closeable {
/**
* Returns the implementation address and implementation port of
- * this socket as a String.
+ * this socket as a {@code String}.
*
* If there is a security manager set, its {@code checkConnect} method is * called with the local address and {@code -1} as its arguments to see @@ -773,14 +773,14 @@ class ServerSocket implements java.io.Closeable { * application. The factory can be specified only once. *
* When an application creates a new server socket, the socket
- * implementation factory's createSocketImpl method is
+ * implementation factory's {@code createSocketImpl} method is
* called to create the actual socket implementation.
*
- * Passing null to the method is a no-op unless the factory
+ * Passing {@code null} to the method is a no-op unless the factory
* was already set.
*
* If there is a security manager, this method first calls
- * the security manager's checkSetFactory method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
@@ -789,7 +789,7 @@ class ServerSocket implements java.io.Closeable {
* socket factory.
* @exception SocketException if the factory has already been defined.
* @exception SecurityException if a security manager exists and its
- * checkSetFactory method doesn't allow the operation.
+ * {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory
*/
@@ -807,7 +807,7 @@ class ServerSocket implements java.io.Closeable {
/**
* Sets a default proposed value for the
* {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option for sockets
- * accepted from this ServerSocket. The value actually set
+ * accepted from this {@code ServerSocket}. The value actually set
* in the accepted socket must be determined by calling
* {@link Socket#getReceiveBufferSize()} after the socket
* is returned by {@link #accept()}.
@@ -851,13 +851,13 @@ class ServerSocket implements java.io.Closeable {
/**
* Gets the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option
- * for this ServerSocket, that is the proposed buffer size that
- * will be used for Sockets accepted from this ServerSocket.
+ * for this {@code ServerSocket}, that is the proposed buffer size that
+ * will be used for Sockets accepted from this {@code ServerSocket}.
*
*
Note, the value actually set in the accepted socket is determined by * calling {@link Socket#getReceiveBufferSize()}. * @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} - * option for this Socket. + * option for this {@code Socket}. * @exception SocketException if there is an error * in the underlying protocol, such as a TCP error. * @see #setReceiveBufferSize(int) @@ -891,24 +891,24 @@ class ServerSocket implements java.io.Closeable { * compared, with larger values indicating stronger preferences. If the * application prefers short connection time over both low latency and high * bandwidth, for example, then it could invoke this method with the values - * (1, 0, 0). If the application prefers high bandwidth above low + * {@code (1, 0, 0)}. If the application prefers high bandwidth above low * latency, and low latency above short connection time, then it could - * invoke this method with the values (0, 1, 2). + * invoke this method with the values {@code (0, 1, 2)}. * *
Invoking this method after this socket has been bound * will have no effect. This implies that in order to use this capability * requires the socket to be created with the no-argument constructor. * * @param connectionTime - * An int expressing the relative importance of a short + * An {@code int} expressing the relative importance of a short * connection time * * @param latency - * An int expressing the relative importance of low + * An {@code int} expressing the relative importance of low * latency * * @param bandwidth - * An int expressing the relative importance of high + * An {@code int} expressing the relative importance of high * bandwidth * * @since 1.5 diff --git a/jdk/src/share/classes/java/net/Socket.java b/jdk/src/share/classes/java/net/Socket.java index 8ab5e866ee2..361260351f5 100644 --- a/jdk/src/share/classes/java/net/Socket.java +++ b/jdk/src/share/classes/java/net/Socket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2011, 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 @@ -39,7 +39,7 @@ import java.security.PrivilegedAction; * between two machines. *
* The actual work of the socket is performed by an instance of the
- * SocketImpl class. An application, by changing
+ * {@code SocketImpl} class. An application, by changing
* the socket factory that creates the socket implementation,
* can configure itself to create sockets appropriate to the local
* firewall.
@@ -88,14 +88,14 @@ class Socket implements java.io.Closeable {
* Creates an unconnected socket, specifying the type of proxy, if any,
* that should be used regardless of any other settings.
*
- * If there is a security manager, its checkConnect method
+ * If there is a security manager, its {@code checkConnect} method
* is called with the proxy host address and port number
* as its arguments. This could result in a SecurityException.
*
* Examples: - *
Socket s = new Socket(Proxy.NO_PROXY); will create
+ * Socket s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("socks.mydom.com", 1080)));
+ * null.
+ * or {@code null}.
* @throws SecurityException if a security manager is present and
* permission to connect to the proxy is
* denied.
@@ -173,21 +173,22 @@ class Socket implements java.io.Closeable {
* Creates a stream socket and connects it to the specified port
* number on the named host.
* - * If the specified host is null it is the equivalent of - * specifying the address as {@link java.net.InetAddress#getByName InetAddress.getByName}(null). + * If the specified host is {@code null} it is the equivalent of + * specifying the address as + * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}. * In other words, it is equivalent to specifying an address of the * loopback interface.
*
* If the application has specified a server socket factory, that
- * factory's createSocketImpl method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
*
* If there is a security manager, its
- * checkConnect method is called
- * with the host address and port
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
- * @param host the host name, or null for the loopback address.
+ * @param host the host name, or {@code null} for the loopback address.
* @param port the port number.
*
* @exception UnknownHostException if the IP address of
@@ -195,7 +196,7 @@ class Socket implements java.io.Closeable {
*
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * checkConnect method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
@@ -217,23 +218,23 @@ class Socket implements java.io.Closeable {
* number at the specified IP address.
*
* If the application has specified a socket factory, that factory's
- * createSocketImpl method is called to create the
+ * {@code createSocketImpl} method is called to create the
* actual socket implementation. Otherwise a "plain" socket is created.
*
* If there is a security manager, its
- * checkConnect method is called
- * with the host address and port
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
* @param address the IP address.
* @param port the port number.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * checkConnect method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
- * @exception NullPointerException if address is null.
+ * @exception NullPointerException if {@code address} is null.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
* @see java.net.SocketImpl
* @see java.net.SocketImplFactory#createSocketImpl()
@@ -249,28 +250,29 @@ class Socket implements java.io.Closeable {
* the specified remote port. The Socket will also bind() to the local
* address and port supplied.
*
- * If the specified host is null it is the equivalent of - * specifying the address as {@link java.net.InetAddress#getByName InetAddress.getByName}(null). + * If the specified host is {@code null} it is the equivalent of + * specifying the address as + * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}. * In other words, it is equivalent to specifying an address of the * loopback interface.
*
- * A local port number of zero will let the system pick up a
- * free port in the bind operation.
* If there is a security manager, its
- * checkConnect method is called
- * with the host address and port
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
- * @param host the name of the remote host, or null for the loopback address.
+ * @param host the name of the remote host, or {@code null} for the loopback address.
* @param port the remote port
* @param localAddr the local address the socket is bound to, or
- * null for the anyLocal address.
+ * {@code null} for the {@code anyLocal} address.
* @param localPort the local port the socket is bound to, or
- * zero for a system selected free port.
+ * {@code zero} for a system selected free port.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * checkConnect method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter or localPort
* parameter is outside the specified range of valid port values,
* which is between 0 and 65535, inclusive.
@@ -289,30 +291,31 @@ class Socket implements java.io.Closeable {
* the specified remote port. The Socket will also bind() to the local
* address and port supplied.
*
- * If the specified local address is null it is the equivalent of - * specifying the address as the AnyLocal address (see {@link java.net.InetAddress#isAnyLocalAddress InetAddress.isAnyLocalAddress}()). + * If the specified local address is {@code null} it is the equivalent of + * specifying the address as the AnyLocal address + * (see {@link java.net.InetAddress#isAnyLocalAddress InetAddress.isAnyLocalAddress}{@code ()}). *
- * A local port number of zero will let the system pick up a
- * free port in the bind operation.
* If there is a security manager, its
- * checkConnect method is called
- * with the host address and port
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
* @param address the remote address
* @param port the remote port
* @param localAddr the local address the socket is bound to, or
- * null for the anyLocal address.
+ * {@code null} for the {@code anyLocal} address.
* @param localPort the local port the socket is bound to or
- * zero for a system selected free port.
+ * {@code zero} for a system selected free port.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * checkConnect method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter or localPort
* parameter is outside the specified range of valid port values,
* which is between 0 and 65535, inclusive.
- * @exception NullPointerException if address is null.
+ * @exception NullPointerException if {@code address} is null.
* @see SecurityManager#checkConnect
* @since JDK1.1
*/
@@ -326,33 +329,34 @@ class Socket implements java.io.Closeable {
* Creates a stream socket and connects it to the specified port
* number on the named host.
*
- * If the specified host is null it is the equivalent of - * specifying the address as {@link java.net.InetAddress#getByName InetAddress.getByName}(null). + * If the specified host is {@code null} it is the equivalent of + * specifying the address as + * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}. * In other words, it is equivalent to specifying an address of the * loopback interface.
*
- * If the stream argument is true, this creates a
- * stream socket. If the stream argument is false, it
+ * If the stream argument is {@code true}, this creates a
+ * stream socket. If the stream argument is {@code false}, it
* creates a datagram socket.
*
* If the application has specified a server socket factory, that
- * factory's createSocketImpl method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
*
* If there is a security manager, its
- * checkConnect method is called
- * with the host address and port
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
* If a UDP socket is used, TCP/IP related socket options will not apply.
*
- * @param host the host name, or null for the loopback address.
+ * @param host the host name, or {@code null} for the loopback address.
* @param port the port number.
- * @param stream a boolean indicating whether this is
+ * @param stream a {@code boolean} indicating whether this is
* a stream socket or a datagram socket.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * checkConnect method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
@@ -373,32 +377,32 @@ class Socket implements java.io.Closeable {
* Creates a socket and connects it to the specified port number at
* the specified IP address.
*
- * If the stream argument is true, this creates a
- * stream socket. If the stream argument is false, it
+ * If the stream argument is {@code true}, this creates a
+ * stream socket. If the stream argument is {@code false}, it
* creates a datagram socket.
*
* If the application has specified a server socket factory, that
- * factory's createSocketImpl method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
*
*
If there is a security manager, its
- * checkConnect method is called
- * with host.getHostAddress() and port
+ * {@code checkConnect} method is called
+ * with {@code host.getHostAddress()} and {@code port}
* as its arguments. This could result in a SecurityException.
*
* If UDP socket is used, TCP/IP related socket options will not apply.
*
* @param host the IP address.
* @param port the port number.
- * @param stream if true, create a stream socket;
+ * @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * checkConnect method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
- * @exception NullPointerException if host is null.
+ * @exception NullPointerException if {@code host} is null.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
* @see java.net.SocketImpl
* @see java.net.SocketImplFactory#createSocketImpl()
@@ -437,8 +441,8 @@ class Socket implements java.io.Closeable {
/**
* Creates the socket implementation.
*
- * @param stream a boolean value : true for a TCP socket,
- * false for UDP.
+ * @param stream a {@code boolean} value : {@code true} for a TCP socket,
+ * {@code false} for UDP.
* @throws IOException if creation fails
* @since 1.4
*/
@@ -500,10 +504,10 @@ class Socket implements java.io.Closeable {
/**
- * Get the SocketImpl attached to this socket, creating
+ * Get the {@code SocketImpl} attached to this socket, creating
* it if necessary.
*
- * @return the SocketImpl attached to that ServerSocket.
+ * @return the {@code SocketImpl} attached to that ServerSocket.
* @throws SocketException if creation fails
* @since 1.4
*/
@@ -516,7 +520,7 @@ class Socket implements java.io.Closeable {
/**
* Connects this socket to the server.
*
- * @param endpoint the SocketAddress
+ * @param endpoint the {@code SocketAddress}
* @throws IOException if an error occurs during the connection
* @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel,
@@ -535,7 +539,7 @@ class Socket implements java.io.Closeable {
* A timeout of zero is interpreted as an infinite timeout. The connection
* will then block until established or an error occurs.
*
- * @param endpoint the SocketAddress
+ * @param endpoint the {@code SocketAddress}
* @param timeout the timeout value to be used in milliseconds.
* @throws IOException if an error occurs during the connection
* @throws SocketTimeoutException if timeout expires before connecting
@@ -597,10 +601,10 @@ class Socket implements java.io.Closeable {
/**
* Binds the socket to a local address.
*
- * If the address is null, then the system will pick up
+ * If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
*
- * @param bindpoint the SocketAddress to bind to
+ * @param bindpoint the {@code SocketAddress} to bind to
* @throws IOException if the bind operation fails, or if the socket
* is already bound.
* @throws IllegalArgumentException if bindpoint is a
@@ -668,7 +672,7 @@ class Socket implements java.io.Closeable {
* after the socket is closed.
*
* @return the remote IP address to which this socket is connected,
- * or null if the socket is not connected.
+ * or {@code null} if the socket is not connected.
*/
public InetAddress getInetAddress() {
if (!isConnected())
@@ -760,15 +764,15 @@ class Socket implements java.io.Closeable {
/**
* Returns the address of the endpoint this socket is connected to, or
- * null if it is unconnected.
+ * {@code null} if it is unconnected.
*
* If the socket was connected prior to being {@link #close closed},
* then this method will continue to return the connected address
* after the socket is closed.
*
- * @return a SocketAddress representing the remote endpoint of this
- * socket, or null if it is not connected yet.
+ * @return a {@code SocketAddress} representing the remote endpoint of this
+ * socket, or {@code null} if it is not connected yet.
* @see #getInetAddress()
* @see #getPort()
* @see #connect(SocketAddress, int)
@@ -785,10 +789,10 @@ class Socket implements java.io.Closeable {
* Returns the address of the endpoint this socket is bound to.
*
* If a socket bound to an endpoint represented by an
- * InetSocketAddress is {@link #close closed},
- * then this method will continue to return an InetSocketAddress
+ * {@code InetSocketAddress } is {@link #close closed},
+ * then this method will continue to return an {@code InetSocketAddress}
* after the socket is closed. In that case the returned
- * InetSocketAddress's address is the
+ * {@code InetSocketAddress}'s address is the
* {@link InetAddress#isAnyLocalAddress wildcard} address
* and its port is the local port that it was bound to.
*
@@ -828,7 +832,7 @@ class Socket implements java.io.Closeable { * methods. * * @return the socket channel associated with this socket, - * or null if this socket was not created + * or {@code null} if this socket was not created * for a channel * * @since 1.4 @@ -843,7 +847,7 @@ class Socket implements java.io.Closeable { * *
If this socket has an associated channel then the resulting input * stream delegates all of its operations to the channel. If the channel - * is in non-blocking mode then the input stream's read operations + * is in non-blocking mode then the input stream's {@code read} operations * will throw an {@link java.nio.channels.IllegalBlockingModeException}. * *
Under abnormal conditions the underlying connection may be @@ -867,7 +871,7 @@ class Socket implements java.io.Closeable { *
If there are no bytes buffered on the socket, and the
* socket has not been closed using {@link #close close}, then
* {@link java.io.InputStream#available available} will
- * return 0.
+ * return {@code 0}.
*
*
If this socket has an associated channel then the resulting output
* stream delegates all of its operations to the channel. If the channel
- * is in non-blocking mode then the output stream's write
+ * is in non-blocking mode then the output stream's {@code write}
* operations will throw an {@link
* java.nio.channels.IllegalBlockingModeException}.
*
@@ -949,8 +953,8 @@ class Socket implements java.io.Closeable {
* Enable/disable {@link SocketOptions#TCP_NODELAY TCP_NODELAY}
* (disable/enable Nagle's algorithm).
*
- * @param on true to enable TCP_NODELAY,
- * false to disable.
+ * @param on {@code true} to enable TCP_NODELAY,
+ * {@code false} to disable.
*
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -968,7 +972,7 @@ class Socket implements java.io.Closeable {
/**
* Tests if {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
*
- * @return a boolean indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1066,9 +1070,9 @@ class Socket implements java.io.Closeable {
* and there is no capability to distinguish between normal data and urgent
* data unless provided by a higher level protocol.
*
- * @param on true to enable
+ * @param on {@code true} to enable
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE},
- * false to disable.
+ * {@code false} to disable.
*
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1086,7 +1090,7 @@ class Socket implements java.io.Closeable {
/**
* Tests if {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE} is enabled.
*
- * @return a boolean indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE}is enabled.
*
* @exception SocketException if there is an error
@@ -1151,7 +1155,7 @@ class Socket implements java.io.Closeable {
/**
* Sets the {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option to the
- * specified value for this Socket.
+ * specified value for this {@code Socket}.
* The {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option is used by the
* platform's networking code as a hint for the size to set the underlying
* network I/O buffers.
@@ -1184,10 +1188,10 @@ class Socket implements java.io.Closeable {
/**
* Get value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option
- * for this Socket, that is the buffer size used by the platform
- * for output on this Socket.
+ * for this {@code Socket}, that is the buffer size used by the platform
+ * for output on this {@code Socket}.
* @return the value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF}
- * option for this Socket.
+ * option for this {@code Socket}.
*
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1208,7 +1212,7 @@ class Socket implements java.io.Closeable {
/**
* Sets the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option to the
- * specified value for this Socket. The
+ * specified value for this {@code Socket}. The
* {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option is
* used by the platform's networking code as a hint for the size to set
* the underlying network I/O buffers.
@@ -1258,11 +1262,11 @@ class Socket implements java.io.Closeable {
/**
* Gets the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option
- * for this Socket, that is the buffer size used by the platform
- * for input on this Socket.
+ * for this {@code Socket}, that is the buffer size used by the platform
+ * for input on this {@code Socket}.
*
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
- * option for this Socket.
+ * option for this {@code Socket}.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @see #setReceiveBufferSize(int)
@@ -1298,7 +1302,7 @@ class Socket implements java.io.Closeable {
/**
* Tests if {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
*
- * @return a boolean indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1321,7 +1325,7 @@ class Socket implements java.io.Closeable {
* 255} or an IllegalArgumentException will be thrown.
*
Notes: *
For Internet Protocol v4 the value consists of an
- * integer, the least significant 8 bits of which
+ * {@code integer}, the least significant 8 bits of which
* represent the value of the TOS octet in IP packets sent by
* the socket.
* RFC 1349 defines the TOS values as follows:
@@ -1347,10 +1351,10 @@ class Socket implements java.io.Closeable {
* in the underlying platform. Applications should not assume that
* they can change the TOS field after the connection.
*
- * For Internet Protocol v6 tc is the value that
+ * For Internet Protocol v6 {@code tc} is the value that
* would be placed into the sin6_flowinfo field of the IP header.
*
- * @param tc an int value for the bitset.
+ * @param tc an {@code int} value for the bitset.
* @throws SocketException if there is an error setting the
* traffic class or type-of-service
* @since 1.4
@@ -1392,11 +1396,11 @@ class Socket implements java.io.Closeable {
*
* When a TCP connection is closed the connection may remain * in a timeout state for a period of time after the connection - * is closed (typically known as the TIME_WAIT state - * or 2MSL wait state). + * is closed (typically known as the {@code TIME_WAIT} state + * or {@code 2MSL} wait state). * For applications using a well known socket address or port * it may not be possible to bind a socket to the required - * SocketAddress if there is a connection in the + * {@code SocketAddress} if there is a connection in the * timeout state involving the socket address or port. *
* Enabling {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} @@ -1404,7 +1408,7 @@ class Socket implements java.io.Closeable { * the socket to be bound even though a previous connection is in a timeout * state. *
- * When a Socket is created the initial setting + * When a {@code Socket} is created the initial setting * of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is disabled. *
* The behaviour when {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is
@@ -1430,7 +1434,7 @@ class Socket implements java.io.Closeable {
/**
* Tests if {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
*
- * @return a boolean indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1536,7 +1540,7 @@ class Socket implements java.io.Closeable {
}
/**
- * Converts this socket to a String.
+ * Converts this socket to a {@code String}.
*
* @return a string representation of this socket.
*/
@@ -1555,7 +1559,7 @@ class Socket implements java.io.Closeable {
* Returns the connection state of the socket.
*
* Note: Closing a socket doesn't clear its connection state, which means
- * this method will return true for a closed socket
+ * this method will return {@code true} for a closed socket
* (see {@link #isClosed()}) if it was successfuly connected prior
* to being closed.
*
@@ -1571,7 +1575,7 @@ class Socket implements java.io.Closeable {
* Returns the binding state of the socket.
*
* Note: Closing a socket doesn't clear its binding state, which means
- * this method will return true for a closed socket
+ * this method will return {@code true} for a closed socket
* (see {@link #isClosed()}) if it was successfuly bound prior
* to being closed.
*
@@ -1629,13 +1633,13 @@ class Socket implements java.io.Closeable {
* application. The factory can be specified only once.
*
* When an application creates a new client socket, the socket
- * implementation factory's createSocketImpl method is
+ * implementation factory's {@code createSocketImpl} method is
* called to create the actual socket implementation.
*
- * Passing null to the method is a no-op unless the factory
+ * Passing {@code null} to the method is a no-op unless the factory
* was already set.
*
If there is a security manager, this method first calls
- * the security manager's checkSetFactory method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
@@ -1644,7 +1648,7 @@ class Socket implements java.io.Closeable {
* socket factory.
* @exception SocketException if the factory is already defined.
* @exception SecurityException if a security manager exists and its
- * checkSetFactory method doesn't allow the operation.
+ * {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory
*/
@@ -1678,23 +1682,23 @@ class Socket implements java.io.Closeable {
* values represent a lower priority than positive values. If the
* application prefers short connection time over both low latency and high
* bandwidth, for example, then it could invoke this method with the values
- * (1, 0, 0). If the application prefers high bandwidth above low
+ * {@code (1, 0, 0)}. If the application prefers high bandwidth above low
* latency, and low latency above short connection time, then it could
- * invoke this method with the values (0, 1, 2).
+ * invoke this method with the values {@code (0, 1, 2)}.
*
*
Invoking this method after this socket has been connected
* will have no effect.
*
* @param connectionTime
- * An int expressing the relative importance of a short
+ * An {@code int} expressing the relative importance of a short
* connection time
*
* @param latency
- * An int expressing the relative importance of low
+ * An {@code int} expressing the relative importance of low
* latency
*
* @param bandwidth
- * An int expressing the relative importance of high
+ * An {@code int} expressing the relative importance of high
* bandwidth
*
* @since 1.5
diff --git a/jdk/src/share/classes/java/net/SocketException.java b/jdk/src/share/classes/java/net/SocketException.java
index eae84d92bab..690fc4f55bd 100644
--- a/jdk/src/share/classes/java/net/SocketException.java
+++ b/jdk/src/share/classes/java/net/SocketException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, 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
@@ -38,7 +38,7 @@ class SocketException extends IOException {
private static final long serialVersionUID = -5935874303556886934L;
/**
- * Constructs a new SocketException with the
+ * Constructs a new {@code SocketException} with the
* specified detail message.
*
* @param msg the detail message.
@@ -48,7 +48,7 @@ class SocketException extends IOException {
}
/**
- * Constructs a new SocketException with no detail message.
+ * Constructs a new {@code SocketException} with no detail message.
*/
public SocketException() {
}
diff --git a/jdk/src/share/classes/java/net/SocketImpl.java b/jdk/src/share/classes/java/net/SocketImpl.java
index 3dbb7b355ed..67286a1cd60 100644
--- a/jdk/src/share/classes/java/net/SocketImpl.java
+++ b/jdk/src/share/classes/java/net/SocketImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, 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
@@ -31,7 +31,7 @@ import java.io.OutputStream;
import java.io.FileDescriptor;
/**
- * The abstract class SocketImpl is a common superclass
+ * The abstract class {@code SocketImpl} is a common superclass
* of all classes that actually implement sockets. It is used to
* create both client and server sockets.
*
@@ -71,7 +71,7 @@ public abstract class SocketImpl implements SocketOptions {
/**
* Creates either a stream or a datagram socket.
*
- * @param stream if true, create a stream socket;
+ * @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
* @exception IOException if an I/O error occurs while creating the
* socket.
@@ -122,7 +122,7 @@ public abstract class SocketImpl implements SocketOptions {
/**
* Sets the maximum queue length for incoming connection indications
- * (a request to connect) to the count argument. If a
+ * (a request to connect) to the {@code count} argument. If a
* connection indication arrives when the queue is full, the
* connection is refused.
*
@@ -217,9 +217,9 @@ public abstract class SocketImpl implements SocketOptions {
}
/**
- * Returns the value of this socket's fd field.
+ * Returns the value of this socket's {@code fd} field.
*
- * @return the value of this socket's fd field.
+ * @return the value of this socket's {@code fd} field.
* @see java.net.SocketImpl#fd
*/
protected FileDescriptor getFileDescriptor() {
@@ -227,9 +227,9 @@ public abstract class SocketImpl implements SocketOptions {
}
/**
- * Returns the value of this socket's address field.
+ * Returns the value of this socket's {@code address} field.
*
- * @return the value of this socket's address field.
+ * @return the value of this socket's {@code address} field.
* @see java.net.SocketImpl#address
*/
protected InetAddress getInetAddress() {
@@ -237,9 +237,9 @@ public abstract class SocketImpl implements SocketOptions {
}
/**
- * Returns the value of this socket's port field.
+ * Returns the value of this socket's {@code port} field.
*
- * @return the value of this socket's port field.
+ * @return the value of this socket's {@code port} field.
* @see java.net.SocketImpl#port
*/
protected int getPort() {
@@ -270,9 +270,9 @@ public abstract class SocketImpl implements SocketOptions {
protected abstract void sendUrgentData (int data) throws IOException;
/**
- * Returns the value of this socket's localport field.
+ * Returns the value of this socket's {@code localport} field.
*
- * @return the value of this socket's localport field.
+ * @return the value of this socket's {@code localport} field.
* @see java.net.SocketImpl#localport
*/
protected int getLocalPort() {
@@ -296,7 +296,7 @@ public abstract class SocketImpl implements SocketOptions {
}
/**
- * Returns the address and port of this socket as a String.
+ * Returns the address and port of this socket as a {@code String}.
*
* @return a string representation of this socket.
*/
@@ -328,23 +328,23 @@ public abstract class SocketImpl implements SocketOptions {
* values represent a lower priority than positive values. If the
* application prefers short connection time over both low latency and high
* bandwidth, for example, then it could invoke this method with the values
- * (1, 0, 0). If the application prefers high bandwidth above low
+ * {@code (1, 0, 0)}. If the application prefers high bandwidth above low
* latency, and low latency above short connection time, then it could
- * invoke this method with the values (0, 1, 2).
+ * invoke this method with the values {@code (0, 1, 2)}.
*
* By default, this method does nothing, unless it is overridden in a
* a sub-class.
*
* @param connectionTime
- * An int expressing the relative importance of a short
+ * An {@code int} expressing the relative importance of a short
* connection time
*
* @param latency
- * An int expressing the relative importance of low
+ * An {@code int} expressing the relative importance of low
* latency
*
* @param bandwidth
- * An int expressing the relative importance of high
+ * An {@code int} expressing the relative importance of high
* bandwidth
*
* @since 1.5
diff --git a/jdk/src/share/classes/java/net/SocketImplFactory.java b/jdk/src/share/classes/java/net/SocketImplFactory.java
index 52ab3277aac..7aa6363b4fd 100644
--- a/jdk/src/share/classes/java/net/SocketImplFactory.java
+++ b/jdk/src/share/classes/java/net/SocketImplFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1999, 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
@@ -27,8 +27,8 @@ package java.net;
/**
* This interface defines a factory for socket implementations. It
- * is used by the classes Socket and
- * ServerSocket to create actual socket
+ * is used by the classes {@code Socket} and
+ * {@code ServerSocket} to create actual socket
* implementations.
*
* @author Arthur van Hoff
@@ -39,9 +39,9 @@ package java.net;
public
interface SocketImplFactory {
/**
- * Creates a new SocketImpl instance.
+ * Creates a new {@code SocketImpl} instance.
*
- * @return a new instance of SocketImpl.
+ * @return a new instance of {@code SocketImpl}.
* @see java.net.SocketImpl
*/
SocketImpl createSocketImpl();
diff --git a/jdk/src/share/classes/java/net/SocketInputStream.java b/jdk/src/share/classes/java/net/SocketInputStream.java
index b708436a783..224051ff608 100644
--- a/jdk/src/share/classes/java/net/SocketInputStream.java
+++ b/jdk/src/share/classes/java/net/SocketInputStream.java
@@ -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
@@ -67,8 +67,8 @@ class SocketInputStream extends FileInputStream
* Returns the unique {@link java.nio.channels.FileChannel FileChannel}
* object associated with this file input stream.
getChannel method of SocketInputStream
- * returns null since it is a socket based stream.
+ * The {@code getChannel} method of {@code SocketInputStream}
+ * returns {@code null} since it is a socket based stream.
*
* @return the file channel associated with this file input stream
*
diff --git a/jdk/src/share/classes/java/net/SocketOptions.java b/jdk/src/share/classes/java/net/SocketOptions.java
index 44dd1b9b40d..b9508dbb266 100644
--- a/jdk/src/share/classes/java/net/SocketOptions.java
+++ b/jdk/src/share/classes/java/net/SocketOptions.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -115,7 +115,7 @@ public interface SocketOptions {
* }
*
*
- * @param optID an int identifying the option to fetch
+ * @param optID an {@code int} identifying the option to fetch
* @return the value of the option
* @throws SocketException if the socket is closed
* @throws SocketException if optID is unknown along the
diff --git a/jdk/src/share/classes/java/net/SocketOutputStream.java b/jdk/src/share/classes/java/net/SocketOutputStream.java
index 06e234efc4a..2404e9583f4 100644
--- a/jdk/src/share/classes/java/net/SocketOutputStream.java
+++ b/jdk/src/share/classes/java/net/SocketOutputStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2007, 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
@@ -64,8 +64,8 @@ class SocketOutputStream extends FileOutputStream
* Returns the unique {@link java.nio.channels.FileChannel FileChannel}
* object associated with this file output stream.
*
- * The getChannel method of SocketOutputStream
- * returns null since it is a socket based stream.
+ * The {@code getChannel} method of {@code SocketOutputStream}
+ * returns {@code null} since it is a socket based stream.
*
* @return the file channel associated with this file output stream
*
diff --git a/jdk/src/share/classes/java/net/SocketPermission.java b/jdk/src/share/classes/java/net/SocketPermission.java
index 43650068ae2..e90856eac8e 100644
--- a/jdk/src/share/classes/java/net/SocketPermission.java
+++ b/jdk/src/share/classes/java/net/SocketPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -110,7 +110,7 @@ import sun.security.util.Debug;
*
*
* is granted to some code, it allows that code to connect to port 7777 on
- * puffin.eng.sun.com, and to accept connections on that port.
+ * {@code puffin.eng.sun.com}, and to accept connections on that port.
*
* Similarly, if the following permission: * @@ -788,7 +788,7 @@ public final class SocketPermission extends Permission * port range is ignored when p only contains the action, 'resolve'.
*
implies checks each of the following, in order,
+ * Then {@code implies} checks each of the following, in order,
* and for each returns true if the stated condition is true:*
*
implies returns false.
+ * If none of the above are true, {@code implies} returns false.
* @param p the permission to check against.
*
* @return true if the specified permission is implied by this object,
@@ -1131,7 +1131,7 @@ public final class SocketPermission extends Permission
*
* SocketPermission objects must be stored in a manner that allows them
* to be inserted into the collection in any order, but that also enables the
- * PermissionCollection implies
+ * PermissionCollection {@code implies}
* method to be implemented in an efficient (and consistent) manner.
*
* @return a new PermissionCollection object suitable for storing SocketPermissions.
diff --git a/jdk/src/share/classes/java/net/SocksSocketImpl.java b/jdk/src/share/classes/java/net/SocksSocketImpl.java
index 16155d2f115..3e4fb5fe74a 100644
--- a/jdk/src/share/classes/java/net/SocksSocketImpl.java
+++ b/jdk/src/share/classes/java/net/SocksSocketImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -315,7 +315,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
* grants the connections, then the connect is successful and all
* further traffic will go to the "real" endpoint.
*
- * @param endpoint the SocketAddress to connect to.
+ * @param endpoint the {@code SocketAddress} to connect to.
* @param timeout the timeout value in milliseconds
* @throws IOException if the connection can't be established.
* @throws SecurityException if there is a security manager and it
@@ -1032,9 +1032,9 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
/**
- * Returns the value of this socket's address field.
+ * Returns the value of this socket's {@code address} field.
*
- * @return the value of this socket's address field.
+ * @return the value of this socket's {@code address} field.
* @see java.net.SocketImpl#address
*/
@Override
@@ -1046,9 +1046,9 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
}
/**
- * Returns the value of this socket's port field.
+ * Returns the value of this socket's {@code port} field.
*
- * @return the value of this socket's port field.
+ * @return the value of this socket's {@code port} field.
* @see java.net.SocketImpl#port
*/
@Override
diff --git a/jdk/src/share/classes/java/net/URI.java b/jdk/src/share/classes/java/net/URI.java
index 24e1a979f6e..77c2f7a178f 100644
--- a/jdk/src/share/classes/java/net/URI.java
+++ b/jdk/src/share/classes/java/net/URI.java
@@ -67,24 +67,24 @@ import java.lang.NullPointerException; // for javadoc
* form has the syntax
*
*
- * [scheme:]scheme-specific-part[#fragment] + * [scheme{@code :}]scheme-specific-part[{@code #}fragment] ** * where square brackets [...] delineate optional components and the characters - * : and # stand for themselves. + * {@code :} and {@code #} stand for themselves. * *
An absolute URI specifies a scheme; a URI that is not absolute is * said to be relative. URIs are also classified according to whether * they are opaque or hierarchical. * *
An opaque URI is an absolute URI whose scheme-specific part does - * not begin with a slash character ('/'). Opaque URIs are not + * not begin with a slash character ({@code '/'}). Opaque URIs are not * subject to further parsing. Some examples of opaque URIs are: * *
* *- *
- * mailto:java-net@java.sun.com - * news:comp.lang.java + * urn:isbn:096139210x + * {@code mailto:java-net@java.sun.com} + * {@code news:comp.lang.java} * {@code urn:isbn:096139210x}
A hierarchical URI is either an absolute URI whose @@ -93,20 +93,20 @@ import java.lang.NullPointerException; // for javadoc * URIs are: * *
- * http://java.sun.com/j2se/1.3/* *
- * docs/guide/collections/designfaq.html#28
- * ../../../demo/jfc/SwingSet2/src/SwingSet2.java
- * file:///~/calendar + * {@code http://java.sun.com/j2se/1.3/}
+ * {@code docs/guide/collections/designfaq.html#28}
+ * {@code ../../../demo/jfc/SwingSet2/src/SwingSet2.java}
+ * {@code file:///~/calendar} *
A hierarchical URI is subject to further parsing according to the syntax * *
- * [scheme:][//authority][path][?query][#fragment] + * [scheme{@code :}][{@code //}authority][path][{@code ?}query][{@code #}fragment] ** - * where the characters :, /, - * ?, and # stand for themselves. The + * where the characters {@code :}, {@code /}, + * {@code ?}, and {@code #} stand for themselves. The * scheme-specific part of a hierarchical URI consists of the characters * between the scheme and fragment components. * @@ -115,16 +115,16 @@ import java.lang.NullPointerException; // for javadoc * parses according to the familiar syntax * *
- * [user-info@]host[:port] + * [user-info{@code @}]host[{@code :}port] ** - * where the characters @ and : stand for + * where the characters {@code @} and {@code :} stand for * themselves. Nearly all URI schemes currently in use are server-based. An * authority component that does not parse in this way is considered to be * registry-based. * *
The path component of a hierarchical URI is itself said to be absolute - * if it begins with a slash character ('/'); otherwise it is + * if it begins with a slash character ({@code '/'}); otherwise it is * relative. The path of a hierarchical URI that is either absolute or * specifies an authority is always absolute. * @@ -132,21 +132,21 @@ import java.lang.NullPointerException; // for javadoc * *
* * In a given instance any particular component is either undefined or * defined with a distinct value. Undefined string components are - * represented by null, while undefined integer components are - * represented by -1. A string component may be defined to have the + * represented by {@code null}, while undefined integer components are + * represented by {@code -1}. A string component may be defined to have the * empty string as its value; this is not equivalent to that component being * undefined. * @@ -165,10 +165,10 @@ import java.lang.NullPointerException; // for javadoc * The key operations supported by this class are those of * normalization, resolution, and relativization. * - **
- * Component Type - * scheme String - * scheme-specific-part String - * authority String - * user-info String - * host String - * port int - * path String - * query String + * fragment String + * scheme {@code String} + * scheme-specific-part {@code String} + * authority {@code String} + * user-info {@code String} + * host {@code String} + * port {@code int} + * path {@code String} + * query {@code String} * fragment {@code String}
Normalization is the process of removing unnecessary "." - * and ".." segments from the path component of a hierarchical URI. - * Each "." segment is simply removed. A ".." segment is - * removed only if it is preceded by a non-".." segment. + *
Normalization is the process of removing unnecessary {@code "."} + * and {@code ".."} segments from the path component of a hierarchical URI. + * Each {@code "."} segment is simply removed. A {@code ".."} segment is + * removed only if it is preceded by a non-{@code ".."} segment. * Normalization has no effect upon opaque URIs. * *
Resolution is the process of resolving one URI against another, @@ -179,45 +179,47 @@ import java.lang.NullPointerException; // for javadoc * normalized. The result, for example, of resolving * *
- * docs/guide/collections/designfaq.html#28 (1) + * {@code docs/guide/collections/designfaq.html#28} + * + * (1) ** - * against the base URI http://java.sun.com/j2se/1.3/ is the result + * against the base URI {@code http://java.sun.com/j2se/1.3/} is the result * URI * *
- * http://java.sun.com/j2se/1.3/docs/guide/collections/designfaq.html#28 + * {@code http://java.sun.com/j2se/1.3/docs/guide/collections/designfaq.html#28} ** * Resolving the relative URI * *
- * ../../../demo/jfc/SwingSet2/src/SwingSet2.java (2) + * {@code ../../../demo/jfc/SwingSet2/src/SwingSet2.java} (2) ** * against this result yields, in turn, * *
- * http://java.sun.com/j2se/1.3/demo/jfc/SwingSet2/src/SwingSet2.java + * {@code http://java.sun.com/j2se/1.3/demo/jfc/SwingSet2/src/SwingSet2.java} ** * Resolution of both absolute and relative URIs, and of both absolute and * relative paths in the case of hierarchical URIs, is supported. Resolving - * the URI file:///~calendar against any other URI simply yields the + * the URI {@code file:///~calendar} against any other URI simply yields the * original URI, since it is absolute. Resolving the relative URI (2) above * against the relative base URI (1) yields the normalized, but still relative, * URI * *
- * demo/jfc/SwingSet2/src/SwingSet2.java + * {@code demo/jfc/SwingSet2/src/SwingSet2.java} ** *
Relativization, finally, is the inverse of resolution: For any * two normalized URIs u and v, * *
- * u.relativize(u.resolve(v)).equals(v) and* * This operation is often useful when constructing a document containing URIs @@ -225,16 +227,16 @@ import java.lang.NullPointerException; // for javadoc * possible. For example, relativizing the URI * *
- * u.resolve(u.relativize(v)).equals(v) .
+ * u{@code .relativize(}u{@code .resolve(}v{@code )).equals(}v{@code )} and
+ * u{@code .resolve(}u{@code .relativize(}v{@code )).equals(}v{@code )} .
*
- * http://java.sun.com/j2se/1.3/docs/guide/index.html + * {@code http://java.sun.com/j2se/1.3/docs/guide/index.html} ** * against the base URI * *
- * http://java.sun.com/j2se/1.3 + * {@code http://java.sun.com/j2se/1.3} ** - * yields the relative URI docs/guide/index.html. + * yields the relative URI {@code docs/guide/index.html}. * * *