提交 b62c6249 编写于 作者: J juh

8021833: javadoc cleanup in java.net

Summary: <code> and <tt> converted to {@code }; package.html to package-info.java
Reviewed-by: darcy, chegar
上级 36aa0306
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -103,17 +103,17 @@ class Authenticator {
* Sets the authenticator that will be used by the networking code
* when a proxy or an HTTP server asks for authentication.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("setDefaultAuthenticator")</code> permission.
* {@code NetPermission("setDefaultAuthenticator")} permission.
* This may result in a java.lang.SecurityException.
*
* @param a The authenticator to be set. If a is <code>null</code> 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
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* setting the default authenticator.
*
* @see SecurityManager#checkPermission
......@@ -134,9 +134,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system
* for a password.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param addr The InetAddress of the site requesting authorization,
......@@ -151,7 +151,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -193,9 +193,9 @@ class Authenticator {
* because the hostname can be provided in cases where the InetAddress
* is not available.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
......@@ -211,7 +211,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -254,9 +254,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system
* for a password.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
......@@ -275,7 +275,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -320,8 +320,8 @@ class Authenticator {
}
/**
* Gets the <code>hostname</code> of the
* site or proxy requesting authentication, or <code>null</code>
* Gets the {@code hostname} of the
* site or proxy requesting authentication, or {@code null}
* if not available.
*
* @return the hostname of the connection requiring authentication, or null
......@@ -333,8 +333,8 @@ class Authenticator {
}
/**
* Gets the <code>InetAddress</code> of the
* site requesting authorization, or <code>null</code>
* Gets the {@code InetAddress} of the
* site requesting authorization, or {@code null}
* if not available.
*
* @return the InetAddress of the site requesting authorization, or null
......@@ -346,7 +346,7 @@ class Authenticator {
/**
* Gets the port number for the requested connection.
* @return an <code>int</code> indicating the
* @return an {@code int} indicating the
* port for the requested connection.
*/
protected final int getRequestingPort() {
......
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,21 +28,21 @@ package java.net;
import java.io.IOException;
/**
* The abstract class <code>ContentHandler</code> is the superclass
* of all classes that read an <code>Object</code> from a
* <code>URLConnection</code>.
* The abstract class {@code ContentHandler} is the superclass
* of all classes that read an {@code Object} from a
* {@code URLConnection}.
* <p>
* An application does not generally call the
* <code>getContent</code> method in this class directly. Instead, an
* application calls the <code>getContent</code> method in class
* <code>URL</code> or in <code>URLConnection</code>.
* {@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 <code>ContentHandlerFactory</code> set
* up by a call to <code>setContentHandler</code>) is
* called with a <code>String</code> 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 <code>ContentHandler</code>, and its
* <code>getContent</code> 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.
* <p>
* If no content handler could be found, URLConnection will
* look for a content handler in a user-defineable set of places.
......@@ -75,7 +75,7 @@ abstract public class ContentHandler {
* creates an object from it.
*
* @param urlc a URL connection.
* @return the object read by the <code>ContentHandler</code>.
* @return the object read by the {@code ContentHandler}.
* @exception IOException if an I/O error occurs while reading the object.
*/
abstract public Object getContent(URLConnection urlc) throws IOException;
......@@ -90,7 +90,7 @@ abstract public class ContentHandler {
*
* @param urlc a URL connection.
* @param classes an array of types requested
* @return the object read by the <code>ContentHandler</code> 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.
......
/*
* Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,10 +28,10 @@ package java.net;
/**
* This interface defines a factory for content handlers. An
* implementation of this interface should map a MIME type into an
* instance of <code>ContentHandler</code>.
* instance of {@code ContentHandler}.
* <p>
* This interface is used by the <code>URLStreamHandler</code> class
* to create a <code>ContentHandler</code> for a MIME type.
* This interface is used by the {@code URLStreamHandler} class
* to create a {@code ContentHandler} for a MIME type.
*
* @author James Gosling
* @see java.net.ContentHandler
......@@ -40,13 +40,13 @@ package java.net;
*/
public interface ContentHandlerFactory {
/**
* Creates a new <code>ContentHandler</code> to read an object from
* a <code>URLStreamHandler</code>.
* 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 <code>ContentHandler</code> to read an object from a
* <code>URLStreamHandler</code>.
* @return a new {@code ContentHandler} to read an object from a
* {@code URLStreamHandler}.
* @see java.net.ContentHandler
* @see java.net.URLStreamHandler
*/
......
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -66,7 +66,7 @@ public abstract class CookieHandler {
* there is no system-wide cookie handler currently set.
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("getCookieHandler")</tt>
* {@link NetPermission}{@code ("getCookieHandler")}
* @see #setDefault(CookieHandler)
*/
public synchronized static CookieHandler getDefault() {
......@@ -83,10 +83,10 @@ public abstract class CookieHandler {
* Note: non-standard http protocol handlers may ignore this setting.
*
* @param cHandler The HTTP cookie handler, or
* <code>null</code> to unset.
* {@code null} to unset.
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("setCookieHandler")</tt>
* {@link NetPermission}{@code ("setCookieHandler")}
* @see #getDefault()
*/
public synchronized static void setDefault(CookieHandler cHandler) {
......@@ -114,7 +114,7 @@ public abstract class CookieHandler {
* called after all request headers related to choosing cookies
* are added, and before the request is sent.</P>
*
* @param uri a <code>URI</code> representing the intended use for the
* @param uri a {@code URI} representing the intended use for the
* cookies
* @param requestHeaders - a Map from request header
* field names to lists of field values representing
......@@ -136,7 +136,7 @@ public abstract class CookieHandler {
* fields that are named Set-Cookie2, present in the response
* headers into a cookie cache.
*
* @param uri a <code>URI</code> 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
......
/*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -131,7 +131,7 @@ public class CookieManager extends CookieHandler
*
* <p>This constructor will create new cookie manager with default
* cookie store and accept policy. The effect is same as
* <tt>CookieManager(null, null)</tt>.
* {@code CookieManager(null, null)}.
*/
public CookieManager() {
this(null, null);
......@@ -141,12 +141,12 @@ public class CookieManager extends CookieHandler
/**
* Create a new cookie manager with specified cookie store and cookie policy.
*
* @param store a <tt>CookieStore</tt> to be used by cookie manager.
* if <tt>null</tt>, 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 <tt>CookiePolicy</tt> instance
* @param cookiePolicy a {@code CookiePolicy} instance
* to be used by cookie manager as policy callback.
* if <tt>null</tt>, ACCEPT_ORIGINAL_SERVER will
* if {@code null}, ACCEPT_ORIGINAL_SERVER will
* be used.
*/
public CookieManager(CookieStore store,
......@@ -170,11 +170,11 @@ public class CookieManager extends CookieHandler
/**
* To set the cookie policy of this cookie manager.
*
* <p> A instance of <tt>CookieManager</tt> will have
* <p> 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 <tt>null</tt>, which
* @param cookiePolicy the cookie policy. Can be {@code null}, which
* has no effects on current cookie policy.
*/
public void setCookiePolicy(CookiePolicy cookiePolicy) {
......
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -71,8 +71,8 @@ public interface CookiePolicy {
*
* @param uri the URI to consult accept policy with
* @param cookie the HttpCookie object in question
* @return <tt>true</tt> if this cookie should be accepted;
* otherwise, <tt>false</tt>
* @return {@code true} if this cookie should be accepted;
* otherwise, {@code false}
*/
public boolean shouldAccept(URI uri, HttpCookie cookie);
}
......@@ -32,8 +32,8 @@ import java.util.Map;
* A CookieStore object represents a storage for cookie. Can store and retrieve
* cookies.
*
* <p>{@link CookieManager} will call <tt>CookieStore.add</tt> to save cookies
* for every incoming HTTP response, and call <tt>CookieStore.get</tt> to
* <p>{@link CookieManager} will call {@code CookieStore.add} to save cookies
* for every incoming HTTP response, and call {@code CookieStore.get} to
* retrieve cookie for every outgoing HTTP request. A CookieStore
* is responsible for removing HttpCookie instances which have expired.
*
......@@ -55,11 +55,11 @@ public interface CookieStore {
* then it is replaced with the new one.
*
* @param uri the uri this cookie associated with.
* if <tt>null</tt>, 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 <tt>cookie</tt> is <tt>null</tt>
* @throws NullPointerException if {@code cookie} is {@code null}
*
* @see #get
*
......@@ -77,7 +77,7 @@ public interface CookieStore {
*
* @param uri the uri associated with the cookies to be returned
*
* @throws NullPointerException if <tt>uri</tt> is <tt>null</tt>
* @throws NullPointerException if {@code uri} is {@code null}
*
* @see #add
*
......@@ -108,14 +108,14 @@ public interface CookieStore {
* Remove a cookie from store.
*
* @param uri the uri this cookie associated with.
* if <tt>null</tt>, the cookie to be removed is not associated
* with an URI when added; if not <tt>null</tt>, 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 <tt>true</tt> if this store contained the specified cookie
* @return {@code true} if this store contained the specified cookie
*
* @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
* @throws NullPointerException if {@code cookie} is {@code null}
*/
public boolean remove(URI uri, HttpCookie cookie);
......@@ -123,7 +123,7 @@ public interface CookieStore {
/**
* Remove all cookies in this cookie store.
*
* @return <tt>true</tt> 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();
}
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -68,11 +68,11 @@ class DatagramPacket {
int port;
/**
* Constructs a <code>DatagramPacket</code> for receiving packets of
* length <code>length</code>, specifying an offset into the buffer.
* Constructs a {@code DatagramPacket} for receiving packets of
* length {@code length}, specifying an offset into the buffer.
* <p>
* The <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* The {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param offset the offset for the buffer
......@@ -87,11 +87,11 @@ class DatagramPacket {
}
/**
* Constructs a <code>DatagramPacket</code> for receiving packets of
* length <code>length</code>.
* Constructs a {@code DatagramPacket} for receiving packets of
* length {@code length}.
* <p>
* The <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* The {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param length the number of bytes to read.
......@@ -102,10 +102,10 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> with offset <code>ioffset</code>to the
* {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
* <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
......@@ -125,10 +125,10 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> with offset <code>ioffset</code>to the
* {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
* <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
......@@ -147,9 +147,9 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> to the specified port number on the specified
* host. The <code>length</code> argument must be less than or equal
* to <code>buf.length</code>.
* {@code length} to the specified port number on the specified
* host. The {@code length} argument must be less than or equal
* to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
......@@ -164,9 +164,9 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> to the specified port number on the specified
* host. The <code>length</code> argument must be less than or equal
* to <code>buf.length</code>.
* {@code length} to the specified port number on the specified
* host. The {@code length} argument must be less than or equal
* to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
......@@ -207,8 +207,8 @@ class DatagramPacket {
/**
* Returns the data buffer. The data received or the data to be sent
* starts from the <code>offset</code> in the buffer,
* and runs for <code>length</code> long.
* starts from the {@code offset} in the buffer,
* and runs for {@code length} long.
*
* @return the buffer used to receive or send data
* @see #setData(byte[], int, int)
......@@ -277,7 +277,7 @@ class DatagramPacket {
/**
* Sets the IP address of the machine to which this datagram
* is being sent.
* @param iaddr the <code>InetAddress</code>
* @param iaddr the {@code InetAddress}
* @since JDK1.1
* @see #getAddress()
*/
......@@ -303,7 +303,7 @@ class DatagramPacket {
* Sets the SocketAddress (usually IP address + port number) of the remote
* host to which this datagram is being sent.
*
* @param address the <code>SocketAddress</code>
* @param address the {@code SocketAddress}
* @throws IllegalArgumentException if address is null or is a
* SocketAddress subclass not supported by this socket
*
......@@ -324,7 +324,7 @@ class DatagramPacket {
* Gets the SocketAddress (usually IP address + port number) of the remote
* host that this packet is being sent to or is coming from.
*
* @return the <code>SocketAddress</code>
* @return the {@code SocketAddress}
* @since 1.4
* @see #setSocketAddress
*/
......@@ -335,7 +335,7 @@ class DatagramPacket {
/**
* Set the data buffer for this packet. With the offset of
* this DatagramPacket set to 0, and the length set to
* the length of <code>buf</code>.
* the length of {@code buf}.
*
* @param buf the buffer to set for this packet.
*
......
/*
* Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -101,7 +101,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
protected void disconnect() {}
/**
* Peek at the packet to see who it is from. Updates the specified <code>InetAddress</code>
* Peek at the packet to see who it is from. Updates the specified {@code InetAddress}
* to the address which the packet came from.
* @param i an InetAddress object
* @return the port number which the packet came from.
......@@ -114,7 +114,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Peek at the packet to see who it is from. The data is copied into the specified
* <code>DatagramPacket</code>. The data is returned,
* {@code DatagramPacket}. The data is returned,
* but not consumed, so that a subsequent peekData/receive operation
* will see the same data.
* @param p the Packet Received.
......@@ -163,7 +163,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Set the TTL (time-to-live) option.
* @param ttl an <tt>int</tt> specifying the time-to-live value
* @param ttl an {@code int} specifying the time-to-live value
* @exception IOException if an I/O exception occurs
* while setting the time-to-live option.
* @see #getTimeToLive()
......@@ -174,7 +174,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* Retrieve the TTL (time-to-live) option.
* @exception IOException if an I/O exception occurs
* while retrieving the time-to-live option
* @return an <tt>int</tt> representing the time-to-live value
* @return an {@code int} representing the time-to-live value
* @see #setTimeToLive(int)
*/
protected abstract int getTimeToLive() throws IOException;
......@@ -227,7 +227,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Gets the local port.
* @return an <tt>int</tt> representing the local port value
* @return an {@code int} representing the local port value
*/
protected int getLocalPort() {
return localPort;
......@@ -235,7 +235,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Gets the datagram socket file descriptor.
* @return a <tt>FileDescriptor</tt> object representing the datagram socket
* @return a {@code FileDescriptor} object representing the datagram socket
* file descriptor
*/
protected FileDescriptor getFileDescriptor() {
......
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,7 +27,7 @@ package java.net;
/**
* This interface defines a factory for datagram socket implementations. It
* is used by the classes <code>DatagramSocket</code> to create actual socket
* is used by the classes {@code DatagramSocket} to create actual socket
* implementations.
*
* @author Yingxian Wang
......@@ -37,9 +37,9 @@ package java.net;
public
interface DatagramSocketImplFactory {
/**
* Creates a new <code>DatagramSocketImpl</code> instance.
* Creates a new {@code DatagramSocketImpl} instance.
*
* @return a new instance of <code>DatagramSocketImpl</code>.
* @return a new instance of {@code DatagramSocketImpl}.
* @see java.net.DatagramSocketImpl
*/
DatagramSocketImpl createDatagramSocketImpl();
......
/*
* Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -37,7 +37,7 @@ public interface FileNameMap {
/**
* Gets the MIME type for the specified file name.
* @param fileName the specified file name
* @return a <code>String</code> indicating the MIME
* @return a {@code String} indicating the MIME
* type for the specified file name.
*/
public String getContentTypeFor(String fileName);
......
/*
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -470,7 +470,7 @@ public final class HttpCookie implements Cloneable {
* protocol.
*
* @return {@code false} if the cookie can be sent over any standard
* protocol; otherwise, <code>true</code>
* protocol; otherwise, {@code true}
*
* @see #setSecure
*/
......
/*
* Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,7 +43,7 @@ class HttpRetryException extends IOException {
private String location;
/**
* Constructs a new <code>HttpRetryException</code> from the
* Constructs a new {@code HttpRetryException} from the
* specified response code and exception detail message
*
* @param detail the detail message.
......@@ -55,7 +55,7 @@ class HttpRetryException extends IOException {
}
/**
* Constructs a new <code>HttpRetryException</code> 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.
......
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -76,14 +76,14 @@ abstract public class HttpURLConnection extends URLConnection {
/**
* The chunk-length when using chunked encoding streaming mode for output.
* A value of <code>-1</code> 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 <code>-1</code> means fixed-length streaming mode is disabled
* A value of {@code -1} means fixed-length streaming mode is disabled
* for output.
*
* <P> <B>NOTE:</B> {@link #fixedContentLengthLong} is recommended instead
......@@ -103,15 +103,15 @@ abstract public class HttpURLConnection extends URLConnection {
protected long fixedContentLengthLong = -1;
/**
* Returns the key for the <code>n</code><sup>th</sup> header field.
* Some implementations may treat the <code>0</code><sup>th</sup>
* Returns the key for the {@code n}<sup>th</sup> header field.
* Some implementations may treat the {@code 0}<sup>th</sup>
* 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 <code>getHeaderFieldKey(0)</code> returns null.
* line, but {@code getHeaderFieldKey(0)} returns null.
*
* @param n an index, where {@code n >=0}.
* @return the key for the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the key does not exist.
* @return the key for the {@code n}<sup>th</sup> header field,
* or {@code null} if the key does not exist.
*/
public String getHeaderFieldKey (int n) {
return null;
......@@ -251,8 +251,8 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns the value for the <code>n</code><sup>th</sup> header field.
* Some implementations may treat the <code>0</code><sup>th</sup>
* Returns the value for the {@code n}<sup>th</sup> header field.
* Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server.
* <p>
......@@ -261,8 +261,8 @@ abstract public class HttpURLConnection extends URLConnection {
* the headers in the message.
*
* @param n an index, where {@code n>=0}.
* @return the value of the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the value does not exist.
* @return the value of the {@code n}<sup>th</sup> header field,
* or {@code null} if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int)
*/
public String getHeaderField(int n) {
......@@ -270,7 +270,7 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* An <code>int</code> representing the three digit HTTP Status-Code.
* An {@code int} representing the three digit HTTP Status-Code.
* <ul>
* <li> 1xx: Informational
* <li> 2xx: Success
......@@ -292,12 +292,12 @@ abstract public class HttpURLConnection extends URLConnection {
private static boolean followRedirects = true;
/**
* If <code>true</code>, the protocol will automatically follow redirects.
* If <code>false</code>, 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.
* <p>
* This field is set by the <code>setInstanceFollowRedirects</code>
* method. Its value is returned by the <code>getInstanceFollowRedirects</code>
* This field is set by the {@code setInstanceFollowRedirects}
* method. Its value is returned by the {@code getInstanceFollowRedirects}
* method.
* <p>
* Its default value is based on the value of the static followRedirects
......@@ -328,14 +328,14 @@ abstract public class HttpURLConnection extends URLConnection {
* cannot change this variable.
* <p>
* If there is a security manager, this method first calls
* the security manager's <code>checkSetFactory</code> method
* the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @param set a <code>boolean</code> 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
* <code>checkSetFactory</code> method doesn't
* {@code checkSetFactory} method doesn't
* allow the operation.
* @see SecurityManager#checkSetFactory
* @see #getFollowRedirects()
......@@ -350,12 +350,12 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns a <code>boolean</code> indicating
* Returns a {@code boolean} indicating
* whether or not HTTP redirects (3xx) should
* be automatically followed.
*
* @return <code>true</code> if HTTP redirects should
* be automatically followed, <tt>false</tt> if not.
* @return {@code true} if HTTP redirects should
* be automatically followed, {@code false} if not.
* @see #setFollowRedirects(boolean)
*/
public static boolean getFollowRedirects() {
......@@ -364,13 +364,13 @@ abstract public class HttpURLConnection extends URLConnection {
/**
* Sets whether HTTP redirects (requests with response code 3xx) should
* be automatically followed by this <code>HttpURLConnection</code>
* be automatically followed by this {@code HttpURLConnection}
* instance.
* <p>
* The default value comes from followRedirects, which defaults to
* true.
*
* @param followRedirects a <code>boolean</code> indicating
* @param followRedirects a {@code boolean} indicating
* whether or not to follow HTTP redirects.
*
* @see java.net.HttpURLConnection#instanceFollowRedirects
......@@ -382,11 +382,11 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns the value of this <code>HttpURLConnection</code>'s
* <code>instanceFollowRedirects</code> field.
* Returns the value of this {@code HttpURLConnection}'s
* {@code instanceFollowRedirects} field.
*
* @return the value of this <code>HttpURLConnection</code>'s
* <code>instanceFollowRedirects</code> field.
* @return the value of this {@code HttpURLConnection}'s
* {@code instanceFollowRedirects} field.
* @see java.net.HttpURLConnection#instanceFollowRedirects
* @see #setInstanceFollowRedirects(boolean)
* @since 1.3
......@@ -540,7 +540,7 @@ abstract public class HttpURLConnection extends URLConnection {
* Returns null if none could be discerned from the responses
* (the result was not valid HTTP).
* @throws IOException if an error occurred connecting to the server.
* @return the HTTP response message, or <code>null</code>
* @return the HTTP response message, or {@code null}
*/
public String getResponseMessage() throws IOException {
getResponseCode();
......@@ -583,7 +583,7 @@ abstract public class HttpURLConnection extends URLConnection {
* @exception IOException if an error occurs while computing
* the permission.
*
* @return a <code>SocketPermission</code> object representing the
* @return a {@code SocketPermission} object representing the
* permission necessary to connect to the destination
* host and port.
*/
......
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -104,7 +104,7 @@ public final class IDN {
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
......@@ -130,13 +130,13 @@ public final class IDN {
*
* <p> This convenience method works as if by invoking the
* two-argument counterpart as follows:
* <blockquote><tt>
* <blockquote>
* {@link #toASCII(String, int) toASCII}(input,&nbsp;0);
* </tt></blockquote>
* </blockquote>
*
* @param input the string to be processed
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
......@@ -161,7 +161,7 @@ public final class IDN {
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*/
public static String toUnicode(String input, int flag) {
int p = 0, q = 0;
......@@ -184,13 +184,13 @@ public final class IDN {
*
* <p> This convenience method works as if by invoking the
* two-argument counterpart as follows:
* <blockquote><tt>
* <blockquote>
* {@link #toUnicode(String, int) toUnicode}(input,&nbsp;0);
* </tt></blockquote>
* </blockquote>
*
* @param input the string to be processed
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*/
public static String toUnicode(String input) {
return toUnicode(input, 0);
......
......@@ -42,10 +42,10 @@ import java.io.ObjectStreamException;
* takes one of the following forms:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>d.d.d.d</tt></td></tr>
* <tr><td><tt>d.d.d</tt></td></tr>
* <tr><td><tt>d.d</tt></td></tr>
* <tr><td><tt>d</tt></td></tr>
* <tr><td>{@code d.d.d.d}</td></tr>
* <tr><td>{@code d.d.d}</td></tr>
* <tr><td>{@code d.d}</td></tr>
* <tr><td>{@code d}</td></tr>
* </table></blockquote>
*
* <p> When four parts are specified, each is interpreted as a byte of
......@@ -153,7 +153,7 @@ class Inet4Address extends InetAddress {
* Utility routine to check if the InetAddress is an
* IP multicast address. IP multicast address is a Class D
* address i.e first four bits of the address are 1110.
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
......@@ -163,7 +163,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress in a wildcard address.
* @return a <code>boolean</code> indicating if the Inetaddress is
* @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
......@@ -174,7 +174,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is a loopback address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
......@@ -187,7 +187,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is an link local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
......@@ -204,7 +204,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is a site local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
......@@ -224,7 +224,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has global scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
......@@ -240,7 +240,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has node scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
......@@ -253,7 +253,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has link scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
......@@ -269,7 +269,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has site scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
......@@ -284,7 +284,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has organization scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
......@@ -299,9 +299,9 @@ class Inet4Address extends InetAddress {
}
/**
* Returns the raw IP address of this <code>InetAddress</code>
* 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 <code>getAddress()[0]</code>.
* byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
......@@ -337,18 +337,18 @@ class Inet4Address extends InetAddress {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> 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.
* <p>
* Two instances of <code>InetAddress</code> represent the same IP
* Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
* <code>getAddress</code> 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 <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
......
......@@ -47,7 +47,7 @@ import java.util.Enumeration;
* address. This is the full form. For example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>1080:0:0:0:8:800:200C:417A</tt><td></tr>
* <tr><td>{@code 1080:0:0:0:8:800:200C:417A}<td></tr>
* </table></blockquote>
*
* <p> Note that it is not necessary to write the leading zeros in
......@@ -64,7 +64,7 @@ import java.util.Enumeration;
* zeros in an address. For example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>1080::8:800:200C:417A</tt><td></tr>
* <tr><td>{@code 1080::8:800:200C:417A}<td></tr>
* </table></blockquote>
*
* <li><p> An alternative form that is sometimes more convenient
......@@ -75,8 +75,8 @@ import java.util.Enumeration;
* standard IPv4 representation address, for example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:129.144.52.38</tt><td></tr>
* <tr><td><tt>::129.144.52.38</tt><td></tr>
* <tr><td>{@code ::FFFF:129.144.52.38}<td></tr>
* <tr><td>{@code ::129.144.52.38}<td></tr>
* </table></blockquote>
*
* <p> where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the
......@@ -85,23 +85,23 @@ import java.util.Enumeration;
* in the "d.d.d.d" form. The following forms are invalid:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:d.d.d</tt><td></tr>
* <tr><td><tt>::FFFF:d.d</tt><td></tr>
* <tr><td><tt>::d.d.d</tt><td></tr>
* <tr><td><tt>::d.d</tt><td></tr>
* <tr><td>{@code ::FFFF:d.d.d}<td></tr>
* <tr><td>{@code ::FFFF:d.d}<td></tr>
* <tr><td>{@code ::d.d.d}<td></tr>
* <tr><td>{@code ::d.d}<td></tr>
* </table></blockquote>
*
* <p> The following form:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:d</tt><td></tr>
* <tr><td>{@code ::FFFF:d}<td></tr>
* </table></blockquote>
*
* <p> is valid, however it is an unconventional representation of
* the IPv4-compatible IPv6 address,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::255.255.0.d</tt><td></tr>
* <tr><td>{@code ::255.255.0.d}<td></tr>
* </table></blockquote>
*
* <p> while "::d" corresponds to the general IPv6 address
......@@ -258,7 +258,7 @@ class Inet6Address extends InetAddress {
* Create an Inet6Address in the exact manner of {@link
* InetAddress#getByAddress(String,byte[])} except that the IPv6 scope_id is
* set to the value corresponding to the given interface for the address
* type specified in <code>addr</code>. 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 <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
......
......@@ -296,7 +296,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is an
* IP multicast address.
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
......@@ -306,7 +306,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress in a wildcard address.
* @return a <code>boolean</code> indicating if the Inetaddress is
* @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
......@@ -317,7 +317,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is a loopback address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
......@@ -328,7 +328,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is an link local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
......@@ -339,7 +339,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is a site local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
......@@ -350,7 +350,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has global scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
......@@ -362,7 +362,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has node scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
......@@ -374,7 +374,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has link scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
......@@ -386,7 +386,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has site scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
......@@ -398,7 +398,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has organization scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
......@@ -424,9 +424,9 @@ class InetAddress implements java.io.Serializable {
* in an IllegalArgumentException being thrown.
*
* @param timeout the time, in milliseconds, before the call aborts
* @return a <code>boolean</code> 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 <code>timeout</code> is negative.
* @throws IllegalArgumentException if {@code timeout} is negative.
* @since 1.5
*/
public boolean isReachable(int timeout) throws IOException {
......@@ -442,10 +442,10 @@ class InetAddress implements java.io.Serializable {
* privilege can be obtained, otherwise it will try to establish
* a TCP connection on port 7 (Echo) of the destination host.
* <p>
* The <code>network interface</code> and <code>ttl</code> 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 <code>ttl</code> will result in an
* A negative value for the {@code ttl} will result in an
* IllegalArgumentException being thrown.
* <p>
* The timeout value, in milliseconds, indicates the maximum amount of time
......@@ -458,9 +458,9 @@ class InetAddress implements java.io.Serializable {
* @param ttl the maximum numbers of hops to try or 0 for the
* default
* @param timeout the time, in milliseconds, before the call aborts
* @throws IllegalArgumentException if either <code>timeout</code>
* or <code>ttl</code> are negative.
* @return a <code>boolean</code>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 @@ class InetAddress implements java.io.Serializable {
* {@link #getCanonicalHostName() getCanonicalHostName}.
*
* <p>If there is a security manager, its
* <code>checkConnect</code> method is first called
* with the hostname and <code>-1</code>
* {@code checkConnect} method is first called
* with the hostname and {@code -1}
* as its arguments to see if the operation is allowed.
* If the operation is not allowed, it will return
* the textual representation of the IP address.
......@@ -511,8 +511,8 @@ class InetAddress implements java.io.Serializable {
* here without a security check.
*
* <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method
* with the hostname and <code>-1</code>
* calls its {@code checkConnect} method
* with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
......@@ -539,8 +539,8 @@ class InetAddress implements java.io.Serializable {
* the FQDN depending on the underlying system configuration.
*
* <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method
* with the hostname and <code>-1</code>
* calls its {@code checkConnect} method
* with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
......@@ -566,8 +566,8 @@ class InetAddress implements java.io.Serializable {
* Returns the hostname for this address.
*
* <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method
* with the hostname and <code>-1</code>
* calls its {@code checkConnect} method
* with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
......@@ -633,9 +633,9 @@ class InetAddress implements java.io.Serializable {
}
/**
* Returns the raw IP address of this <code>InetAddress</code>
* 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 <code>getAddress()[0]</code>.
* byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
......@@ -664,18 +664,18 @@ class InetAddress implements java.io.Serializable {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> 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.
* <p>
* Two instances of <code>InetAddress</code> represent the same IP
* Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
* <code>getAddress</code> 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 <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
......@@ -683,7 +683,7 @@ class InetAddress implements java.io.Serializable {
}
/**
* Converts this IP address to a <code>String</code>. The
* Converts this IP address to a {@code String}. The
* string returned is of the form: hostname / literal IP
* address.
*
......@@ -974,7 +974,7 @@ class InetAddress implements java.io.Serializable {
* No name service is checked for the validity of the address.
*
* <p> The host name can either be a machine name, such as
* "<code>java.sun.com</code>", or a textual representation of its IP
* "{@code java.sun.com}", or a textual representation of its IP
* address.
* <p> No validity checking is done on the host name either.
*
......@@ -1019,26 +1019,26 @@ class InetAddress implements java.io.Serializable {
* Determines the IP address of a host, given the host's name.
*
* <p> The host name can either be a machine name, such as
* "<code>java.sun.com</code>", 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.
*
* <p> For <code>host</code> specified in literal IPv6 address,
* <p> 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 <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
* scoped addresses.
*
* <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
* <p> If the host is {@code null} then an {@code InetAddress}
* representing an address of the loopback interface is returned.
* See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a>
* section&nbsp;2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
* section&nbsp;2.5.3. </p>
*
* @param host the specified host, or <code>null</code>.
* @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
* <code>host</code> could be found, or if a scope_id was specified
* {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists
* and its checkConnect method doesn't allow the operation
......@@ -1059,37 +1059,37 @@ class InetAddress implements java.io.Serializable {
* based on the configured name service on the system.
*
* <p> The host name can either be a machine name, such as
* "<code>java.sun.com</code>", 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.
*
* <p> For <code>host</code> specified in <i>literal IPv6 address</i>,
* <p> For {@code host} specified in <i>literal IPv6 address</i>,
* 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
* <a href="Inet6Address.html#scoped">here</a>.
* <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
* <p> If the host is {@code null} then an {@code InetAddress}
* representing an address of the loopback interface is returned.
* See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a>
* section&nbsp;2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
* section&nbsp;2.5.3. </p>
*
* <p> If there is a security manager and <code>host</code> is not
* null and <code>host.length() </code> is not equal to zero, the
* <p> 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
* <code>checkConnect</code> method is called
* with the hostname and <code>-1</code>
* {@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 <code>null</code>.
* @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
* <code>host</code> 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
* <code>checkConnect</code> method doesn't allow the operation.
* {@code checkConnect} method doesn't allow the operation.
*
* @see SecurityManager#checkConnect
*/
......@@ -1389,9 +1389,9 @@ class InetAddress implements java.io.Serializable {
}
/**
* Returns an <code>InetAddress</code> 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 <code>getAddress()[0]</code>.
* byte of the address is in {@code getAddress()[0]}.
*
* <p> This method doesn't block, i.e. no reverse name service lookup
* is performed.
......@@ -1417,14 +1417,14 @@ class InetAddress implements java.io.Serializable {
/**
* Returns the address of the local host. This is achieved by retrieving
* the name of the host from the system, then resolving that name into
* an <code>InetAddress</code>.
* an {@code InetAddress}.
*
* <P>Note: The resolved address may be cached for a short period of time.
* </P>
*
* <p>If there is a security manager, its
* <code>checkConnect</code> method is called
* with the local host name and <code>-1</code>
* {@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.
......
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,7 +43,7 @@ import java.io.ObjectStreamField;
* as returned values.
* <p>
* The <i>wildcard</i> is a special local IP address. It usually means "any"
* and can only be used for <code>bind</code> operations.
* and can only be used for {@code bind} operations.
*
* @see java.net.Socket
* @see java.net.ServerSocket
......@@ -155,8 +155,8 @@ public class InetSocketAddress
* and the port number a specified value.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <p>
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the specified
......@@ -171,10 +171,10 @@ public class InetSocketAddress
* Creates a socket address from an IP address and a port number.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* A <code>null</code> address will assign the <i>wildcard</i> address.
* A {@code null} address will assign the <i>wildcard</i> address.
* <p>
* @param addr The IP address
* @param port The port number
......@@ -195,13 +195,13 @@ public class InetSocketAddress
* An attempt will be made to resolve the hostname into an InetAddress.
* If that attempt fails, the address will be flagged as <I>unresolved</I>.
* <p>
* If there is a security manager, its <code>checkConnect</code> 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.
* <P>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* @param hostname the Host name
* @param port The port number
......@@ -237,8 +237,8 @@ public class InetSocketAddress
* The address will be flagged as <I>unresolved</I>.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* @param host the Host name
* @param port The port number
......@@ -246,7 +246,7 @@ public class InetSocketAddress
* the range of valid port values, or if the hostname
* parameter is <TT>null</TT>.
* @see #isUnresolved()
* @return a <code>InetSocketAddress</code> representing the unresolved
* @return a {@code InetSocketAddress} representing the unresolved
* socket address
* @since 1.5
*/
......@@ -326,16 +326,16 @@ public class InetSocketAddress
/**
*
* Gets the <code>InetAddress</code>.
* Gets the {@code InetAddress}.
*
* @return the InetAdress or <code>null</code> if it is unresolved.
* @return the InetAdress or {@code null} if it is unresolved.
*/
public final InetAddress getAddress() {
return holder.getAddress();
}
/**
* Gets the <code>hostname</code>.
* Gets the {@code hostname}.
* Note: This method may trigger a name service reverse lookup if the
* address was created with a literal IP address.
*
......@@ -360,8 +360,8 @@ public class InetSocketAddress
/**
* Checks whether the address has been resolved or not.
*
* @return <code>true</code> if the hostname couldn't be resolved into
* an <code>InetAddress</code>.
* @return {@code true} if the hostname couldn't be resolved into
* an {@code InetAddress}.
*/
public final boolean isUnresolved() {
return holder.isUnresolved();
......@@ -382,11 +382,11 @@ public class InetSocketAddress
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> 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.
* <p>
* Two instances of <code>InetSocketAddress</code> represent the same
* Two instances of {@code InetSocketAddress} represent the same
* address if both the InetAddresses (or hostnames if it is unresolved) and port
* numbers are equal.
* If both addresses are unresolved, then the hostname and the port number
......@@ -396,8 +396,8 @@ public class InetSocketAddress
* considered equal.
*
* @param obj the object to compare against.
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#equals(java.lang.Object)
*/
@Override
......
/*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -47,23 +47,23 @@ public class InterfaceAddress {
}
/**
* Returns an <code>InetAddress</code> for this address.
* Returns an {@code InetAddress} for this address.
*
* @return the <code>InetAddress</code> for this address.
* @return the {@code InetAddress} for this address.
*/
public InetAddress getAddress() {
return address;
}
/**
* Returns an <code>InetAddress</code> for the brodcast address
* Returns an {@code InetAddress} for the brodcast address
* for this InterfaceAddress.
* <p>
* Only IPv4 networks have broadcast address therefore, in the case
* of an IPv6 network, <code>null</code> will be returned.
* of an IPv6 network, {@code null} will be returned.
*
* @return the <code>InetAddress</code> representing the broadcast
* address or <code>null</code> if there is no broadcast address.
* @return the {@code InetAddress} representing the broadcast
* address or {@code null} if there is no broadcast address.
*/
public InetAddress getBroadcast() {
return broadcast;
......@@ -76,7 +76,7 @@ public class InterfaceAddress {
* or 24 (255.255.255.0). <p>
* Typical IPv6 values would be 128 (::1/128) or 10 (fe80::203:baff:fe27:1243/10)
*
* @return a <code>short</code> representing the prefix length for the
* @return a {@code short} representing the prefix length for the
* subnet of that address.
*/
public short getNetworkPrefixLength() {
......@@ -85,17 +85,17 @@ public class InterfaceAddress {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> 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.
* <p>
* Two instances of <code>InterfaceAddress</code> 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 <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InterfaceAddress#hashCode()
*/
public boolean equals(Object obj) {
......@@ -122,7 +122,7 @@ public class InterfaceAddress {
}
/**
* Converts this Interface address to a <code>String</code>. 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.
......
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -45,18 +45,14 @@ import sun.net.www.ParseUtil;
*
* <p>for example:
*
* <p><code>
* jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class<br>
* </code>
* <p>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
*
* <p>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:
*
* <code>
* jar:http://www.foo.com/bar/baz.jar!/
* </code>
* {@code jar:http://www.foo.com/bar/baz.jar!/}
*
* <p>Users should cast the generic URLConnection to a
* JarURLConnection when they know that the URL they created is a JAR
......@@ -76,19 +72,19 @@ import sun.net.www.ParseUtil;
* <dl>
*
* <dt>A Jar entry
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
*
* <dt>A Jar file
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/}
*
* <dt>A Jar directory
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/}
*
* </dl>
*
* <p><code>!/</code> is refered to as the <em>separator</em>.
* <p>{@code !/} is refered to as the <em>separator</em>.
*
* <p>When constructing a JAR url via <code>new URL(context, spec)</code>,
* <p>When constructing a JAR url via {@code new URL(context, spec)},
* the following rules apply:
*
* <ul>
......@@ -294,7 +290,7 @@ public abstract class JarURLConnection extends URLConnection {
* 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 <code>null</code>
* 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.
......
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -39,13 +39,13 @@ public class MalformedURLException extends IOException {
private static final long serialVersionUID = -182787522200415866L;
/**
* Constructs a <code>MalformedURLException</code> with no detail message.
* Constructs a {@code MalformedURLException} with no detail message.
*/
public MalformedURLException() {
}
/**
* Constructs a <code>MalformedURLException</code> with the
* Constructs a {@code MalformedURLException} with the
* specified detail message.
*
* @param msg the detail message.
......
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -92,7 +92,7 @@ class MulticastSocket extends DatagramSocket {
* Create a multicast socket.
*
* <p>If there is a security manager,
* its <code>checkListen</code> method is first called
* its {@code checkListen} method is first called
* with 0 as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
* <p>
......@@ -103,7 +103,7 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
* <code>checkListen</code> method doesn't allow the operation.
* {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
*/
......@@ -115,8 +115,8 @@ class MulticastSocket extends DatagramSocket {
* Create a multicast socket and bind it to a specific port.
*
* <p>If there is a security manager,
* its <code>checkListen</code> method is first called
* with the <code>port</code> argument
* its {@code checkListen} method is first called
* with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
* <p>
......@@ -128,7 +128,7 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
* <code>checkListen</code> method doesn't allow the operation.
* {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
*/
......@@ -139,10 +139,10 @@ class MulticastSocket extends DatagramSocket {
/**
* Create a MulticastSocket bound to the specified socket address.
* <p>
* Or, if the address is <code>null</code>, create an unbound socket.
* Or, if the address is {@code null}, create an unbound socket.
* <p>
* <p>If there is a security manager,
* its <code>checkListen</code> method is first called
* its {@code checkListen} method is first called
* with the SocketAddress port as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
* <p>
......@@ -150,12 +150,12 @@ class MulticastSocket extends DatagramSocket {
* {@link DatagramSocket#setReuseAddress(boolean)} method is
* called to enable the SO_REUSEADDR socket option.
*
* @param bindaddr Socket address to bind to, or <code>null</code> for
* @param bindaddr Socket address to bind to, or {@code null} for
* an unbound socket.
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
* <code>checkListen</code> method doesn't allow the operation.
* {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
*
......@@ -197,7 +197,7 @@ class MulticastSocket extends DatagramSocket {
/**
* Set the default time-to-live for multicast packets sent out
* on this <code>MulticastSocket</code> in order to control the
* on this {@code MulticastSocket} in order to control the
* scope of the multicasts.
*
* <p>The ttl is an <b>unsigned</b> 8-bit quantity, and so <B>must</B> be
......@@ -279,11 +279,11 @@ class MulticastSocket extends DatagramSocket {
/**
* Joins a multicast group. Its behavior may be affected by
* <code>setInterface</code> or <code>setNetworkInterface</code>.
* {@code setInterface} or {@code setNetworkInterface}.
*
* <p>If there is a security manager, this method first
* calls its <code>checkMulticast</code> method
* with the <code>mcastaddr</code> argument
* calls its {@code checkMulticast} method
* with the {@code mcastaddr} argument
* as its argument.
*
* @param mcastaddr is the multicast address to join
......@@ -291,7 +291,7 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException if there is an error joining
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
* <code>checkMulticast</code> method doesn't allow the join.
* {@code checkMulticast} method doesn't allow the join.
*
* @see SecurityManager#checkMulticast(InetAddress)
*/
......@@ -325,18 +325,18 @@ class MulticastSocket extends DatagramSocket {
/**
* Leave a multicast group. Its behavior may be affected by
* <code>setInterface</code> or <code>setNetworkInterface</code>.
* {@code setInterface} or {@code setNetworkInterface}.
*
* <p>If there is a security manager, this method first
* calls its <code>checkMulticast</code> method
* with the <code>mcastaddr</code> argument
* calls its {@code checkMulticast} method
* with the {@code mcastaddr} argument
* as its argument.
*
* @param mcastaddr is the multicast address to leave
* @exception IOException if there is an error leaving
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
* <code>checkMulticast</code> method doesn't allow the operation.
* {@code checkMulticast} method doesn't allow the operation.
*
* @see SecurityManager#checkMulticast(InetAddress)
*/
......@@ -362,8 +362,8 @@ class MulticastSocket extends DatagramSocket {
* Joins the specified multicast group at the specified interface.
*
* <p>If there is a security manager, this method first
* calls its <code>checkMulticast</code> method
* with the <code>mcastaddr</code> argument
* calls its {@code checkMulticast} method
* with the {@code mcastaddr} argument
* as its argument.
*
* @param mcastaddr is the multicast address to join
......@@ -375,7 +375,7 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException if there is an error joining
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
* <code>checkMulticast</code> method doesn't allow the join.
* {@code checkMulticast} method doesn't allow the join.
* @throws IllegalArgumentException if mcastaddr is null or is a
* SocketAddress subclass not supported by this socket
*
......@@ -410,8 +410,8 @@ class MulticastSocket extends DatagramSocket {
* Leave a multicast group on a specified local interface.
*
* <p>If there is a security manager, this method first
* calls its <code>checkMulticast</code> method
* with the <code>mcastaddr</code> argument
* calls its {@code checkMulticast} method
* with the {@code mcastaddr} argument
* as its argument.
*
* @param mcastaddr is the multicast address to leave
......@@ -422,7 +422,7 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException if there is an error leaving
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
* <code>checkMulticast</code> method doesn't allow the operation.
* {@code checkMulticast} method doesn't allow the operation.
* @throws IllegalArgumentException if mcastaddr is null or is a
* SocketAddress subclass not supported by this socket
*
......@@ -478,7 +478,7 @@ class MulticastSocket extends DatagramSocket {
* Retrieve the address of the network interface used for
* multicast packets.
*
* @return An <code>InetAddress</code> representing
* @return An {@code InetAddress} representing
* the address of the network interface used for
* multicast packets.
*
......@@ -562,7 +562,7 @@ class MulticastSocket extends DatagramSocket {
*
* @exception SocketException if there is an error in
* the underlying protocol, such as a TCP error.
* @return the multicast <code>NetworkInterface</code> currently set
* @return the multicast {@code NetworkInterface} currently set
* @see #setNetworkInterface(NetworkInterface)
* @since 1.4
*/
......@@ -587,7 +587,7 @@ class MulticastSocket extends DatagramSocket {
* <p>Because this option is a hint, applications that want to
* verify what loopback mode is set to should call
* {@link #getLoopbackMode()}
* @param disable <code>true</code> to disable the LoopbackMode
* @param disable {@code true} to disable the LoopbackMode
* @throws SocketException if an error occurs while setting the value
* @since 1.4
* @see #getLoopbackMode
......@@ -615,18 +615,18 @@ class MulticastSocket extends DatagramSocket {
* otherwise it is preferable to set a TTL once on the socket, and
* use that default TTL for all packets. This method does <B>not
* </B> alter the default TTL for the socket. Its behavior may be
* affected by <code>setInterface</code>.
* affected by {@code setInterface}.
*
* <p>If there is a security manager, this method first performs some
* security checks. First, if <code>p.getAddress().isMulticastAddress()</code>
* security checks. First, if {@code p.getAddress().isMulticastAddress()}
* is true, this method calls the
* security manager's <code>checkMulticast</code> method
* with <code>p.getAddress()</code> and <code>ttl</code> as its arguments.
* security manager's {@code checkMulticast} method
* with {@code p.getAddress()} and {@code ttl} as its arguments.
* If the evaluation of that expression is false,
* this method instead calls the security manager's
* <code>checkConnect</code> method with arguments
* <code>p.getAddress().getHostAddress()</code> and
* <code>p.getPort()</code>. Each call to a security manager method
* {@code checkConnect} method with arguments
* {@code p.getAddress().getHostAddress()} and
* {@code p.getPort()}. Each call to a security manager method
* could result in a SecurityException if the operation is not allowed.
*
* @param p is the packet to be sent. The packet should contain
......@@ -639,7 +639,7 @@ class MulticastSocket extends DatagramSocket {
* @exception IOException is raised if an error occurs i.e
* error while setting ttl.
* @exception SecurityException if a security manager exists and its
* <code>checkMulticast</code> or <code>checkConnect</code>
* {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
*
* @deprecated Use the following code or its equivalent instead:
......
/*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -177,8 +177,8 @@ public final class NetPermission extends BasicPermission {
*
* @param name the name of the NetPermission.
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
public NetPermission(String name)
......@@ -194,8 +194,8 @@ public final class NetPermission extends BasicPermission {
* @param name the name of the NetPermission.
* @param actions should be null.
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
public NetPermission(String name, String actions)
......
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -98,9 +98,9 @@ public final class NetworkInterface {
* Convenience method to return an Enumeration with all or a
* subset of the InetAddresses bound to this network interface.
* <p>
* If there is a security manager, its <code>checkConnect</code>
* If there is a security manager, its {@code checkConnect}
* method is called for each InetAddress. Only InetAddresses where
* the <code>checkConnect</code> doesn't throw a SecurityException
* the {@code checkConnect} doesn't throw a SecurityException
* will be returned in the Enumeration. However, if the caller has the
* {@link NetPermission}("getNetworkInformation") permission, then all
* InetAddresses are returned.
......@@ -154,15 +154,15 @@ public final class NetworkInterface {
}
/**
* Get a List of all or a subset of the <code>InterfaceAddresses</code>
* Get a List of all or a subset of the {@code InterfaceAddresses}
* of this network interface.
* <p>
* If there is a security manager, its <code>checkConnect</code>
* If there is a security manager, its {@code checkConnect}
* method is called with the InetAddress for each InterfaceAddress.
* Only InterfaceAddresses where the <code>checkConnect</code> doesn't throw
* Only InterfaceAddresses where the {@code checkConnect} doesn't throw
* a SecurityException will be returned in the List.
*
* @return a <code>List</code> object with all or a subset of the
* @return a {@code List} object with all or a subset of the
* InterfaceAddresss of this network interface
* @since 1.6
*/
......@@ -216,10 +216,10 @@ public final class NetworkInterface {
/**
* Returns the parent NetworkInterface of this interface if this is
* a subinterface, or <code>null</code> if it is a physical
* a subinterface, or {@code null} if it is a physical
* (non virtual) interface or has no parent.
*
* @return The <code>NetworkInterface</code> this interface is attached to.
* @return The {@code NetworkInterface} this interface is attached to.
* @since 1.6
*/
public NetworkInterface getParent() {
......@@ -260,15 +260,15 @@ public final class NetworkInterface {
* @param name
* The name of the network interface.
*
* @return A <tt>NetworkInterface</tt> with the specified name,
* or <tt>null</tt> 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 <tt>null</tt>.
* If the specified name is {@code null}.
*/
public static NetworkInterface getByName(String name) throws SocketException {
if (name == null)
......@@ -303,17 +303,17 @@ public final class NetworkInterface {
* returned.
*
* @param addr
* The <tt>InetAddress</tt> to search with.
* The {@code InetAddress} to search with.
*
* @return A <tt>NetworkInterface</tt>
* or <tt>null</tt> 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 <tt>null</tt>.
* If the specified address is {@code null}.
*/
public static NetworkInterface getByInetAddress(InetAddress addr) throws SocketException {
if (addr == null) {
......@@ -378,7 +378,7 @@ public final class NetworkInterface {
/**
* Returns whether a network interface is up and running.
*
* @return <code>true</code> if the interface is up and running.
* @return {@code true} if the interface is up and running.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
......@@ -390,7 +390,7 @@ public final class NetworkInterface {
/**
* Returns whether a network interface is a loopback interface.
*
* @return <code>true</code> if the interface is a loopback interface.
* @return {@code true} if the interface is a loopback interface.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
......@@ -404,7 +404,7 @@ public final class NetworkInterface {
* A typical point to point interface would be a PPP connection through
* a modem.
*
* @return <code>true</code> if the interface is a point to point
* @return {@code true} if the interface is a point to point
* interface.
* @exception SocketException if an I/O error occurs.
* @since 1.6
......@@ -417,7 +417,7 @@ public final class NetworkInterface {
/**
* Returns whether a network interface supports multicasting or not.
*
* @return <code>true</code> if the interface supports Multicasting.
* @return {@code true} if the interface supports Multicasting.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
......@@ -432,7 +432,7 @@ public final class NetworkInterface {
* If a security manager is set, then the caller must have
* the permission {@link NetPermission}("getNetworkInformation").
*
* @return a byte array containing the address, or <code>null</code> if
* @return a byte array containing the address, or {@code null} if
* the address doesn't exist, is not accessible or a security
* manager is set and the caller does not have the permission
* NetPermission("getNetworkInformation")
......@@ -481,7 +481,7 @@ public final class NetworkInterface {
* can be several virtual interfaces attached to a single physical
* interface.
*
* @return <code>true</code> if this interface is a virtual interface.
* @return {@code true} if this interface is a virtual interface.
* @since 1.6
*/
public boolean isVirtual() {
......@@ -497,16 +497,16 @@ public final class NetworkInterface {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> 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.
* <p>
* Two instances of <code>NetworkInterface</code> 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 <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
......
/*
* Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,11 +43,11 @@ public final class PasswordAuthentication {
private char[] password;
/**
* Creates a new <code>PasswordAuthentication</code> object from the given
* Creates a new {@code PasswordAuthentication} object from the given
* user name and password.
*
* <p> Note that the given user password is cloned before it is stored in
* the new <code>PasswordAuthentication</code> object.
* the new {@code PasswordAuthentication} object.
*
* @param userName the user name
* @param password the user's password
......
/*
* Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -36,7 +36,7 @@ public class PortUnreachableException extends SocketException {
private static final long serialVersionUID = 8462541992376507323L;
/**
* Constructs a new <code>PortUnreachableException</code> with a
* Constructs a new {@code PortUnreachableException} with a
* detail message.
* @param msg the detail message
*/
......@@ -45,7 +45,7 @@ public class PortUnreachableException extends SocketException {
}
/**
* Construct a new <code>PortUnreachableException</code> with no
* Construct a new {@code PortUnreachableException} with no
* detailed message.
*/
public PortUnreachableException() {}
......
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -39,7 +39,7 @@ class ProtocolException extends IOException {
private static final long serialVersionUID = -6098449442062388080L;
/**
* Constructs a new <code>ProtocolException</code> with the
* Constructs a new {@code ProtocolException} with the
* specified detail message.
*
* @param host the detail message.
......@@ -49,7 +49,7 @@ class ProtocolException extends IOException {
}
/**
* Constructs a new <code>ProtocolException</code> with no detail message.
* Constructs a new {@code ProtocolException} with no detail message.
*/
public ProtocolException() {
}
......
/*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,7 +28,7 @@ package java.net;
/**
* This class represents a proxy setting, typically a type (http, socks) and
* a socket address.
* A <code>Proxy</code> is an immutable object.
* A {@code Proxy} is an immutable object.
*
* @see java.net.ProxySelector
* @author Yingxian Wang
......@@ -61,17 +61,17 @@ public class Proxy {
private SocketAddress sa;
/**
* A proxy setting that represents a <code>DIRECT</code> 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):
* <P>
* <code>Socket s = new Socket(Proxy.NO_PROXY);</code><br>
* {@code Socket s = new Socket(Proxy.NO_PROXY);}<br>
* <P>
*/
public final static Proxy NO_PROXY = new Proxy();
// Creates the proxy that represents a <code>DIRECT</code> connection.
// Creates the proxy that represents a {@code DIRECT} connection.
private Proxy() {
type = Type.DIRECT;
sa = null;
......@@ -82,11 +82,11 @@ public class Proxy {
* Certain combinations are illegal. For instance, for types Http, and
* Socks, a SocketAddress <b>must</b> be provided.
* <P>
* Use the <code>Proxy.NO_PROXY</code> constant
* Use the {@code Proxy.NO_PROXY} constant
* for representing a direct connection.
*
* @param type the <code>Type</code> of the proxy
* @param sa the <code>SocketAddress</code> for that proxy
* @param type the {@code Type} of the proxy
* @param sa the {@code SocketAddress} for that proxy
* @throws IllegalArgumentException when the type and the address are
* incompatible
*/
......@@ -108,9 +108,9 @@ public class Proxy {
/**
* Returns the socket address of the proxy, or
* <code>null</code> if its a direct connection.
* {@code null} if its a direct connection.
*
* @return a <code>SocketAddress</code> representing the socket end
* @return a {@code SocketAddress} representing the socket end
* point of the proxy
*/
public SocketAddress address() {
......@@ -121,7 +121,7 @@ public class Proxy {
* Constructs a string representation of this Proxy.
* This String is constructed by calling toString() on its type
* and concatenating " @ " and the toString() result from its address
* if its type is not <code>DIRECT</code>.
* if its type is not {@code DIRECT}.
*
* @return a string representation of this object.
*/
......@@ -133,16 +133,16 @@ public class Proxy {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> 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.
* <p>
* Two instances of <code>Proxy</code> 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 <code>true</code> if the objects are the same;
* <code>false</code> 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) {
......
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -83,9 +83,9 @@ public abstract class ProxySelector {
*
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("getProxySelector")</tt>
* {@link NetPermission}{@code ("getProxySelector")}
* @see #setDefault(ProxySelector)
* @return the system-wide <code>ProxySelector</code>
* @return the system-wide {@code ProxySelector}
* @since 1.5
*/
public static ProxySelector getDefault() {
......@@ -102,11 +102,11 @@ public abstract class ProxySelector {
* Note: non-standard protocol handlers may ignore this setting.
*
* @param ps The HTTP proxy selector, or
* <code>null</code> 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}<tt>("setProxySelector")</tt>
* {@link NetPermission}{@code ("setProxySelector")}
*
* @see #getDefault()
* @since 1.5
......@@ -127,7 +127,7 @@ public abstract class ProxySelector {
* <UL>
* <LI>http URI for http connections</LI>
* <LI>https URI for https connections
* <LI><code>socket://host:port</code><br>
* <LI>{@code socket://host:port}<br>
* for tcp client sockets connections</LI>
* </UL>
*
......
/*
* 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 @@ public abstract class ResponseCache {
*
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("getResponseCache")</tt>
* {@link NetPermission}{@code ("getResponseCache")}
*
* @see #setDefault(ResponseCache)
* @return the system-wide <code>ResponseCache</code>
* @return the system-wide {@code ResponseCache}
* @since 1.5
*/
public synchronized static ResponseCache getDefault() {
......@@ -94,11 +94,11 @@ public abstract class ResponseCache {
* Note: non-standard procotol handlers may ignore this setting.
*
* @param responseCache The response cache, or
* <code>null</code> to unset the cache.
* {@code null} to unset the cache.
*
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("setResponseCache")</tt>
* {@link NetPermission}{@code ("setResponseCache")}
*
* @see #getDefault()
* @since 1.5
......@@ -118,14 +118,14 @@ public abstract class ResponseCache {
* to get the network resource. If a cached response is returned,
* that resource is used instead.
*
* @param uri a <code>URI</code> used to reference the requested
* @param uri a {@code URI} used to reference the requested
* network resource
* @param rqstMethod a <code>String</code> 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 <code>CacheResponse</code> instance if available
* @return a {@code CacheResponse} instance if available
* from cache, or null otherwise
* @throws IOException if an I/O error occurs
* @throws IllegalArgumentException if any one of the arguments is null
......@@ -148,11 +148,11 @@ public abstract class ResponseCache {
* use to write the resource into the cache. If the resource is
* not to be cached, then put must return null.
*
* @param uri a <code>URI</code> 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 <code>CacheRequest</code> 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
......
/*
* Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -37,7 +37,7 @@ import java.security.PrivilegedExceptionAction;
* based on that request, and then possibly returns a result to the requester.
* <p>
* The actual work of the server socket is performed by an instance
* of the <code>SocketImpl</code> class. An application can
* of the {@code SocketImpl} class. An application can
* change the socket factory that creates the socket
* implementation to configure itself to create sockets
* appropriate to the local firewall.
......@@ -89,31 +89,31 @@ class ServerSocket implements java.io.Closeable {
/**
* Creates a server socket, bound to the specified port. A port number
* of <code>0</code> 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}.
* <p>
* The maximum queue length for incoming connection indications (a
* request to connect) is set to <code>50</code>. 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.
* <p>
* If the application has specified a server socket factory, that
* factory's <code>createSocketImpl</code> method is called to create
* factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
* <p>
* If there is a security manager,
* its <code>checkListen</code> method is called
* with the <code>port</code> 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 <code>0</code> 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 <code>checkListen</code>
* if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
......@@ -131,42 +131,42 @@ class ServerSocket implements java.io.Closeable {
/**
* Creates a server socket and binds it to the specified local port
* number, with the specified backlog.
* A port number of <code>0</code> 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}.
* <p>
* The maximum queue length for incoming connection indications (a
* request to connect) is set to the <code>backlog</code> 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.
* <p>
* If the application has specified a server socket factory, that
* factory's <code>createSocketImpl</code> method is called to create
* factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
* <p>
* If there is a security manager,
* its <code>checkListen</code> method is called
* with the <code>port</code> 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 <code>backlog</code> 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 <code>0</code>. If it is less than or equal to
* <code>0</code>, 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.
* <P>
*
* @param port the port number, or <code>0</code> 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 <code>checkListen</code>
* if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
......@@ -189,32 +189,32 @@ class ServerSocket implements java.io.Closeable {
* If <i>bindAddr</i> 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 <code>0</code> 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}.
*
* <P>If there is a security manager, this method
* calls its <code>checkListen</code> method
* with the <code>port</code> 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 <code>backlog</code> 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 <code>0</code>. If it is less than or equal to
* <code>0</code>, 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.
* <P>
* @param port the port number, or <code>0</code> 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 <code>checkListen</code> method doesn't allow the operation.
* its {@code checkListen} method doesn't allow the operation.
*
* @throws IOException if an I/O error occurs when opening the socket.
* @exception IllegalArgumentException if the port parameter is outside
......@@ -245,10 +245,10 @@ class ServerSocket implements java.io.Closeable {
}
/**
* Get the <code>SocketImpl</code> attached to this socket, creating
* Get the {@code SocketImpl} attached to this socket, creating
* it if necessary.
*
* @return the <code>SocketImpl</code> attached to that ServerSocket.
* @return the {@code SocketImpl} attached to that ServerSocket.
* @throws SocketException if creation fails.
* @since 1.4
*/
......@@ -310,17 +310,17 @@ class ServerSocket implements java.io.Closeable {
/**
*
* Binds the <code>ServerSocket</code> to a specific address
* Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
* <p>
* If the address is <code>null</code>, 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.
* <p>
* @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 <code>SecurityManager</code> is present and
* its <code>checkListen</code> method doesn't allow the operation.
* @throws SecurityException if a {@code SecurityManager} is present and
* its {@code checkListen} method doesn't allow the operation.
* @throws IllegalArgumentException if endpoint is a
* SocketAddress subclass not supported by this socket
* @since 1.4
......@@ -331,25 +331,25 @@ class ServerSocket implements java.io.Closeable {
/**
*
* Binds the <code>ServerSocket</code> to a specific address
* Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
* <p>
* If the address is <code>null</code>, 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.
* <P>
* The <code>backlog</code> 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 <code>0</code>. If it is less than or equal to
* <code>0</code>, 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 <code>SecurityManager</code> is present and
* its <code>checkListen</code> method doesn't allow the operation.
* @throws SecurityException if a {@code SecurityManager} is present and
* its {@code checkListen} method doesn't allow the operation.
* @throws IllegalArgumentException if endpoint is a
* SocketAddress subclass not supported by this socket
* @since 1.4
......@@ -480,18 +480,18 @@ class ServerSocket implements java.io.Closeable {
* Listens for a connection to be made to this socket and accepts
* it. The method blocks until a connection is made.
*
* <p>A new Socket <code>s</code> is created and, if there
* <p>A new Socket {@code s} is created and, if there
* is a security manager,
* the security manager's <code>checkAccept</code> method is called
* with <code>s.getInetAddress().getHostAddress()</code> and
* <code>s.getPort()</code>
* 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
* <code>checkAccept</code> method doesn't allow the operation.
* {@code checkAccept} method doesn't allow the operation.
* @exception SocketTimeoutException if a timeout was previously set with setSoTimeout and
* the timeout has been reached.
* @exception java.nio.channels.IllegalBlockingModeException
......@@ -597,7 +597,7 @@ class ServerSocket implements java.io.Closeable {
* method.
*
* @return the server-socket channel associated with this socket,
* or <tt>null</tt> if this socket was not created
* or {@code null} if this socket was not created
* for a channel
*
* @since 1.4
......@@ -678,18 +678,18 @@ class ServerSocket implements java.io.Closeable {
* <p>
* 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 <tt>TIME_WAIT</tt> state
* or <tt>2MSL</tt> 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
* <tt>SocketAddress</tt> if there is a connection in the
* {@code SocketAddress} if there is a connection in the
* timeout state involving the socket address or port.
* <p>
* 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.
* <p>
* When a <tt>ServerSocket</tt> is created the initial setting
* When a {@code ServerSocket} is created the initial setting
* of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is not defined.
* Applications can use {@link #getReuseAddress()} to determine the initial
* setting of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}.
......@@ -717,7 +717,7 @@ class ServerSocket implements java.io.Closeable {
/**
* Tests if {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
*
* @return a <code>boolean</code> indicating whether or not
* @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
......@@ -732,7 +732,7 @@ class ServerSocket implements java.io.Closeable {
/**
* Returns the implementation address and implementation port of
* this socket as a <code>String</code>.
* this socket as a {@code String}.
* <p>
* If there is a security manager set, its {@code checkConnect} method is
* called with the local address and {@code -1} as its arguments to see
......@@ -773,14 +773,14 @@ class ServerSocket implements java.io.Closeable {
* application. The factory can be specified only once.
* <p>
* When an application creates a new server socket, the socket
* implementation factory's <code>createSocketImpl</code> method is
* implementation factory's {@code createSocketImpl} method is
* called to create the actual socket implementation.
* <p>
* Passing <code>null</code> 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.
* <p>
* If there is a security manager, this method first calls
* the security manager's <code>checkSetFactory</code> method
* the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
......@@ -789,7 +789,7 @@ class ServerSocket implements java.io.Closeable {
* socket factory.
* @exception SocketException if the factory has already been defined.
* @exception SecurityException if a security manager exists and its
* <code>checkSetFactory</code> method doesn't allow the operation.
* {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory
*/
......@@ -807,7 +807,7 @@ class ServerSocket implements java.io.Closeable {
/**
* Sets a default proposed value for the
* {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option for sockets
* accepted from this <tt>ServerSocket</tt>. The value actually set
* accepted from this {@code ServerSocket}. The value actually set
* in the accepted socket must be determined by calling
* {@link Socket#getReceiveBufferSize()} after the socket
* is returned by {@link #accept()}.
......@@ -851,13 +851,13 @@ class ServerSocket implements java.io.Closeable {
/**
* Gets the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option
* for this <tt>ServerSocket</tt>, that is the proposed buffer size that
* will be used for Sockets accepted from this <tt>ServerSocket</tt>.
* for this {@code ServerSocket}, that is the proposed buffer size that
* will be used for Sockets accepted from this {@code ServerSocket}.
*
* <p>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 <tt>Socket</tt>.
* option for this {@code Socket}.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @see #setReceiveBufferSize(int)
......@@ -891,24 +891,24 @@ class ServerSocket implements java.io.Closeable {
* compared, with larger values indicating stronger preferences. If the
* application prefers short connection time over both low latency and high
* bandwidth, for example, then it could invoke this method with the values
* <tt>(1, 0, 0)</tt>. 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 <tt>(0, 1, 2)</tt>.
* invoke this method with the values {@code (0, 1, 2)}.
*
* <p> 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 <tt>int</tt> expressing the relative importance of a short
* An {@code int} expressing the relative importance of a short
* connection time
*
* @param latency
* An <tt>int</tt> expressing the relative importance of low
* An {@code int} expressing the relative importance of low
* latency
*
* @param bandwidth
* An <tt>int</tt> expressing the relative importance of high
* An {@code int} expressing the relative importance of high
* bandwidth
*
* @since 1.5
......
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -38,7 +38,7 @@ class SocketException extends IOException {
private static final long serialVersionUID = -5935874303556886934L;
/**
* Constructs a new <code>SocketException</code> with the
* Constructs a new {@code SocketException} with the
* specified detail message.
*
* @param msg the detail message.
......@@ -48,7 +48,7 @@ class SocketException extends IOException {
}
/**
* Constructs a new <code>SocketException</code> with no detail message.
* Constructs a new {@code SocketException} with no detail message.
*/
public SocketException() {
}
......
/*
* Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -31,7 +31,7 @@ import java.io.OutputStream;
import java.io.FileDescriptor;
/**
* The abstract class <code>SocketImpl</code> 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.
* <p>
......@@ -71,7 +71,7 @@ public abstract class SocketImpl implements SocketOptions {
/**
* Creates either a stream or a datagram socket.
*
* @param stream if <code>true</code>, create a stream socket;
* @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
* @exception IOException if an I/O error occurs while creating the
* socket.
......@@ -122,7 +122,7 @@ public abstract class SocketImpl implements SocketOptions {
/**
* Sets the maximum queue length for incoming connection indications
* (a request to connect) to the <code>count</code> argument. If a
* (a request to connect) to the {@code count} argument. If a
* connection indication arrives when the queue is full, the
* connection is refused.
*
......@@ -217,9 +217,9 @@ public abstract class SocketImpl implements SocketOptions {
}
/**
* Returns the value of this socket's <code>fd</code> field.
* Returns the value of this socket's {@code fd} field.
*
* @return the value of this socket's <code>fd</code> field.
* @return the value of this socket's {@code fd} field.
* @see java.net.SocketImpl#fd
*/
protected FileDescriptor getFileDescriptor() {
......@@ -227,9 +227,9 @@ public abstract class SocketImpl implements SocketOptions {
}
/**
* Returns the value of this socket's <code>address</code> field.
* Returns the value of this socket's {@code address} field.
*
* @return the value of this socket's <code>address</code> field.
* @return the value of this socket's {@code address} field.
* @see java.net.SocketImpl#address
*/
protected InetAddress getInetAddress() {
......@@ -237,9 +237,9 @@ public abstract class SocketImpl implements SocketOptions {
}
/**
* Returns the value of this socket's <code>port</code> field.
* Returns the value of this socket's {@code port} field.
*
* @return the value of this socket's <code>port</code> field.
* @return the value of this socket's {@code port} field.
* @see java.net.SocketImpl#port
*/
protected int getPort() {
......@@ -270,9 +270,9 @@ public abstract class SocketImpl implements SocketOptions {
protected abstract void sendUrgentData (int data) throws IOException;
/**
* Returns the value of this socket's <code>localport</code> field.
* Returns the value of this socket's {@code localport} field.
*
* @return the value of this socket's <code>localport</code> field.
* @return the value of this socket's {@code localport} field.
* @see java.net.SocketImpl#localport
*/
protected int getLocalPort() {
......@@ -296,7 +296,7 @@ public abstract class SocketImpl implements SocketOptions {
}
/**
* Returns the address and port of this socket as a <code>String</code>.
* Returns the address and port of this socket as a {@code String}.
*
* @return a string representation of this socket.
*/
......@@ -328,23 +328,23 @@ public abstract class SocketImpl implements SocketOptions {
* values represent a lower priority than positive values. If the
* application prefers short connection time over both low latency and high
* bandwidth, for example, then it could invoke this method with the values
* <tt>(1, 0, 0)</tt>. 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 <tt>(0, 1, 2)</tt>.
* 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 <tt>int</tt> expressing the relative importance of a short
* An {@code int} expressing the relative importance of a short
* connection time
*
* @param latency
* An <tt>int</tt> expressing the relative importance of low
* An {@code int} expressing the relative importance of low
* latency
*
* @param bandwidth
* An <tt>int</tt> expressing the relative importance of high
* An {@code int} expressing the relative importance of high
* bandwidth
*
* @since 1.5
......
/*
* Copyright (c) 1995, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,8 +27,8 @@ package java.net;
/**
* This interface defines a factory for socket implementations. It
* is used by the classes <code>Socket</code> and
* <code>ServerSocket</code> to create actual socket
* is used by the classes {@code Socket} and
* {@code ServerSocket} to create actual socket
* implementations.
*
* @author Arthur van Hoff
......@@ -39,9 +39,9 @@ package java.net;
public
interface SocketImplFactory {
/**
* Creates a new <code>SocketImpl</code> instance.
* Creates a new {@code SocketImpl} instance.
*
* @return a new instance of <code>SocketImpl</code>.
* @return a new instance of {@code SocketImpl}.
* @see java.net.SocketImpl
*/
SocketImpl createSocketImpl();
......
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -67,8 +67,8 @@ class SocketInputStream extends FileInputStream
* Returns the unique {@link java.nio.channels.FileChannel FileChannel}
* object associated with this file input stream.</p>
*
* The <code>getChannel</code> method of <code>SocketInputStream</code>
* returns <code>null</code> since it is a socket based stream.</p>
* The {@code getChannel} method of {@code SocketInputStream}
* returns {@code null} since it is a socket based stream.</p>
*
* @return the file channel associated with this file input stream
*
......
/*
* Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -115,7 +115,7 @@ public interface SocketOptions {
* }
* </PRE>
*
* @param optID an <code>int</code> 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 <I>optID</I> is unknown along the
......
/*
* Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -64,8 +64,8 @@ class SocketOutputStream extends FileOutputStream
* Returns the unique {@link java.nio.channels.FileChannel FileChannel}
* object associated with this file output stream. </p>
*
* The <code>getChannel</code> method of <code>SocketOutputStream</code>
* returns <code>null</code> since it is a socket based stream.</p>
* The {@code getChannel} method of {@code SocketOutputStream}
* returns {@code null} since it is a socket based stream.</p>
*
* @return the file channel associated with this file output stream
*
......
/*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -110,7 +110,7 @@ import sun.security.util.Debug;
* </pre>
*
* is granted to some code, it allows that code to connect to port 7777 on
* <code>puffin.eng.sun.com</code>, and to accept connections on that port.
* {@code puffin.eng.sun.com}, and to accept connections on that port.
*
* <p>Similarly, if the following permission:
*
......@@ -788,7 +788,7 @@ public final class SocketPermission extends Permission
* port range is ignored when p only contains the action, 'resolve'.<p>
* </ul>
*
* Then <code>implies</code> 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:<p>
* <ul>
* <li> If this object was initialized with a single IP address and one of <i>p</i>'s
......@@ -802,7 +802,7 @@ public final class SocketPermission extends Permission
* <li>If this canonical name equals <i>p</i>'s canonical name.<p>
* </ul>
*
* If none of the above are true, <code>implies</code> returns false.
* If none of the above are true, {@code implies} returns false.
* @param p the permission to check against.
*
* @return true if the specified permission is implied by this object,
......@@ -1131,7 +1131,7 @@ public final class SocketPermission extends Permission
* <p>
* 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 <code>implies</code>
* PermissionCollection {@code implies}
* method to be implemented in an efficient (and consistent) manner.
*
* @return a new PermissionCollection object suitable for storing SocketPermissions.
......
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -315,7 +315,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
* grants the connections, then the connect is successful and all
* further traffic will go to the "real" endpoint.
*
* @param endpoint the <code>SocketAddress</code> to connect to.
* @param endpoint the {@code SocketAddress} to connect to.
* @param timeout the timeout value in milliseconds
* @throws IOException if the connection can't be established.
* @throws SecurityException if there is a security manager and it
......@@ -1032,9 +1032,9 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
/**
* Returns the value of this socket's <code>address</code> field.
* Returns the value of this socket's {@code address} field.
*
* @return the value of this socket's <code>address</code> field.
* @return the value of this socket's {@code address} field.
* @see java.net.SocketImpl#address
*/
@Override
......@@ -1046,9 +1046,9 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
}
/**
* Returns the value of this socket's <code>port</code> field.
* Returns the value of this socket's {@code port} field.
*
* @return the value of this socket's <code>port</code> field.
* @return the value of this socket's {@code port} field.
* @see java.net.SocketImpl#port
*/
@Override
......
此差异已折叠。
/*
* Copyright (c) 2000, 2008, 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
......@@ -50,13 +50,13 @@ public class URISyntaxException
* @param input The input string
* @param reason A string explaining why the input could not be parsed
* @param index The index at which the parse error occurred,
* or <tt>-1</tt> if the index is not known
* or {@code -1} if the index is not known
*
* @throws NullPointerException
* If either the input or reason strings are <tt>null</tt>
* If either the input or reason strings are {@code null}
*
* @throws IllegalArgumentException
* If the error index is less than <tt>-1</tt>
* If the error index is less than {@code -1}
*/
public URISyntaxException(String input, String reason, int index) {
super(reason);
......@@ -70,13 +70,13 @@ public class URISyntaxException
/**
* Constructs an instance from the given input string and reason. The
* resulting object will have an error index of <tt>-1</tt>.
* resulting object will have an error index of {@code -1}.
*
* @param input The input string
* @param reason A string explaining why the input could not be parsed
*
* @throws NullPointerException
* If either the input or reason strings are <tt>null</tt>
* If either the input or reason strings are {@code null}
*/
public URISyntaxException(String input, String reason) {
this(input, reason, -1);
......@@ -102,7 +102,7 @@ public class URISyntaxException
/**
* Returns an index into the input string of the position at which the
* parse error occurred, or <tt>-1</tt> if this position is not known.
* parse error occurred, or {@code -1} if this position is not known.
*
* @return The error index
*/
......@@ -113,8 +113,8 @@ public class URISyntaxException
/**
* Returns a string describing the parse error. The resulting string
* consists of the reason string followed by a colon character
* (<tt>':'</tt>), a space, and the input string. If the error index is
* defined then the string <tt>" at index "</tt> followed by the index, in
* ({@code ':'}), a space, and the input string. If the error index is
* defined then the string {@code " at index "} followed by the index, in
* decimal, is inserted after the reason string and before the colon
* character.
*
......
此差异已折叠。
/*
* Copyright (c) 1997, 2011, 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
......@@ -117,7 +117,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
/**
* Constructs a new URLClassLoader for the specified URLs using the
* default delegation parent <code>ClassLoader</code>. The URLs will
* default delegation parent {@code ClassLoader}. The URLs will
* be searched in the order specified for classes and resources after
* first searching in the parent class loader. Any URL that ends with
* a '/' is assumed to refer to a directory. Otherwise, the URL is
......@@ -125,13 +125,13 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* as needed.
*
* <p>If there is a security manager, this method first
* calls the security manager's <code>checkCreateClassLoader</code> method
* calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
* @param urls the URLs from which to load classes and resources
*
* @exception SecurityException if a security manager exists and its
* <code>checkCreateClassLoader</code> method doesn't allow
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
* @see SecurityManager#checkCreateClassLoader
*/
......@@ -165,7 +165,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* obtain protocol handlers when creating new jar URLs.
*
* <p>If there is a security manager, this method first
* calls the security manager's <code>checkCreateClassLoader</code> method
* calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
* @param urls the URLs from which to load classes and resources
......@@ -173,7 +173,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* @param factory the URLStreamHandlerFactory to use when creating URLs
*
* @exception SecurityException if a security manager exists and its
* <code>checkCreateClassLoader</code> method doesn't allow
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
* @see SecurityManager#checkCreateClassLoader
*/
......@@ -217,7 +217,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* @param name
* The resource name
*
* @return An input stream for reading the resource, or <tt>null</tt>
* @return An input stream for reading the resource, or {@code null}
* if the resource could not be found
*
* @since 1.7
......@@ -273,7 +273,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* as suppressed exceptions of the first one caught, which is then re-thrown.
*
* @throws SecurityException if a security manager is set, and it denies
* {@link RuntimePermission}<tt>("closeClassLoader")</tt>
* {@link RuntimePermission}{@code ("closeClassLoader")}
*
* @since 1.7
*/
......@@ -316,7 +316,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* Appends the specified URL to the list of URLs to search for
* classes and resources.
* <p>
* If the URL specified is <code>null</code> or is already in the
* If the URL specified is {@code null} or is already in the
* list of URLs, or if this loader is closed, then invoking this
* method has no effect.
*
......@@ -537,7 +537,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* Finds the resource with the specified name on the URL search path.
*
* @param name the name of the resource
* @return a <code>URL</code> for the resource, or <code>null</code>
* @return a {@code URL} for the resource, or {@code null}
* if the resource could not be found, or if the loader is closed.
*/
public URL findResource(final String name) {
......@@ -560,7 +560,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
*
* @param name the resource name
* @exception IOException if an I/O exception occurs
* @return an <code>Enumeration</code> of <code>URL</code>s
* @return an {@code Enumeration} of {@code URL}s
* If the loader is closed, the Enumeration will be empty.
*/
public Enumeration<URL> findResources(final String name)
......@@ -699,9 +699,9 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
/**
* Creates a new instance of URLClassLoader for the specified
* URLs and parent class loader. If a security manager is
* installed, the <code>loadClass</code> method of the URLClassLoader
* installed, the {@code loadClass} method of the URLClassLoader
* returned by this method will invoke the
* <code>SecurityManager.checkPackageAccess</code> method before
* {@code SecurityManager.checkPackageAccess} method before
* loading the class.
*
* @param urls the URLs to search for classes and resources
......@@ -725,9 +725,9 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
/**
* Creates a new instance of URLClassLoader for the specified
* URLs and default parent class loader. If a security manager is
* installed, the <code>loadClass</code> method of the URLClassLoader
* installed, the {@code loadClass} method of the URLClassLoader
* returned by this method will invoke the
* <code>SecurityManager.checkPackageAccess</code> before
* {@code SecurityManager.checkPackageAccess} before
* loading the class.
*
* @param urls the URLs to search for classes and resources
......
/*
* 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
......@@ -26,11 +26,11 @@
package java.net;
/**
* This interface defines a factory for <code>URL</code> stream
* This interface defines a factory for {@code URL} stream
* protocol handlers.
* <p>
* It is used by the <code>URL</code> class to create a
* <code>URLStreamHandler</code> for a specific protocol.
* It is used by the {@code URL} class to create a
* {@code URLStreamHandler} for a specific protocol.
*
* @author Arthur van Hoff
* @see java.net.URL
......@@ -39,12 +39,12 @@ package java.net;
*/
public interface URLStreamHandlerFactory {
/**
* Creates a new <code>URLStreamHandler</code> instance with the specified
* Creates a new {@code URLStreamHandler} instance with the specified
* protocol.
*
* @param protocol the protocol ("<code>ftp</code>",
* "<code>http</code>", "<code>nntp</code>", etc.).
* @return a <code>URLStreamHandler</code> for the specific protocol.
* @param protocol the protocol ("{@code ftp}",
* "{@code http}", "{@code nntp}", etc.).
* @return a {@code URLStreamHandler} for the specific protocol.
* @see java.net.URLStreamHandler
*/
URLStreamHandler createURLStreamHandler(String protocol);
......
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -38,7 +38,7 @@ class UnknownHostException extends IOException {
private static final long serialVersionUID = -4639126076052875403L;
/**
* Constructs a new <code>UnknownHostException</code> with the
* Constructs a new {@code UnknownHostException} with the
* specified detail message.
*
* @param host the detail message.
......@@ -48,7 +48,7 @@ class UnknownHostException extends IOException {
}
/**
* Constructs a new <code>UnknownHostException</code> with no detail
* Constructs a new {@code UnknownHostException} with no detail
* message.
*/
public UnknownHostException() {
......
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册