# HG changeset patch
# User juh
# Date 1375207459 25200
# Node ID 1d9cb0d080e3f4cdb703b9e7831cd0d37924312c
# Parent f2358d18923a898489950c153f2e6d42e6330b8f
8021833: javadoc cleanup in java.net
Summary:
- * First, if there is a security manager, its
- * First, if there is a security manager, its
- * First, if there is a security manager, its
- * First, if there is a security manager, its
* An application does not generally call the
- *
* 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 @@
* creates an object from it.
*
* @param urlc a URL connection.
- * @return the object read by the
- * This interface is used by the 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 @@
/**
* 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 @@
/**
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/CookiePolicy.java
--- a/jdk/src/share/classes/java/net/CookiePolicy.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/CookiePolicy.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
*
* @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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/CookieStore.java
--- a/jdk/src/share/classes/java/net/CookieStore.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/CookieStore.java Tue Jul 30 11:04:19 2013 -0700
@@ -32,8 +32,8 @@
* 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 @@
* 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 @@
*
* @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 @@
* 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 @@
/**
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/DatagramPacket.java
--- a/jdk/src/share/classes/java/net/DatagramPacket.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/DatagramPacket.java Tue Jul 30 11:04:19 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -68,11 +68,11 @@
int port;
/**
- * Constructs a
- * The
- * The
* Example:
- * If there is a security manager,
- * its
- * If, if the address is
* If there is a security manager,
- * its If there is a security manager,
- * its If there is a security manager,
- * its
- * If the address is
* @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
- *
* If the socket was bound prior to being {@link #close closed},
- * then this method will continue to return
* If the socket was connected prior to being {@link #close closed},
- * then this method will continue to return
* 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 @@
/**
* Returns the port number to which this socket is connected.
- * Returns
* 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 @@
/**
* Returns the address of the endpoint this socket is connected to, or
- *
* 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 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
* This method blocks until a datagram is received. The
- *
* If there is a security manager, a packet cannot be received if the
- * security manager's If there is a security manager, its
- *
* Note: If {@link #send(DatagramPacket)} is used to send a
- *
* 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
- * 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 @@
/**
* Tests if SO_REUSEADDR is enabled.
*
- * @return a Notes:
* For Internet Protocol v4 the value consists of an
- *
- * for Internet Protocol v6
* When an application creates a new datagram socket, the socket
- * implementation factory's
- * Passing If there is a security manager, this method first calls
- * the security manager's NOTE: {@link #fixedContentLengthLong} is recommended instead
@@ -103,15 +103,15 @@
protected long fixedContentLengthLong = -1;
/**
- * Returns the key for the
@@ -261,8 +261,8 @@
* the headers in the message.
*
* @param n an index, where {@code n>=0}.
- * @return the value of the
- * This field is set by the
* Its default value is based on the value of the static followRedirects
@@ -328,14 +328,14 @@
* cannot change this variable.
*
* If there is a security manager, this method first calls
- * the security manager's
* The default value comes from followRedirects, which defaults to
* true.
*
- * @param followRedirects a This convenience method works as if by invoking the
* two-argument counterpart as follows:
- * This convenience method works as if by invoking the
* two-argument counterpart as follows:
- * When four parts are specified, each is interpreted as a byte of
@@ -153,7 +153,7 @@
* 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
- * Two instances of Note that it is not necessary to write the leading zeros in
@@ -64,7 +64,7 @@
* zeros in an address. For example,
*
* An alternative form that is sometimes more convenient
@@ -75,8 +75,8 @@
* standard IPv4 representation address, for example,
*
* where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the
@@ -85,23 +85,23 @@
* in the "d.d.d.d" form. The following forms are invalid:
*
* The following form:
*
* is valid, however it is an unconventional representation of
* the IPv4-compatible IPv6 address,
*
* while "::d" corresponds to the general IPv6 address
@@ -258,7 +258,7 @@
* 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
- * The
* The timeout value, in milliseconds, indicates the maximum amount of time
@@ -458,9 +458,9 @@
* @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 If there is a security manager, its
- * If there is a security manager, this method first
- * calls its If there is a security manager, this method first
- * calls its If there is a security manager, this method first
- * calls its
- * Two instances of The host name can either be a machine name, such as
- * " No validity checking is done on the host name either.
*
@@ -1019,26 +1019,26 @@
* Determines the IP address of a host, given the host's name.
*
* The host name can either be a machine name, such as
- * " For 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. The host name can either be a machine name, such as
- * " For 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 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
- * This method doesn't block, i.e. no reverse name service lookup
* is performed.
@@ -1417,14 +1417,14 @@
/**
* 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 Note: The resolved address may be cached for a short period of time.
* If there is a security manager, its
- *
* The wildcard is a special local IP address. It usually means "any"
- * and can only be used for
* A valid port value is between 0 and 65535.
- * A port number of
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the specified
@@ -171,10 +171,10 @@
* 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
- * A
* @param addr The IP address
* @param port The port number
@@ -195,13 +195,13 @@
* 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
* A valid port value is between 0 and 65535.
- * A port number of
* @param hostname the Host name
* @param port The port number
@@ -237,8 +237,8 @@
* The address will be flagged as unresolved.
*
* A valid port value is between 0 and 65535.
- * A port number of
* @param host the Host name
* @param port The port number
@@ -246,7 +246,7 @@
* the range of valid port values, or if the hostname
* parameter is null.
* @see #isUnresolved()
- * @return a
- * Two instances of
* Only IPv4 networks have broadcast address therefore, in the case
- * of an IPv6 network,
* Typical IPv6 values would be 128 (::1/128) or 10 (fe80::203:baff:fe27:1243/10)
*
- * @return a
- * Two instances of for example:
*
- * {@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:
*
- * Users should cast the generic URLConnection to a
* JarURLConnection when they know that the URL they created is a JAR
@@ -76,19 +72,19 @@
* {@code !/} is refered to as the separator.
*
- * When constructing a JAR url via When constructing a JAR url via {@code new URL(context, spec)},
* the following rules apply:
*
* If there is a security manager,
- * its
@@ -103,7 +103,7 @@
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
- * If there is a security manager,
- * its
@@ -128,7 +128,7 @@
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
- *
- * Or, if the address is
* If there is a security manager,
- * its
@@ -150,12 +150,12 @@
* {@link DatagramSocket#setReuseAddress(boolean)} method is
* called to enable the SO_REUSEADDR socket option.
*
- * @param bindaddr Socket address to bind to, or The ttl is an unsigned 8-bit quantity, and so must be
@@ -279,11 +279,11 @@
/**
* Joins a multicast group. Its behavior may be affected by
- * If there is a security manager, this method first
- * calls its If there is a security manager, this method first
- * calls its If there is a security manager, this method first
- * calls its If there is a security manager, this method first
- * calls its Because this option is a hint, applications that want to
* verify what loopback mode is set to should call
* {@link #getLoopbackMode()}
- * @param disable If there is a security manager, this method first performs some
- * security checks. First, if
- * If there is a security manager, its
- * If there is a security manager, its
- * Two instances of Note that the given user password is cloned before it is stored in
- * the new
- *
*/
public final static Proxy NO_PROXY = new Proxy();
- // Creates the proxy that represents a
- * Use the
- * Two instances of
* The actual work of the server socket is performed by an instance
- * of the
* The maximum queue length for incoming connection indications (a
- * request to connect) is set to
* If the application has specified a server socket factory, that
- * factory's
* If there is a security manager,
- * its
* The maximum queue length for incoming connection indications (a
- * request to connect) is set to the
* If the application has specified a server socket factory, that
- * factory's
* If there is a security manager,
- * its
*
- * @param port the port number, or If there is a security manager, this method
- * calls its
- * @param port the port number, or
- * If the address is
* @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
- * If the address is
- * The A new Socket A new Socket {@code s} is created and, if there
* is a security manager,
- * the security manager's
* 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 @@
/**
* Tests if {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
*
- * @return a
* 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 @@
* application. The factory can be specified only once.
*
* When an application creates a new server socket, the socket
- * implementation factory's
- * Passing
* If there is a security manager, this method first calls
- * the security manager's 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 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/Socket.java
--- a/jdk/src/share/classes/java/net/Socket.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/Socket.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* between two machines.
*
* The actual work of the socket is performed by an instance of the
- *
- * If there is a security manager, its
* Examples:
- *
- * 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
* If there is a security manager, its
- *
* If the application has specified a socket factory, that factory's
- *
* If there is a security manager, its
- *
- * 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 and converted to {@code }; package.html to package-info.java
Reviewed-by: darcy, chegar
diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/Authenticator.java
--- a/jdk/src/share/classes/java/net/Authenticator.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/Authenticator.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* Sets the authenticator that will be used by the networking code
* when a proxy or an HTTP server asks for authentication.
*
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 @@
* Ask the authenticator that has been registered with the system
* for a password.
* 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 @@
*
* @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 @@
* because the hostname can be provided in cases where the InetAddress
* is not available.
* 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 @@
*
* @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 @@
* Ask the authenticator that has been registered with the system
* for a password.
* 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 @@
*
* @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 @@
}
/**
- * 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 @@
}
/**
- * 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 @@
/**
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/ContentHandler.java
--- a/jdk/src/share/classes/java/net/ContentHandler.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/ContentHandler.java Tue Jul 30 11:04:19 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,21 +28,21 @@
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}.
* 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.
* 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 @@
*
* @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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/ContentHandlerFactory.java
--- a/jdk/src/share/classes/java/net/ContentHandlerFactory.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/ContentHandlerFactory.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
/**
* 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}.
* 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 @@
*/
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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/CookieHandler.java
--- a/jdk/src/share/classes/java/net/CookieHandler.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/CookieHandler.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/CookieManager.java
--- a/jdk/src/share/classes/java/net/CookieManager.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/CookieManager.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
*
* 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.
* 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 @@
}
/**
- * Constructs a DatagramPacket
for receiving packets of
- * length length
.
+ * Constructs a {@code DatagramPacket} for receiving packets of
+ * length {@code length}.
* 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 @@
/**
* Constructs a datagram packet for sending packets of length
- * length
with offset ioffset
to 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 @@
/**
* Constructs a datagram packet for sending packets of length
- * length
with offset ioffset
to 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
* 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 @@
* 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 @@
/**
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/DatagramSocket.java
--- a/jdk/src/share/classes/java/net/DatagramSocket.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/DatagramSocket.java Tue Jul 30 11:04:19 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -47,14 +47,14 @@
* a DatagramSocket is bound to a more specific address.
*
+ * {@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 @@
* an IP address chosen by the kernel.
*
* 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 @@
* Creates a datagram socket, bound to the specified local
* socket address.
* null
, creates an unbound socket.
+ * If, if the address is {@code null}, creates an unbound socket.
* 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 @@
* an IP address chosen by the kernel.
*
* 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 @@
* @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 @@
* an IP address chosen by the kernel.
*
* 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 @@
* @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 @@
}
/**
- * 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 @@
/**
* Binds this DatagramSocket to a specific address and port.
* 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.
*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 @@
* Returns the binding state of the socket.
* 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 @@
* Returns the connection state of the socket.
* 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 @@
/**
* 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.
* -1
if the socket is not connected.
+ * Returns {@code -1} if the socket is not connected.
* null
if it is unconnected.
+ * {@code null} if it is unconnected.
* 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 @@
/**
* 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 @@
/**
* 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.
*
* 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 @@
/**
* 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.
* 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.
* 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 @@
* Gets the local address to which the socket is bound.
*
* 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 @@
* 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 @@
/**
* 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 @@
* is high.
* 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 @@
}
/**
- * 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 @@
/**
* 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 @@
}
/**
- * 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 @@
* 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)}.
* false
.
+ * {@link #getReuseAddress()} will always return {@code false}.
* 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 @@
/**
* 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 @@
* 255} or an IllegalArgumentException will be thrown.
* 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 @@
* SocketException indicating that the operation is not
* permitted.
* 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 @@
* 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 @@
* application. The factory can be specified only once.
* createDatagramSocketImpl
method is
+ * implementation factory's {@code createDatagramSocketImpl} method is
* called to create the actual datagram socket implementation.
* 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.
*
* 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 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/DatagramSocketImpl.java
--- a/jdk/src/share/classes/java/net/DatagramSocketImpl.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/DatagramSocketImpl.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
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 @@
/**
* 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 @@
/**
* 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 @@
* 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 @@
/**
* 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 @@
/**
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/DatagramSocketImplFactory.java
--- a/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
/**
* 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 @@
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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/FileNameMap.java
--- a/jdk/src/share/classes/java/net/FileNameMap.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/FileNameMap.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
/**
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/HttpCookie.java
--- a/jdk/src/share/classes/java/net/HttpCookie.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/HttpCookie.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* protocol.
*
* @return {@code false} if the cookie can be sent over any standard
- * protocol; otherwise, true
+ * protocol; otherwise, {@code true}
*
* @see #setSecure
*/
diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/HttpRetryException.java
--- a/jdk/src/share/classes/java/net/HttpRetryException.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/HttpRetryException.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
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 @@
}
/**
- * 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/HttpURLConnection.java
--- a/jdk/src/share/classes/java/net/HttpURLConnection.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/HttpURLConnection.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
/**
* 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.
*
* n
th header field.
- * Some implementations may treat the 0
th
+ * 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 n
th 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 @@
}
/**
- * Returns the value for the n
th header field.
- * Some implementations may treat the 0
th
+ * 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.
* n
th 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 @@
}
/**
- * 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.
* 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.
* 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 @@
}
/**
- * 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 @@
/**
* Sets whether HTTP redirects (requests with response code 3xx) should
- * be automatically followed by this HttpURLConnection
+ * be automatically followed by this {@code HttpURLConnection}
* instance.
* boolean
indicating
+ * @param followRedirects a {@code boolean} indicating
* whether or not to follow HTTP redirects.
*
* @see java.net.HttpURLConnection#instanceFollowRedirects
@@ -382,11 +382,11 @@
}
/**
- * 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 @@
* 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 @@
* @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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/IDN.java
--- a/jdk/src/share/classes/java/net/IDN.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/IDN.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* @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 @@
*
*
+ *
+ *
*
* @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 @@
* @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 @@
*
*
* {@link #toASCII(String, int) toASCII}(input, 0);
- *
+ *
+ *
*
* @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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/Inet4Address.java
--- a/jdk/src/share/classes/java/net/Inet4Address.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/Inet4Address.java Tue Jul 30 11:04:19 2013 -0700
@@ -42,10 +42,10 @@
* 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} 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
}
/**
- * 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 @@
/**
* 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.
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/Inet6Address.java
--- a/jdk/src/share/classes/java/net/Inet6Address.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/Inet6Address.java Tue Jul 30 11:04:19 2013 -0700
@@ -47,7 +47,7 @@
* 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}
*
*
- *
+ * 1080::8:800:200C:417A
* {@code 1080::8:800:200C:417A}
*
*
- *
- * ::FFFF:129.144.52.38
+ * ::129.144.52.38
+ * {@code ::FFFF:129.144.52.38}
* {@code ::129.144.52.38}
*
*
- *
- * ::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}
*
*
- *
+ * ::FFFF:d
* {@code ::FFFF:d}
*
*
- *
+ * ::255.255.0.d
* {@code ::255.255.0.d} 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/InetAddress.java
--- a/jdk/src/share/classes/java/net/InetAddress.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/InetAddress.java Tue Jul 30 11:04:19 2013 -0700
@@ -296,7 +296,7 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
* 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 @@
* privilege can be obtained, otherwise it will try to establish
* a TCP connection on port 7 (Echo) of the destination host.
* 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.
* timeout
- * or ttl
are negative.
- * @return a boolean
indicating 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 @@
* {@link #getCanonicalHostName() getCanonicalHostName}.
*
* 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 @@
* here without a security check.
*
* 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 @@
* the FQDN depending on the underlying system configuration.
*
* 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 @@
* Returns the hostname for this address.
*
* 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 @@
}
/**
- * 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 @@
/**
* 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.
* 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 @@
}
/**
- * 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 @@
* No name service is checked for the validity of the address.
*
* java.sun.com
", or a textual representation of its IP
+ * "{@code java.sun.com}", or a textual representation of its IP
* address.
* 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.
*
- * host
specified in literal IPv6 address,
+ * null
.
+ * @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 @@
* based on the configured name service on the system.
*
* 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.
*
- * host
specified in literal IPv6 address,
+ * host
is not
- * null and host.length()
is not equal to zero, the
+ * 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 @@
}
/**
- * 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]}.
*
* InetAddress
.
+ * an {@code InetAddress}.
*
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/InetSocketAddress.java
--- a/jdk/src/share/classes/java/net/InetSocketAddress.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/InetSocketAddress.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* as returned values.
* bind
operations.
+ * and can only be used for {@code bind} operations.
*
* @see java.net.Socket
* @see java.net.ServerSocket
@@ -155,8 +155,8 @@
* and the port number a specified value.
* 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.
* 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.
* null
address will assign the wildcard address.
+ * A {@code null} address will assign the wildcard address.
* 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.
* 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.
* 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.
* InetSocketAddress
representing the unresolved
+ * @return a {@code InetSocketAddress} representing the unresolved
* socket address
* @since 1.5
*/
@@ -326,16 +326,16 @@
/**
*
- * 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 @@
/**
* 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 @@
/**
* 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.
* 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 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/InterfaceAddress.java
--- a/jdk/src/share/classes/java/net/InterfaceAddress.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/InterfaceAddress.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
}
/**
- * 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.
* 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 @@
* or 24 (255.255.255.0). 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 @@
/**
* 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.
* 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 @@
}
/**
- * 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/JarURLConnection.java
--- a/jdk/src/share/classes/java/net/JarURLConnection.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/JarURLConnection.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
*
*
- * jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class
+ *
- *
- * jar:http://www.foo.com/bar/baz.jar!/
- *
+ * {@code jar:http://www.foo.com/bar/baz.jar!/}
*
*
*
*
*
- * 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.
+ * new URL(context, spec)
,
+ *
@@ -294,7 +290,7 @@
* can only be called once
* the connection has been completely verified by reading
* from the input stream until the end of the stream has been
- * reached. Otherwise, this method will return
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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/MalformedURLException.java
--- a/jdk/src/share/classes/java/net/MalformedURLException.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/MalformedURLException.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/MulticastSocket.java
--- a/jdk/src/share/classes/java/net/MulticastSocket.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/MulticastSocket.java Tue Jul 30 11:04:19 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
* Create a multicast socket.
*
* 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.
* 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 @@
* Create a multicast socket and bind it to a specific port.
*
* 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.
* 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 @@
/**
* Create a MulticastSocket bound to the specified socket address.
* null
, create an unbound socket.
+ * Or, if the address is {@code null}, create an unbound socket.
* 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.
* 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 @@
/**
* 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.
*
* setInterface
or setNetworkInterface
.
+ * {@code setInterface} or {@code setNetworkInterface}.
*
* 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 @@
* @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 @@
/**
* Leave a multicast group. Its behavior may be affected by
- * setInterface
or setNetworkInterface
.
+ * {@code setInterface} or {@code setNetworkInterface}.
*
* 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 @@
* Joins the specified multicast group at the specified interface.
*
* 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 @@
* @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 @@
* Leave a multicast group on a specified local interface.
*
* 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 @@
* @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 @@
* 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 @@
*
* @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 @@
* 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 @@
* 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}.
*
* 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 @@
* @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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/NetPermission.java
--- a/jdk/src/share/classes/java/net/NetPermission.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/NetPermission.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
*
* @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 @@
* @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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/NetworkInterface.java
--- a/jdk/src/share/classes/java/net/NetworkInterface.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/NetworkInterface.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* Convenience method to return an Enumeration with all or a
* subset of the InetAddresses bound to this network interface.
* 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 @@
}
/**
- * 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.
* 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 @@
/**
* 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 @@
* @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 @@
* 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 @@
/**
* 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 @@
/**
* 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 @@
* 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 @@
/**
* 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 @@
* 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 @@
* 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 @@
/**
* 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.
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/PasswordAuthentication.java
--- a/jdk/src/share/classes/java/net/PasswordAuthentication.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/PasswordAuthentication.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
private char[] password;
/**
- * Creates a new PasswordAuthentication
object from the given
+ * Creates a new {@code PasswordAuthentication} object from the given
* user name and password.
*
* PasswordAuthentication
object.
+ * the new {@code PasswordAuthentication} object.
*
* @param userName the user name
* @param password the user's password
diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/PortUnreachableException.java
--- a/jdk/src/share/classes/java/net/PortUnreachableException.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/PortUnreachableException.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
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 @@
}
/**
- * Construct a new PortUnreachableException
with no
+ * Construct a new {@code PortUnreachableException} with no
* detailed message.
*/
public PortUnreachableException() {}
diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/ProtocolException.java
--- a/jdk/src/share/classes/java/net/ProtocolException.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/ProtocolException.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
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 @@
}
/**
- * Constructs a new ProtocolException
with no detail message.
+ * Constructs a new {@code ProtocolException} with no detail message.
*/
public ProtocolException() {
}
diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/Proxy.java
--- a/jdk/src/share/classes/java/net/Proxy.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/Proxy.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
/**
* 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 @@
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);}
* DIRECT
connection.
+ // Creates the proxy that represents a {@code DIRECT} connection.
private Proxy() {
type = Type.DIRECT;
sa = null;
@@ -82,11 +82,11 @@
* Certain combinations are illegal. For instance, for types Http, and
* Socks, a SocketAddress must be provided.
* 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 @@
/**
* 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 @@
* 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 @@
/**
* 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.
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/ProxySelector.java
--- a/jdk/src/share/classes/java/net/ProxySelector.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/ProxySelector.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
*
* @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 @@
* 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 @@
*
*
*
diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/ResponseCache.java
--- a/jdk/src/share/classes/java/net/ResponseCache.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/ResponseCache.java Tue Jul 30 11:04:19 2013 -0700
@@ -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
@@ -74,10 +74,10 @@
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}("getResponseCache")
+ * {@link NetPermission}{@code ("getResponseCache")}
*
* @see #setDefault(ResponseCache)
- * @return the system-wide socket://host:port
+ *
* for tcp client sockets connectionsResponseCache
+ * @return the system-wide {@code ResponseCache}
* @since 1.5
*/
public synchronized static ResponseCache getDefault() {
@@ -94,11 +94,11 @@
* 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 @@
* 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 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/ServerSocket.java
--- a/jdk/src/share/classes/java/net/ServerSocket.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/ServerSocket.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* based on that request, and then possibly returns a result to the requester.
* 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 @@
/**
* 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}.
* 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.
* 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.
* 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 @@
/**
* 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}.
* 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.
* 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.
* 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.
* 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 @@
* 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}.
*
* 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.
* 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 @@
}
/**
- * 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 @@
/**
*
- * Binds the ServerSocket
to a specific address
+ * Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
* 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.
* 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 @@
/**
*
- * Binds the ServerSocket
to a specific address
+ * Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
* 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.
* 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 @@
* Listens for a connection to be made to this socket and accepts
* it. The method blocks until a connection is made.
*
- * s
is created and, if there
+ * 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 @@
* 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 @@
* 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 @@
/**
* Returns the implementation address and implementation port of
- * this socket as a String
.
+ * this socket as a {@code String}.
* createSocketImpl
method is
+ * implementation factory's {@code createSocketImpl} method is
* called to create the actual socket implementation.
* 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.
* 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 @@
* 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 @@
/**
* 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 @@
/**
* 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}.
*
* 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 @@
* Creates an unconnected socket, specifying the type of proxy, if any,
* that should be used regardless of any other settings.
* 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.
*
Socket s = new Socket(Proxy.NO_PROXY);
will create
+ *
@@ -103,7 +103,7 @@
* @param proxy a {@link java.net.Proxy Proxy} object specifying what kind
* of proxying should be used.
* @throws IllegalArgumentException if the proxy is of an invalid type
- * or 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 @@
* Creates a stream socket and connects it to the specified port
* number on the named host.
* 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.
* 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 @@
*
* @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 @@
* number at the specified IP address.
* createSocketImpl
method is called to create the
+ * {@code createSocketImpl} method is called to create the
* actual socket implementation. Otherwise a "plain" socket is created.
* 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 @@
* the specified remote port. The Socket will also bind() to the local
* address and port supplied.
* 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 @@
* 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 @@
* 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 @@
* 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 @@
/**
* 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 @@
/**
- * 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 @@
/**
* 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 @@
* 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 @@
/**
* 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 @@
* 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 @@
/**
* 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 @@
* 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 @@ * 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 @@ * *
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 @@ *
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}.
*
*
*
@@ -910,7 +914,7 @@
*
*
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 @@
* 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 @@
/**
* 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 @@
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
* 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 @@
* 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 @@
*
* 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 @@ * 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 @@
/**
* 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 @@
}
/**
- * Converts this socket to a String
.
+ * Converts this socket to a {@code String}.
*
* @return a string representation of this socket.
*/
@@ -1555,7 +1559,7 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/SocketException.java
--- a/jdk/src/share/classes/java/net/SocketException.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/SocketException.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
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 @@
}
/**
- * Constructs a new SocketException
with no detail message.
+ * Constructs a new {@code SocketException} with no detail message.
*/
public SocketException() {
}
diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/SocketImpl.java
--- a/jdk/src/share/classes/java/net/SocketImpl.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/SocketImpl.java Tue Jul 30 11:04:19 2013 -0700
@@ -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.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 @@
/**
* 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 @@
/**
* 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 @@
}
/**
- * 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 @@
}
/**
- * 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 @@
}
/**
- * 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 @@
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 @@
}
/**
- * 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 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/SocketImplFactory.java
--- a/jdk/src/share/classes/java/net/SocketImplFactory.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/SocketImplFactory.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
/**
* 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 @@
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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/SocketInputStream.java
--- a/jdk/src/share/classes/java/net/SocketInputStream.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/SocketInputStream.java Tue Jul 30 11:04:19 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,8 +67,8 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/SocketOptions.java
--- a/jdk/src/share/classes/java/net/SocketOptions.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/SocketOptions.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* }
*
*
- * @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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/SocketOutputStream.java
--- a/jdk/src/share/classes/java/net/SocketOutputStream.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/SocketOutputStream.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/SocketPermission.java
--- a/jdk/src/share/classes/java/net/SocketPermission.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/SocketPermission.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
*
*
* 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 @@ * port range is ignored when p only contains the action, 'resolve'.
*
*
- * Then 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 @@
*
* 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/SocksSocketImpl.java
--- a/jdk/src/share/classes/java/net/SocksSocketImpl.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/SocksSocketImpl.java Tue Jul 30 11:04:19 2013 -0700
@@ -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 @@
* 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 @@
/**
- * 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 @@
}
/**
- * 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 -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/URI.java
--- a/jdk/src/share/classes/java/net/URI.java Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/URI.java Tue Jul 30 11:04:19 2013 -0700
@@ -67,24 +67,24 @@
* 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 @@ * 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 @@ * 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 @@ * *
* * 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 @@ * 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 @@ * 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 @@ * 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}. * * *