8132468: docs: replace <tt> tags (obsolete in html5) for java.io, java.lang, java.math

Reviewed-by: lancea, dfuchs, smarks
This commit is contained in:
Alexander Stepanov 2015-08-06 13:20:13 +03:00
parent e7f31340a0
commit 321faa7346
61 changed files with 845 additions and 819 deletions

View file

@ -42,8 +42,8 @@ public class BufferedOutputStream extends FilterOutputStream {
/** /**
* The number of valid bytes in the buffer. This value is always * The number of valid bytes in the buffer. This value is always
* in the range <tt>0</tt> through <tt>buf.length</tt>; elements * in the range {@code 0} through {@code buf.length}; elements
* <tt>buf[0]</tt> through <tt>buf[count-1]</tt> contain valid * {@code buf[0]} through {@code buf[count-1]} contain valid
* byte data. * byte data.
*/ */
protected int count; protected int count;

View file

@ -170,7 +170,7 @@ public class BufferedReader extends Reader {
* Reads a single character. * Reads a single character.
* *
* @return The character read, as an integer in the range * @return The character read, as an integer in the range
* 0 to 65535 (<tt>0x00-0xffff</tt>), or -1 if the * 0 to 65535 ({@code 0x00-0xffff}), or -1 if the
* end of the stream has been reached * end of the stream has been reached
* @exception IOException If an I/O error occurs * @exception IOException If an I/O error occurs
*/ */

View file

@ -34,7 +34,7 @@ package java.io;
* The default is large enough for most purposes. * The default is large enough for most purposes.
* *
* <p> A newLine() method is provided, which uses the platform's own notion of * <p> A newLine() method is provided, which uses the platform's own notion of
* line separator as defined by the system property <tt>line.separator</tt>. * line separator as defined by the system property {@code line.separator}.
* Not all platforms use the newline character ('\n') to terminate lines. * Not all platforms use the newline character ('\n') to terminate lines.
* Calling this method to terminate each output line is therefore preferred to * Calling this method to terminate each output line is therefore preferred to
* writing a newline character directly. * writing a newline character directly.
@ -195,7 +195,7 @@ public class BufferedWriter extends Writer {
/** /**
* Writes a portion of a String. * Writes a portion of a String.
* *
* <p> If the value of the <tt>len</tt> parameter is negative then no * <p> If the value of the {@code len} parameter is negative then no
* characters are written. This is contrary to the specification of this * characters are written. This is contrary to the specification of this
* method in the {@linkplain java.io.Writer#write(java.lang.String,int,int) * method in the {@linkplain java.io.Writer#write(java.lang.String,int,int)
* superclass}, which requires that an {@link IndexOutOfBoundsException} be * superclass}, which requires that an {@link IndexOutOfBoundsException} be
@ -225,7 +225,7 @@ public class BufferedWriter extends Writer {
/** /**
* Writes a line separator. The line separator string is defined by the * Writes a line separator. The line separator string is defined by the
* system property <tt>line.separator</tt>, and is not necessarily a single * system property {@code line.separator}, and is not necessarily a single
* newline ('\n') character. * newline ('\n') character.
* *
* @exception IOException If an I/O error occurs * @exception IOException If an I/O error occurs

View file

@ -32,9 +32,9 @@ package java.io;
* counter keeps track of the next byte to * counter keeps track of the next byte to
* be supplied by the <code>read</code> method. * be supplied by the <code>read</code> method.
* <p> * <p>
* Closing a <tt>ByteArrayInputStream</tt> has no effect. The methods in * Closing a {@code ByteArrayInputStream} has no effect. The methods in
* this class can be called after the stream has been closed without * this class can be called after the stream has been closed without
* generating an <tt>IOException</tt>. * generating an {@code IOException}.
* *
* @author Arthur van Hoff * @author Arthur van Hoff
* @see java.io.StringBufferInputStream * @see java.io.StringBufferInputStream
@ -272,9 +272,9 @@ class ByteArrayInputStream extends InputStream {
} }
/** /**
* Closing a <tt>ByteArrayInputStream</tt> has no effect. The methods in * Closing a {@code ByteArrayInputStream} has no effect. The methods in
* this class can be called after the stream has been closed without * this class can be called after the stream has been closed without
* generating an <tt>IOException</tt>. * generating an {@code IOException}.
*/ */
public void close() throws IOException { public void close() throws IOException {
} }

View file

@ -31,12 +31,12 @@ import java.util.Arrays;
* This class implements an output stream in which the data is * This class implements an output stream in which the data is
* written into a byte array. The buffer automatically grows as data * written into a byte array. The buffer automatically grows as data
* is written to it. * is written to it.
* The data can be retrieved using <code>toByteArray()</code> and * The data can be retrieved using {@code toByteArray()} and
* <code>toString()</code>. * {@code toString()}.
* <p> * <p>
* Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
* this class can be called after the stream has been closed without * this class can be called after the stream has been closed without
* generating an <tt>IOException</tt>. * generating an {@code IOException}.
* *
* @author Arthur van Hoff * @author Arthur van Hoff
* @since 1.0 * @since 1.0
@ -138,8 +138,8 @@ public class ByteArrayOutputStream extends OutputStream {
} }
/** /**
* Writes <code>len</code> bytes from the specified byte array * Writes {@code len} bytes from the specified byte array
* starting at offset <code>off</code> to this byte array output stream. * starting at offset {@code off} to this byte array output stream.
* *
* @param b the data. * @param b the data.
* @param off the start offset in the data. * @param off the start offset in the data.
@ -158,7 +158,7 @@ public class ByteArrayOutputStream extends OutputStream {
/** /**
* Writes the complete contents of this byte array output stream to * Writes the complete contents of this byte array output stream to
* the specified output stream argument, as if by calling the output * the specified output stream argument, as if by calling the output
* stream's write method using <code>out.write(buf, 0, count)</code>. * stream's write method using {@code out.write(buf, 0, count)}.
* *
* @param out the output stream to which to write the data. * @param out the output stream to which to write the data.
* @exception IOException if an I/O error occurs. * @exception IOException if an I/O error occurs.
@ -168,7 +168,7 @@ public class ByteArrayOutputStream extends OutputStream {
} }
/** /**
* Resets the <code>count</code> field of this byte array output * Resets the {@code count} field of this byte array output
* stream to zero, so that all currently accumulated output in the * stream to zero, so that all currently accumulated output in the
* output stream is discarded. The output stream can be used again, * output stream is discarded. The output stream can be used again,
* reusing the already allocated buffer space. * reusing the already allocated buffer space.
@ -194,7 +194,7 @@ public class ByteArrayOutputStream extends OutputStream {
/** /**
* Returns the current size of the buffer. * Returns the current size of the buffer.
* *
* @return the value of the <code>count</code> field, which is the number * @return the value of the {@code count} field, which is the number
* of valid bytes in this output stream. * of valid bytes in this output stream.
* @see java.io.ByteArrayOutputStream#count * @see java.io.ByteArrayOutputStream#count
*/ */
@ -204,7 +204,7 @@ public class ByteArrayOutputStream extends OutputStream {
/** /**
* Converts the buffer's contents into a string decoding bytes using the * Converts the buffer's contents into a string decoding bytes using the
* platform's default character set. The length of the new <tt>String</tt> * platform's default character set. The length of the new {@code String}
* is a function of the character set, and hence may not be equal to the * is a function of the character set, and hence may not be equal to the
* size of the buffer. * size of the buffer.
* *
@ -224,7 +224,7 @@ public class ByteArrayOutputStream extends OutputStream {
/** /**
* Converts the buffer's contents into a string by decoding the bytes using * Converts the buffer's contents into a string by decoding the bytes using
* the named {@link java.nio.charset.Charset charset}. The length of the new * the named {@link java.nio.charset.Charset charset}. The length of the new
* <tt>String</tt> is a function of the charset, and hence may not be equal * {@code String} is a function of the charset, and hence may not be equal
* to the length of the byte array. * to the length of the byte array.
* *
* <p> This method always replaces malformed-input and unmappable-character * <p> This method always replaces malformed-input and unmappable-character
@ -251,14 +251,14 @@ public class ByteArrayOutputStream extends OutputStream {
* copied into it. Each character <i>c</i> in the resulting string is * copied into it. Each character <i>c</i> in the resulting string is
* constructed from the corresponding element <i>b</i> in the byte * constructed from the corresponding element <i>b</i> in the byte
* array such that: * array such that:
* <blockquote><pre> * <blockquote><pre>{@code
* c == (char)(((hibyte &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff)) * c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))
* </pre></blockquote> * }</pre></blockquote>
* *
* @deprecated This method does not properly convert bytes into characters. * @deprecated This method does not properly convert bytes into characters.
* As of JDK&nbsp;1.1, the preferred way to do this is via the * As of JDK&nbsp;1.1, the preferred way to do this is via the
* <code>toString(String enc)</code> method, which takes an encoding-name * {@code toString(String enc)} method, which takes an encoding-name
* argument, or the <code>toString()</code> method, which uses the * argument, or the {@code toString()} method, which uses the
* platform's default character encoding. * platform's default character encoding.
* *
* @param hibyte the high byte of each resulting Unicode character. * @param hibyte the high byte of each resulting Unicode character.
@ -273,9 +273,9 @@ public class ByteArrayOutputStream extends OutputStream {
} }
/** /**
* Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
* this class can be called after the stream has been closed without * this class can be called after the stream has been closed without
* generating an <tt>IOException</tt>. * generating an {@code IOException}.
*/ */
public void close() throws IOException { public void close() throws IOException {
} }

View file

@ -62,13 +62,13 @@ public class CharArrayReader extends Reader {
* Creates a CharArrayReader from the specified array of chars. * Creates a CharArrayReader from the specified array of chars.
* *
* <p> The resulting reader will start reading at the given * <p> The resulting reader will start reading at the given
* <tt>offset</tt>. The total number of <tt>char</tt> values that can be * {@code offset}. The total number of {@code char} values that can be
* read from this reader will be either <tt>length</tt> or * read from this reader will be either {@code length} or
* <tt>buf.length-offset</tt>, whichever is smaller. * {@code buf.length-offset}, whichever is smaller.
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If <tt>offset</tt> is negative or greater than * If {@code offset} is negative or greater than
* <tt>buf.length</tt>, or if <tt>length</tt> is negative, or if * {@code buf.length}, or if {@code length} is negative, or if
* the sum of these two values is negative. * the sum of these two values is negative.
* *
* @param buf Input buffer (not copied) * @param buf Input buffer (not copied)

View file

@ -141,21 +141,21 @@ class CharArrayWriter extends Writer {
/** /**
* Appends the specified character sequence to this writer. * Appends the specified character sequence to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(csq)</tt> * <p> An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
* out.write(csq.toString()) </pre> * out.write(csq.toString()) </pre>
* *
* <p> Depending on the specification of <tt>toString</tt> for the * <p> Depending on the specification of {@code toString} for the
* character sequence <tt>csq</tt>, the entire sequence may not be * character sequence {@code csq}, the entire sequence may not be
* appended. For instance, invoking the <tt>toString</tt> method of a * appended. For instance, invoking the {@code toString} method of a
* character buffer will return a subsequence whose content depends upon * character buffer will return a subsequence whose content depends upon
* the buffer's position and limit. * the buffer's position and limit.
* *
* @param csq * @param csq
* The character sequence to append. If <tt>csq</tt> is * The character sequence to append. If {@code csq} is
* <tt>null</tt>, then the four characters <tt>"null"</tt> are * {@code null}, then the four characters "{@code null}" are
* appended to this writer. * appended to this writer.
* *
* @return This writer * @return This writer
@ -171,8 +171,9 @@ class CharArrayWriter extends Writer {
/** /**
* Appends a subsequence of the specified character sequence to this writer. * Appends a subsequence of the specified character sequence to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(csq, start, * <p> An invocation of this method of the form
* end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in * {@code out.append(csq, start, end)} when
* {@code csq} is not {@code null}, behaves in
* exactly the same way as the invocation * exactly the same way as the invocation
* *
* <pre> * <pre>
@ -180,9 +181,9 @@ class CharArrayWriter extends Writer {
* *
* @param csq * @param csq
* The character sequence from which a subsequence will be * The character sequence from which a subsequence will be
* appended. If <tt>csq</tt> is <tt>null</tt>, then characters * appended. If {@code csq} is {@code null}, then characters
* will be appended as if <tt>csq</tt> contained the four * will be appended as if {@code csq} contained the four
* characters <tt>"null"</tt>. * characters "{@code null}".
* *
* @param start * @param start
* The index of the first character in the subsequence * The index of the first character in the subsequence
@ -194,9 +195,9 @@ class CharArrayWriter extends Writer {
* @return This writer * @return This writer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> * If {@code start} or {@code end} are negative, {@code start}
* is greater than <tt>end</tt>, or <tt>end</tt> is greater than * is greater than {@code end}, or {@code end} is greater than
* <tt>csq.length()</tt> * {@code csq.length()}
* *
* @since 1.5 * @since 1.5
*/ */
@ -209,7 +210,7 @@ class CharArrayWriter extends Writer {
/** /**
* Appends the specified character to this writer. * Appends the specified character to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(c)</tt> * <p> An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>

View file

@ -47,7 +47,7 @@ import sun.nio.cs.StreamEncoder;
* If this virtual machine has a console then it is represented by a * If this virtual machine has a console then it is represented by a
* unique instance of this class which can be obtained by invoking the * unique instance of this class which can be obtained by invoking the
* {@link java.lang.System#console()} method. If no console device is * {@link java.lang.System#console()} method. If no console device is
* available then an invocation of that method will return <tt>null</tt>. * available then an invocation of that method will return {@code null}.
* <p> * <p>
* Read and write operations are synchronized to guarantee the atomic * Read and write operations are synchronized to guarantee the atomic
* completion of critical operations; therefore invoking methods * completion of critical operations; therefore invoking methods
@ -56,17 +56,17 @@ import sun.nio.cs.StreamEncoder;
* on the objects returned by {@link #reader()} and {@link #writer()} may * on the objects returned by {@link #reader()} and {@link #writer()} may
* block in multithreaded scenarios. * block in multithreaded scenarios.
* <p> * <p>
* Invoking <tt>close()</tt> on the objects returned by the {@link #reader()} * Invoking {@code close()} on the objects returned by the {@link #reader()}
* and the {@link #writer()} will not close the underlying stream of those * and the {@link #writer()} will not close the underlying stream of those
* objects. * objects.
* <p> * <p>
* The console-read methods return <tt>null</tt> when the end of the * The console-read methods return {@code null} when the end of the
* console input stream is reached, for example by typing control-D on * console input stream is reached, for example by typing control-D on
* Unix or control-Z on Windows. Subsequent read operations will succeed * Unix or control-Z on Windows. Subsequent read operations will succeed
* if additional characters are later entered on the console's input * if additional characters are later entered on the console's input
* device. * device.
* <p> * <p>
* Unless otherwise specified, passing a <tt>null</tt> argument to any method * Unless otherwise specified, passing a {@code null} argument to any method
* in this class will cause a {@link NullPointerException} to be thrown. * in this class will cause a {@link NullPointerException} to be thrown.
* <p> * <p>
* <b>Security note:</b> * <b>Security note:</b>
@ -107,7 +107,7 @@ public final class Console implements Flushable
* <p> * <p>
* This method is intended to be used by sophisticated applications, for * This method is intended to be used by sophisticated applications, for
* example, a {@link java.util.Scanner} object which utilizes the rich * example, a {@link java.util.Scanner} object which utilizes the rich
* parsing/scanning functionality provided by the <tt>Scanner</tt>: * parsing/scanning functionality provided by the {@code Scanner}:
* <blockquote><pre> * <blockquote><pre>
* Console con = System.console(); * Console con = System.console();
* if (con != null) { * if (con != null) {
@ -117,7 +117,7 @@ public final class Console implements Flushable
* </pre></blockquote> * </pre></blockquote>
* <p> * <p>
* For simple applications requiring only line-oriented reading, use * For simple applications requiring only line-oriented reading, use
* <tt>{@link #readLine}</tt>. * {@link #readLine}.
* <p> * <p>
* The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) }, * The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) },
* {@link java.io.Reader#read(char[], int, int) read(char[], int, int) } and * {@link java.io.Reader#read(char[], int, int) read(char[], int, int) } and
@ -126,8 +126,8 @@ public final class Console implements Flushable
* bound for each invocation, even if the destination buffer has space for * bound for each invocation, even if the destination buffer has space for
* more characters. The {@code Reader}'s {@code read} methods may block if a * more characters. The {@code Reader}'s {@code read} methods may block if a
* line bound has not been entered or reached on the console's input device. * line bound has not been entered or reached on the console's input device.
* A line bound is considered to be any one of a line feed (<tt>'\n'</tt>), * A line bound is considered to be any one of a line feed ({@code '\n'}),
* a carriage return (<tt>'\r'</tt>), a carriage return followed immediately * a carriage return ({@code '\r'}), a carriage return followed immediately
* by a linefeed, or an end of stream. * by a linefeed, or an end of stream.
* *
* @return The reader associated with this console * @return The reader associated with this console
@ -152,7 +152,7 @@ public final class Console implements Flushable
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws IllegalFormatException * @throws IllegalFormatException
@ -175,8 +175,9 @@ public final class Console implements Flushable
* A convenience method to write a formatted string to this console's * A convenience method to write a formatted string to this console's
* output stream using the specified format string and arguments. * output stream using the specified format string and arguments.
* *
* <p> An invocation of this method of the form <tt>con.printf(format, * <p> An invocation of this method of the form
* args)</tt> behaves in exactly the same way as the invocation of * {@code con.printf(format, args)} behaves in exactly the same way
* as the invocation of
* <pre>con.format(format, args)</pre>. * <pre>con.format(format, args)</pre>.
* *
* @param format * @param format
@ -191,7 +192,7 @@ public final class Console implements Flushable
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws IllegalFormatException * @throws IllegalFormatException
@ -237,7 +238,7 @@ public final class Console implements Flushable
* If an I/O error occurs. * If an I/O error occurs.
* *
* @return A string containing the line read from the console, not * @return A string containing the line read from the console, not
* including any line-termination characters, or <tt>null</tt> * including any line-termination characters, or {@code null}
* if an end of stream has been reached. * if an end of stream has been reached.
*/ */
public String readLine(String fmt, Object ... args) { public String readLine(String fmt, Object ... args) {
@ -265,7 +266,7 @@ public final class Console implements Flushable
* If an I/O error occurs. * If an I/O error occurs.
* *
* @return A string containing the line read from the console, not * @return A string containing the line read from the console, not
* including any line-termination characters, or <tt>null</tt> * including any line-termination characters, or {@code null}
* if an end of stream has been reached. * if an end of stream has been reached.
*/ */
public String readLine() { public String readLine() {
@ -302,7 +303,7 @@ public final class Console implements Flushable
* *
* @return A character array containing the password or passphrase read * @return A character array containing the password or passphrase read
* from the console, not including any line-termination characters, * from the console, not including any line-termination characters,
* or <tt>null</tt> if an end of stream has been reached. * or {@code null} if an end of stream has been reached.
*/ */
public char[] readPassword(String fmt, Object ... args) { public char[] readPassword(String fmt, Object ... args) {
char[] passwd = null; char[] passwd = null;
@ -346,7 +347,7 @@ public final class Console implements Flushable
* *
* @return A character array containing the password or passphrase read * @return A character array containing the password or passphrase read
* from the console, not including any line-termination characters, * from the console, not including any line-termination characters,
* or <tt>null</tt> if an end of stream has been reached. * or {@code null} if an end of stream has been reached.
*/ */
public char[] readPassword() { public char[] readPassword() {
return readPassword(""); return readPassword("");

View file

@ -63,8 +63,8 @@ import sun.security.action.GetPropertyAction;
* pathname string, each name is separated from the next by a single copy of * pathname string, each name is separated from the next by a single copy of
* the default <em>separator character</em>. The default name-separator * the default <em>separator character</em>. The default name-separator
* character is defined by the system property <code>file.separator</code>, and * character is defined by the system property <code>file.separator</code>, and
* is made available in the public static fields <code>{@link * is made available in the public static fields {@link
* #separator}</code> and <code>{@link #separatorChar}</code> of this class. * #separator} and {@link #separatorChar} of this class.
* When a pathname string is converted into an abstract pathname, the names * When a pathname string is converted into an abstract pathname, the names
* within it may be separated by the default name-separator character or by any * within it may be separated by the default name-separator character or by any
* other name-separator character that is supported by the underlying system. * other name-separator character that is supported by the underlying system.
@ -82,11 +82,11 @@ import sun.security.action.GetPropertyAction;
* <p> The <em>parent</em> of an abstract pathname may be obtained by invoking * <p> The <em>parent</em> of an abstract pathname may be obtained by invoking
* the {@link #getParent} method of this class and consists of the pathname's * the {@link #getParent} method of this class and consists of the pathname's
* prefix and each name in the pathname's name sequence except for the last. * prefix and each name in the pathname's name sequence except for the last.
* Each directory's absolute pathname is an ancestor of any <tt>File</tt> * Each directory's absolute pathname is an ancestor of any {@code File}
* object with an absolute abstract pathname which begins with the directory's * object with an absolute abstract pathname which begins with the directory's
* absolute pathname. For example, the directory denoted by the abstract * absolute pathname. For example, the directory denoted by the abstract
* pathname <tt>"/usr"</tt> is an ancestor of the directory denoted by the * pathname {@code "/usr"} is an ancestor of the directory denoted by the
* pathname <tt>"/usr/local/bin"</tt>. * pathname {@code "/usr/local/bin"}.
* *
* <p> The prefix concept is used to handle root directories on UNIX platforms, * <p> The prefix concept is used to handle root directories on UNIX platforms,
* and drive specifiers, root directories and UNC pathnames on Microsoft Windows platforms, * and drive specifiers, root directories and UNC pathnames on Microsoft Windows platforms,
@ -217,7 +217,7 @@ public class File
/** /**
* The system-dependent default name-separator character, represented as a * The system-dependent default name-separator character, represented as a
* string for convenience. This string contains a single character, namely * string for convenience. This string contains a single character, namely
* <code>{@link #separatorChar}</code>. * {@link #separatorChar}.
*/ */
public static final String separator = "" + separatorChar; public static final String separator = "" + separatorChar;
@ -236,7 +236,7 @@ public class File
/** /**
* The system-dependent path-separator character, represented as a string * The system-dependent path-separator character, represented as a string
* for convenience. This string contains a single character, namely * for convenience. This string contains a single character, namely
* <code>{@link #pathSeparatorChar}</code>. * {@link #pathSeparatorChar}.
*/ */
public static final String pathSeparator = "" + pathSeparatorChar; public static final String pathSeparator = "" + pathSeparatorChar;
@ -374,33 +374,34 @@ public class File
} }
/** /**
* Creates a new <tt>File</tt> instance by converting the given * Creates a new {@code File} instance by converting the given
* <tt>file:</tt> URI into an abstract pathname. * {@code file:} URI into an abstract pathname.
* *
* <p> The exact form of a <tt>file:</tt> URI is system-dependent, hence * <p> The exact form of a {@code file:} URI is system-dependent, hence
* the transformation performed by this constructor is also * the transformation performed by this constructor is also
* system-dependent. * system-dependent.
* *
* <p> For a given abstract pathname <i>f</i> it is guaranteed that * <p> For a given abstract pathname <i>f</i> it is guaranteed that
* *
* <blockquote><tt> * <blockquote><code>
* new File(</tt><i>&nbsp;f</i><tt>.{@link #toURI() toURI}()).equals(</tt><i>&nbsp;f</i><tt>.{@link #getAbsoluteFile() getAbsoluteFile}()) * new File(</code><i>&nbsp;f</i><code>.{@link #toURI()
* </tt></blockquote> * toURI}()).equals(</code><i>&nbsp;f</i><code>.{@link #getAbsoluteFile() getAbsoluteFile}())
* </code></blockquote>
* *
* so long as the original abstract pathname, the URI, and the new abstract * so long as the original abstract pathname, the URI, and the new abstract
* pathname are all created in (possibly different invocations of) the same * pathname are all created in (possibly different invocations of) the same
* Java virtual machine. This relationship typically does not hold, * Java virtual machine. This relationship typically does not hold,
* however, when a <tt>file:</tt> URI that is created in a virtual machine * however, when a {@code file:} URI that is created in a virtual machine
* on one operating system is converted into an abstract pathname in a * on one operating system is converted into an abstract pathname in a
* virtual machine on a different operating system. * virtual machine on a different operating system.
* *
* @param uri * @param uri
* An absolute, hierarchical URI with a scheme equal to * An absolute, hierarchical URI with a scheme equal to
* <tt>"file"</tt>, a non-empty path component, and undefined * {@code "file"}, a non-empty path component, and undefined
* authority, query, and fragment components * authority, query, and fragment components
* *
* @throws NullPointerException * @throws NullPointerException
* If <tt>uri</tt> is <tt>null</tt> * If {@code uri} is {@code null}
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the preconditions on the parameter do not hold * If the preconditions on the parameter do not hold
@ -533,7 +534,7 @@ public class File
* Returns the absolute pathname string of this abstract pathname. * Returns the absolute pathname string of this abstract pathname.
* *
* <p> If this abstract pathname is already absolute, then the pathname * <p> If this abstract pathname is already absolute, then the pathname
* string is simply returned as if by the <code>{@link #getPath}</code> * string is simply returned as if by the {@link #getPath}
* method. If this abstract pathname is the empty abstract pathname then * method. If this abstract pathname is the empty abstract pathname then
* the pathname string of the current user directory, which is named by the * the pathname string of the current user directory, which is named by the
* system property <code>user.dir</code>, is returned. Otherwise this * system property <code>user.dir</code>, is returned. Otherwise this
@ -581,7 +582,7 @@ public class File
* converts this pathname to absolute form if necessary, as if by invoking the * converts this pathname to absolute form if necessary, as if by invoking the
* {@link #getAbsolutePath} method, and then maps it to its unique form in a * {@link #getAbsolutePath} method, and then maps it to its unique form in a
* system-dependent way. This typically involves removing redundant names * system-dependent way. This typically involves removing redundant names
* such as <tt>"."</tt> and <tt>".."</tt> from the pathname, resolving * such as {@code "."} and {@code ".."} from the pathname, resolving
* symbolic links (on UNIX platforms), and converting drive letters to a * symbolic links (on UNIX platforms), and converting drive letters to a
* standard case (on Microsoft Windows platforms). * standard case (on Microsoft Windows platforms).
* *
@ -604,8 +605,8 @@ public class File
* *
* @throws SecurityException * @throws SecurityException
* If a required system property value cannot be accessed, or * If a required system property value cannot be accessed, or
* if a security manager exists and its <code>{@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkRead}</code> method denies * java.lang.SecurityManager#checkRead} method denies
* read access to the file * read access to the file
* *
* @since 1.1 * @since 1.1
@ -632,8 +633,8 @@ public class File
* *
* @throws SecurityException * @throws SecurityException
* If a required system property value cannot be accessed, or * If a required system property value cannot be accessed, or
* if a security manager exists and its <code>{@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkRead}</code> method denies * java.lang.SecurityManager#checkRead} method denies
* read access to the file * read access to the file
* *
* @since 1.2 * @since 1.2
@ -687,7 +688,7 @@ public class File
} }
/** /**
* Constructs a <tt>file:</tt> URI that represents this abstract pathname. * Constructs a {@code file:} URI that represents this abstract pathname.
* *
* <p> The exact form of the URI is system-dependent. If it can be * <p> The exact form of the URI is system-dependent. If it can be
* determined that the file denoted by this abstract pathname is a * determined that the file denoted by this abstract pathname is a
@ -695,15 +696,16 @@ public class File
* *
* <p> For a given abstract pathname <i>f</i>, it is guaranteed that * <p> For a given abstract pathname <i>f</i>, it is guaranteed that
* *
* <blockquote><tt> * <blockquote><code>
* new {@link #File(java.net.URI) File}(</tt><i>&nbsp;f</i><tt>.toURI()).equals(</tt><i>&nbsp;f</i><tt>.{@link #getAbsoluteFile() getAbsoluteFile}()) * new {@link #File(java.net.URI) File}(</code><i>&nbsp;f</i><code>.toURI()).equals(
* </tt></blockquote> * </code><i>&nbsp;f</i><code>.{@link #getAbsoluteFile() getAbsoluteFile}())
* </code></blockquote>
* *
* so long as the original abstract pathname, the URI, and the new abstract * so long as the original abstract pathname, the URI, and the new abstract
* pathname are all created in (possibly different invocations of) the same * pathname are all created in (possibly different invocations of) the same
* Java virtual machine. Due to the system-dependent nature of abstract * Java virtual machine. Due to the system-dependent nature of abstract
* pathnames, however, this relationship typically does not hold when a * pathnames, however, this relationship typically does not hold when a
* <tt>file:</tt> URI that is created in a virtual machine on one operating * {@code file:} URI that is created in a virtual machine on one operating
* system is converted into an abstract pathname in a virtual machine on a * system is converted into an abstract pathname in a virtual machine on a
* different operating system. * different operating system.
* *
@ -716,7 +718,7 @@ public class File
* may be used to obtain a {@code Path} representing this abstract pathname. * may be used to obtain a {@code Path} representing this abstract pathname.
* *
* @return An absolute, hierarchical URI with a scheme equal to * @return An absolute, hierarchical URI with a scheme equal to
* <tt>"file"</tt>, a path representing this abstract pathname, * {@code "file"}, a path representing this abstract pathname,
* and undefined authority, query, and fragment components * and undefined authority, query, and fragment components
* @throws SecurityException If a required system property value cannot * @throws SecurityException If a required system property value cannot
* be accessed. * be accessed.
@ -753,8 +755,8 @@ public class File
* application; <code>false</code> otherwise * application; <code>false</code> otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkRead(java.lang.String)}</code> * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file * method denies read access to the file
*/ */
public boolean canRead() { public boolean canRead() {
@ -781,8 +783,8 @@ public class File
* <code>false</code> otherwise. * <code>false</code> otherwise.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file * method denies write access to the file
*/ */
public boolean canWrite() { public boolean canWrite() {
@ -804,8 +806,8 @@ public class File
* by this abstract pathname exists; <code>false</code> otherwise * by this abstract pathname exists; <code>false</code> otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkRead(java.lang.String)}</code> * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file or directory * method denies read access to the file or directory
*/ */
public boolean exists() { public boolean exists() {
@ -834,8 +836,8 @@ public class File
* <code>false</code> otherwise * <code>false</code> otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkRead(java.lang.String)}</code> * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file * method denies read access to the file
*/ */
public boolean isDirectory() { public boolean isDirectory() {
@ -867,8 +869,8 @@ public class File
* <code>false</code> otherwise * <code>false</code> otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkRead(java.lang.String)}</code> * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file * method denies read access to the file
*/ */
public boolean isFile() { public boolean isFile() {
@ -894,8 +896,8 @@ public class File
* underlying platform * underlying platform
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkRead(java.lang.String)}</code> * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file * method denies read access to the file
* *
* @since 1.2 * @since 1.2
@ -928,8 +930,8 @@ public class File
* file does not exist or if an I/O error occurs * file does not exist or if an I/O error occurs
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkRead(java.lang.String)}</code> * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file * method denies read access to the file
*/ */
public long lastModified() { public long lastModified() {
@ -959,8 +961,8 @@ public class File
* denoting system-dependent entities such as devices or pipes. * denoting system-dependent entities such as devices or pipes.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkRead(java.lang.String)}</code> * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file * method denies read access to the file
*/ */
public long length() { public long length() {
@ -997,8 +999,8 @@ public class File
* If an I/O error occurred * If an I/O error occurred
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file * method denies write access to the file
* *
* @since 1.2 * @since 1.2
@ -1026,8 +1028,8 @@ public class File
* successfully deleted; <code>false</code> otherwise * successfully deleted; <code>false</code> otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkDelete}</code> method denies * java.lang.SecurityManager#checkDelete} method denies
* delete access to the file * delete access to the file
*/ */
public boolean delete() { public boolean delete() {
@ -1060,8 +1062,8 @@ public class File
* facility should be used instead. * facility should be used instead.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkDelete}</code> method denies * java.lang.SecurityManager#checkDelete} method denies
* delete access to the file * delete access to the file
* *
* @see #delete * @see #delete
@ -1301,8 +1303,8 @@ public class File
* created; <code>false</code> otherwise * created; <code>false</code> otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not permit the named directory to be created * method does not permit the named directory to be created
*/ */
public boolean mkdir() { public boolean mkdir() {
@ -1327,12 +1329,12 @@ public class File
* otherwise * otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkRead(java.lang.String)}</code> * java.lang.SecurityManager#checkRead(java.lang.String)}
* method does not permit verification of the existence of the * method does not permit verification of the existence of the
* named directory and all necessary parent directories; or if * named directory and all necessary parent directories; or if
* the <code>{@link * the {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not permit the named directory and all necessary * method does not permit the named directory and all necessary
* parent directories to be created * parent directories to be created
*/ */
@ -1375,8 +1377,8 @@ public class File
* <code>false</code> otherwise * <code>false</code> otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to either the old or new pathnames * method denies write access to either the old or new pathnames
* *
* @throws NullPointerException * @throws NullPointerException
@ -1405,7 +1407,7 @@ public class File
* but some provide more precision. The argument will be truncated to fit * but some provide more precision. The argument will be truncated to fit
* the supported precision. If the operation succeeds and no intervening * the supported precision. If the operation succeeds and no intervening
* operations on the file take place, then the next invocation of the * operations on the file take place, then the next invocation of the
* <code>{@link #lastModified}</code> method will return the (possibly * {@link #lastModified} method will return the (possibly
* truncated) <code>time</code> argument that was passed to this method. * truncated) <code>time</code> argument that was passed to this method.
* *
* @param time The new last-modified time, measured in milliseconds since * @param time The new last-modified time, measured in milliseconds since
@ -1417,8 +1419,8 @@ public class File
* @throws IllegalArgumentException If the argument is negative * @throws IllegalArgumentException If the argument is negative
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file * method denies write access to the named file
* *
* @since 1.2 * @since 1.2
@ -1448,8 +1450,8 @@ public class File
* <code>false</code> otherwise * <code>false</code> otherwise
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file * method denies write access to the named file
* *
* @since 1.2 * @since 1.2
@ -1491,8 +1493,8 @@ public class File
* the access permissions of this abstract pathname. * the access permissions of this abstract pathname.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file * method denies write access to the named file
* *
* @since 1.6 * @since 1.6
@ -1514,11 +1516,12 @@ public class File
* machine with special privileges that allow it to modify files that * machine with special privileges that allow it to modify files that
* disallow write operations. * disallow write operations.
* *
* <p> An invocation of this method of the form <tt>file.setWritable(arg)</tt> * <p> An invocation of this method of the form {@code file.setWritable(arg)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* file.setWritable(arg, true) </pre> * file.setWritable(arg, true)
* }</pre>
* *
* @param writable * @param writable
* If <code>true</code>, sets the access permission to allow write * If <code>true</code>, sets the access permission to allow write
@ -1529,8 +1532,8 @@ public class File
* change the access permissions of this abstract pathname. * change the access permissions of this abstract pathname.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file * method denies write access to the file
* *
* @since 1.6 * @since 1.6
@ -1568,8 +1571,8 @@ public class File
* operation will fail. * operation will fail.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file * method denies write access to the file
* *
* @since 1.6 * @since 1.6
@ -1591,11 +1594,12 @@ public class File
* machine with special privileges that allow it to read files that are * machine with special privileges that allow it to read files that are
* marked as unreadable. * marked as unreadable.
* *
* <p>An invocation of this method of the form <tt>file.setReadable(arg)</tt> * <p>An invocation of this method of the form {@code file.setReadable(arg)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* file.setReadable(arg, true) </pre> * file.setReadable(arg, true)
* }</pre>
* *
* @param readable * @param readable
* If <code>true</code>, sets the access permission to allow read * If <code>true</code>, sets the access permission to allow read
@ -1609,8 +1613,8 @@ public class File
* operation will fail. * operation will fail.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file * method denies write access to the file
* *
* @since 1.6 * @since 1.6
@ -1648,8 +1652,8 @@ public class File
* operation will fail. * operation will fail.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file * method denies write access to the file
* *
* @since 1.6 * @since 1.6
@ -1671,11 +1675,12 @@ public class File
* virtual machine with special privileges that allow it to execute files * virtual machine with special privileges that allow it to execute files
* that are not marked executable. * that are not marked executable.
* *
* <p>An invocation of this method of the form <tt>file.setExcutable(arg)</tt> * <p>An invocation of this method of the form {@code file.setExcutable(arg)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* file.setExecutable(arg, true) </pre> * file.setExecutable(arg, true)
* }</pre>
* *
* @param executable * @param executable
* If <code>true</code>, sets the access permission to allow execute * If <code>true</code>, sets the access permission to allow execute
@ -1689,8 +1694,8 @@ public class File
* operation will fail. * operation will fail.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file * method denies write access to the file
* *
* @since 1.6 * @since 1.6
@ -1710,8 +1715,8 @@ public class File
* <em>and</em> the application is allowed to execute the file * <em>and</em> the application is allowed to execute the file
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkExec(java.lang.String)}</code> * java.lang.SecurityManager#checkExec(java.lang.String)}
* method denies execute access to the file * method denies execute access to the file
* *
* @since 1.6 * @since 1.6
@ -1783,12 +1788,12 @@ public class File
* Returns the size of the partition <a href="#partName">named</a> by this * Returns the size of the partition <a href="#partName">named</a> by this
* abstract pathname. * abstract pathname.
* *
* @return The size, in bytes, of the partition or <tt>0L</tt> if this * @return The size, in bytes, of the partition or {@code 0L} if this
* abstract pathname does not name a partition * abstract pathname does not name a partition
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt> * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies * or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname * read access to the file named by this abstract pathname
* *
@ -1819,14 +1824,14 @@ public class File
* makes no guarantee that write operations to this file system * makes no guarantee that write operations to this file system
* will succeed. * will succeed.
* *
* @return The number of unallocated bytes on the partition or <tt>0L</tt> * @return The number of unallocated bytes on the partition or {@code 0L}
* if the abstract pathname does not name a partition. This * if the abstract pathname does not name a partition. This
* value will be less than or equal to the total file system size * value will be less than or equal to the total file system size
* returned by {@link #getTotalSpace}. * returned by {@link #getTotalSpace}.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt> * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies * or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname * read access to the file named by this abstract pathname
* *
@ -1860,14 +1865,14 @@ public class File
* virtual machine. This method makes no guarantee that write operations * virtual machine. This method makes no guarantee that write operations
* to this file system will succeed. * to this file system will succeed.
* *
* @return The number of available bytes on the partition or <tt>0L</tt> * @return The number of available bytes on the partition or {@code 0L}
* if the abstract pathname does not name a partition. On * if the abstract pathname does not name a partition. On
* systems where this information is not available, this method * systems where this information is not available, this method
* will be equivalent to a call to {@link #getFreeSpace}. * will be equivalent to a call to {@link #getFreeSpace}.
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt> * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies * or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname * read access to the file named by this abstract pathname
* *
@ -1939,7 +1944,7 @@ public class File
* *
* This method provides only part of a temporary-file facility. To arrange * This method provides only part of a temporary-file facility. To arrange
* for a file created by this method to be deleted automatically, use the * for a file created by this method to be deleted automatically, use the
* <code>{@link #deleteOnExit}</code> method. * {@link #deleteOnExit} method.
* *
* <p> The <code>prefix</code> argument must be at least three characters * <p> The <code>prefix</code> argument must be at least three characters
* long. It is recommended that the prefix be a short, meaningful string * long. It is recommended that the prefix be a short, meaningful string
@ -1987,8 +1992,8 @@ public class File
* @throws IOException If a file could not be created * @throws IOException If a file could not be created
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not allow a file to be created * method does not allow a file to be created
* *
* @since 1.2 * @since 1.2
@ -2032,9 +2037,9 @@ public class File
/** /**
* Creates an empty file in the default temporary-file directory, using * Creates an empty file in the default temporary-file directory, using
* the given prefix and suffix to generate its name. Invoking this method * the given prefix and suffix to generate its name. Invoking this method
* is equivalent to invoking <code>{@link #createTempFile(java.lang.String, * is equivalent to invoking {@link #createTempFile(java.lang.String,
* java.lang.String, java.io.File) * java.lang.String, java.io.File)
* createTempFile(prefix,&nbsp;suffix,&nbsp;null)}</code>. * createTempFile(prefix,&nbsp;suffix,&nbsp;null)}.
* *
* <p> The {@link * <p> The {@link
* java.nio.file.Files#createTempFile(String,String,java.nio.file.attribute.FileAttribute[]) * java.nio.file.Files#createTempFile(String,String,java.nio.file.attribute.FileAttribute[])
@ -2059,8 +2064,8 @@ public class File
* @throws IOException If a file could not be created * @throws IOException If a file could not be created
* *
* @throws SecurityException * @throws SecurityException
* If a security manager exists and its <code>{@link * If a security manager exists and its {@link
* java.lang.SecurityManager#checkWrite(java.lang.String)}</code> * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not allow a file to be created * method does not allow a file to be created
* *
* @since 1.2 * @since 1.2
@ -2136,7 +2141,7 @@ public class File
/** /**
* Returns the pathname string of this abstract pathname. This is just the * Returns the pathname string of this abstract pathname. This is just the
* string returned by the <code>{@link #getPath}</code> method. * string returned by the {@link #getPath} method.
* *
* @return The string form of this abstract pathname * @return The string form of this abstract pathname
*/ */

View file

@ -37,7 +37,7 @@ import sun.nio.ch.FileChannelImpl;
* <code>File</code> or to a <code>FileDescriptor</code>. Whether or not * <code>File</code> or to a <code>FileDescriptor</code>. Whether or not
* a file is available or may be created depends upon the underlying * a file is available or may be created depends upon the underlying
* platform. Some platforms, in particular, allow a file to be opened * platform. Some platforms, in particular, allow a file to be opened
* for writing by only one <tt>FileOutputStream</tt> (or other * for writing by only one {@code FileOutputStream} (or other
* file-writing object) at a time. In such situations the constructors in * file-writing object) at a time. In such situations the constructors in
* this class will fail if the file involved is already open. * this class will fail if the file involved is already open.
* *

View file

@ -32,9 +32,9 @@ package java.io;
* size are appropriate. To specify these values yourself, construct an * size are appropriate. To specify these values yourself, construct an
* InputStreamReader on a FileInputStream. * InputStreamReader on a FileInputStream.
* *
* <p><code>FileReader</code> is meant for reading streams of characters. * <p>{@code FileReader} is meant for reading streams of characters.
* For reading streams of raw bytes, consider using a * For reading streams of raw bytes, consider using a
* <code>FileInputStream</code>. * {@code FileInputStream}.
* *
* @see InputStreamReader * @see InputStreamReader
* @see FileInputStream * @see FileInputStream
@ -45,7 +45,7 @@ package java.io;
public class FileReader extends InputStreamReader { public class FileReader extends InputStreamReader {
/** /**
* Creates a new <tt>FileReader</tt>, given the name of the * Creates a new {@code FileReader}, given the name of the
* file to read from. * file to read from.
* *
* @param fileName the name of the file to read from * @param fileName the name of the file to read from
@ -59,10 +59,10 @@ public class FileReader extends InputStreamReader {
} }
/** /**
* Creates a new <tt>FileReader</tt>, given the <tt>File</tt> * Creates a new {@code FileReader}, given the {@code File}
* to read from. * to read from.
* *
* @param file the <tt>File</tt> to read from * @param file the {@code File} to read from
* @exception FileNotFoundException if the file does not exist, * @exception FileNotFoundException if the file does not exist,
* is a directory rather than a regular file, * is a directory rather than a regular file,
* or for some other reason cannot be opened for * or for some other reason cannot be opened for
@ -73,8 +73,8 @@ public class FileReader extends InputStreamReader {
} }
/** /**
* Creates a new <tt>FileReader</tt>, given the * Creates a new {@code FileReader}, given the
* <tt>FileDescriptor</tt> to read from. * {@code FileDescriptor} to read from.
* *
* @param fd the FileDescriptor to read from * @param fd the FileDescriptor to read from
*/ */

View file

@ -34,13 +34,13 @@ package java.io;
* *
* <p>Whether or not a file is available or may be created depends upon the * <p>Whether or not a file is available or may be created depends upon the
* underlying platform. Some platforms, in particular, allow a file to be * underlying platform. Some platforms, in particular, allow a file to be
* opened for writing by only one <tt>FileWriter</tt> (or other file-writing * opened for writing by only one {@code FileWriter} (or other file-writing
* object) at a time. In such situations the constructors in this class * object) at a time. In such situations the constructors in this class
* will fail if the file involved is already open. * will fail if the file involved is already open.
* *
* <p><code>FileWriter</code> is meant for writing streams of characters. * <p>{@code FileWriter} is meant for writing streams of characters.
* For writing streams of raw bytes, consider using a * For writing streams of raw bytes, consider using a
* <code>FileOutputStream</code>. * {@code FileOutputStream}.
* *
* @see OutputStreamWriter * @see OutputStreamWriter
* @see FileOutputStream * @see FileOutputStream
@ -68,7 +68,7 @@ public class FileWriter extends OutputStreamWriter {
* indicating whether or not to append the data written. * indicating whether or not to append the data written.
* *
* @param fileName String The system-dependent filename. * @param fileName String The system-dependent filename.
* @param append boolean if <code>true</code>, then data will be written * @param append boolean if {@code true}, then data will be written
* to the end of the file rather than the beginning. * to the end of the file rather than the beginning.
* @throws IOException if the named file exists but is a directory rather * @throws IOException if the named file exists but is a directory rather
* than a regular file, does not exist but cannot be * than a regular file, does not exist but cannot be
@ -92,11 +92,11 @@ public class FileWriter extends OutputStreamWriter {
/** /**
* Constructs a FileWriter object given a File object. If the second * Constructs a FileWriter object given a File object. If the second
* argument is <code>true</code>, then bytes will be written to the end * argument is {@code true}, then bytes will be written to the end
* of the file rather than the beginning. * of the file rather than the beginning.
* *
* @param file a File object to write to * @param file a File object to write to
* @param append if <code>true</code>, then bytes will be written * @param append if {@code true}, then bytes will be written
* to the end of the file rather than the beginning * to the end of the file rather than the beginning
* @throws IOException if the file exists but is a directory rather than * @throws IOException if the file exists but is a directory rather than
* a regular file, does not exist but cannot be created, * a regular file, does not exist but cannot be created,

View file

@ -57,7 +57,7 @@ public class FilterOutputStream extends OutputStream {
* underlying output stream. * underlying output stream.
* *
* @param out the underlying output stream to be assigned to * @param out the underlying output stream to be assigned to
* the field <tt>this.out</tt> for later use, or * the field {@code this.out} for later use, or
* <code>null</code> if this instance is to be * <code>null</code> if this instance is to be
* created without an underlying stream. * created without an underlying stream.
*/ */
@ -70,9 +70,9 @@ public class FilterOutputStream extends OutputStream {
* <p> * <p>
* The <code>write</code> method of <code>FilterOutputStream</code> * The <code>write</code> method of <code>FilterOutputStream</code>
* calls the <code>write</code> method of its underlying output stream, * calls the <code>write</code> method of its underlying output stream,
* that is, it performs <tt>out.write(b)</tt>. * that is, it performs {@code out.write(b)}.
* <p> * <p>
* Implements the abstract <tt>write</tt> method of <tt>OutputStream</tt>. * Implements the abstract {@code write} method of {@code OutputStream}.
* *
* @param b the <code>byte</code>. * @param b the <code>byte</code>.
* @exception IOException if an I/O error occurs. * @exception IOException if an I/O error occurs.

View file

@ -28,7 +28,7 @@ package java.io;
import java.io.IOException; import java.io.IOException;
/** /**
* A <tt>Flushable</tt> is a destination of data that can be flushed. The * A {@code Flushable} is a destination of data that can be flushed. The
* flush method is invoked to write any buffered output to the underlying * flush method is invoked to write any buffered output to the underlying
* stream. * stream.
* *

View file

@ -35,11 +35,11 @@ public class IOError extends Error {
/** /**
* Constructs a new instance of IOError with the specified cause. The * Constructs a new instance of IOError with the specified cause. The
* IOError is created with the detail message of * IOError is created with the detail message of
* <tt>(cause==null ? null : cause.toString())</tt> (which typically * {@code (cause==null ? null : cause.toString())} (which typically
* contains the class and detail message of cause). * contains the class and detail message of cause).
* *
* @param cause * @param cause
* The cause of this error, or <tt>null</tt> if the cause * The cause of this error, or {@code null} if the cause
* is not known * is not known
*/ */
public IOError(Throwable cause) { public IOError(Throwable cause) {

View file

@ -34,10 +34,10 @@ package java.io;
* *
* <p> By default, line numbering begins at 0. This number increments at every * <p> By default, line numbering begins at 0. This number increments at every
* <a href="#lt">line terminator</a> as the data is read, and can be changed * <a href="#lt">line terminator</a> as the data is read, and can be changed
* with a call to <tt>setLineNumber(int)</tt>. Note however, that * with a call to {@code setLineNumber(int)}. Note however, that
* <tt>setLineNumber(int)</tt> does not actually change the current position in * {@code setLineNumber(int)} does not actually change the current position in
* the stream; it only changes the value that will be returned by * the stream; it only changes the value that will be returned by
* <tt>getLineNumber()</tt>. * {@code getLineNumber()}.
* *
* <p> A line is considered to be <a name="lt">terminated</a> by any one of a * <p> A line is considered to be <a name="lt">terminated</a> by any one of a
* line feed ('\n'), a carriage return ('\r'), or a carriage return followed * line feed ('\n'), a carriage return ('\r'), or a carriage return followed
@ -193,7 +193,7 @@ public class LineNumberReader extends BufferedReader {
* *
* @return A String containing the contents of the line, not including * @return A String containing the contents of the line, not including
* any <a href="#lt">line termination characters</a>, or * any <a href="#lt">line termination characters</a>, or
* <tt>null</tt> if the end of the stream has been reached * {@code null} if the end of the stream has been reached
* *
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs
@ -226,7 +226,7 @@ public class LineNumberReader extends BufferedReader {
* If an I/O error occurs * If an I/O error occurs
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If <tt>n</tt> is negative * If {@code n} is negative
*/ */
public long skip(long n) throws IOException { public long skip(long n) throws IOException {
if (n < 0) if (n < 0)

View file

@ -94,7 +94,7 @@ public abstract class OutputStream implements Closeable, Flushable {
* <p> * <p>
* If <code>off</code> is negative, or <code>len</code> is negative, or * If <code>off</code> is negative, or <code>len</code> is negative, or
* <code>off+len</code> is greater than the length of the array * <code>off+len</code> is greater than the length of the array
* <code>b</code>, then an <tt>IndexOutOfBoundsException</tt> is thrown. * {@code b}, then an {@code IndexOutOfBoundsException} is thrown.
* *
* @param b the data. * @param b the data.
* @param off the start offset in the data. * @param off the start offset in the data.

View file

@ -53,7 +53,7 @@ import sun.nio.cs.StreamEncoder;
* </pre> * </pre>
* *
* <p> A <i>surrogate pair</i> is a character represented by a sequence of two * <p> A <i>surrogate pair</i> is a character represented by a sequence of two
* <tt>char</tt> values: A <i>high</i> surrogate in the range '&#92;uD800' to * {@code char} values: A <i>high</i> surrogate in the range '&#92;uD800' to
* '&#92;uDBFF' followed by a <i>low</i> surrogate in the range '&#92;uDC00' to * '&#92;uDBFF' followed by a <i>low</i> surrogate in the range '&#92;uDC00' to
* '&#92;uDFFF'. * '&#92;uDFFF'.
* *
@ -161,7 +161,7 @@ public class OutputStreamWriter extends Writer {
* <p> If this instance was created with the {@link * <p> If this instance was created with the {@link
* #OutputStreamWriter(OutputStream, String)} constructor then the returned * #OutputStreamWriter(OutputStream, String)} constructor then the returned
* name, being unique for the encoding, may differ from the name passed to * name, being unique for the encoding, may differ from the name passed to
* the constructor. This method may return <tt>null</tt> if the stream has * the constructor. This method may return {@code null} if the stream has
* been closed. </p> * been closed. </p>
* *
* @return The historical name of this encoding, or possibly * @return The historical name of this encoding, or possibly

View file

@ -32,22 +32,22 @@ import java.nio.charset.IllegalCharsetNameException;
import java.nio.charset.UnsupportedCharsetException; import java.nio.charset.UnsupportedCharsetException;
/** /**
* A <code>PrintStream</code> adds functionality to another output stream, * A {@code PrintStream} adds functionality to another output stream,
* namely the ability to print representations of various data values * namely the ability to print representations of various data values
* conveniently. Two other features are provided as well. Unlike other output * conveniently. Two other features are provided as well. Unlike other output
* streams, a <code>PrintStream</code> never throws an * streams, a {@code PrintStream} never throws an
* <code>IOException</code>; instead, exceptional situations merely set an * {@code IOException}; instead, exceptional situations merely set an
* internal flag that can be tested via the <code>checkError</code> method. * internal flag that can be tested via the {@code checkError} method.
* Optionally, a <code>PrintStream</code> can be created so as to flush * Optionally, a {@code PrintStream} can be created so as to flush
* automatically; this means that the <code>flush</code> method is * automatically; this means that the {@code flush} method is
* automatically invoked after a byte array is written, one of the * automatically invoked after a byte array is written, one of the
* <code>println</code> methods is invoked, or a newline character or byte * {@code println} methods is invoked, or a newline character or byte
* (<code>'\n'</code>) is written. * ({@code '\n'}) is written.
* *
* <p> All characters printed by a <code>PrintStream</code> are converted into * <p> All characters printed by a {@code PrintStream} are converted into
* bytes using the platform's default character encoding. The <code>{@link * bytes using the platform's default character encoding.
* PrintWriter}</code> class should be used in situations that require writing * The {@link PrintWriter} class should be used in situations that require
* characters rather than bytes. * writing characters rather than bytes.
* *
* @author Frank Yellin * @author Frank Yellin
* @author Mark Reinhold * @author Mark Reinhold
@ -142,8 +142,8 @@ public class PrintStream extends FilterOutputStream
* printed * printed
* @param autoFlush A boolean; if true, the output buffer will be flushed * @param autoFlush A boolean; if true, the output buffer will be flushed
* whenever a byte array is written, one of the * whenever a byte array is written, one of the
* <code>println</code> methods is invoked, or a newline * {@code println} methods is invoked, or a newline
* character or byte (<code>'\n'</code>) is written * character or byte ({@code '\n'}) is written
* *
* @see java.io.PrintWriter#PrintWriter(java.io.OutputStream, boolean) * @see java.io.PrintWriter#PrintWriter(java.io.OutputStream, boolean)
*/ */
@ -158,8 +158,8 @@ public class PrintStream extends FilterOutputStream
* printed * printed
* @param autoFlush A boolean; if true, the output buffer will be flushed * @param autoFlush A boolean; if true, the output buffer will be flushed
* whenever a byte array is written, one of the * whenever a byte array is written, one of the
* <code>println</code> methods is invoked, or a newline * {@code println} methods is invoked, or a newline
* character or byte (<code>'\n'</code>) is written * character or byte ({@code '\n'}) is written
* @param encoding The name of a supported * @param encoding The name of a supported
* <a href="../lang/package-summary.html#charenc"> * <a href="../lang/package-summary.html#charenc">
* character encoding</a> * character encoding</a>
@ -371,21 +371,21 @@ public class PrintStream extends FilterOutputStream
/** /**
* Flushes the stream and checks its error state. The internal error state * Flushes the stream and checks its error state. The internal error state
* is set to <code>true</code> when the underlying output stream throws an * is set to {@code true} when the underlying output stream throws an
* <code>IOException</code> other than <code>InterruptedIOException</code>, * {@code IOException} other than {@code InterruptedIOException},
* and when the <code>setError</code> method is invoked. If an operation * and when the {@code setError} method is invoked. If an operation
* on the underlying output stream throws an * on the underlying output stream throws an
* <code>InterruptedIOException</code>, then the <code>PrintStream</code> * {@code InterruptedIOException}, then the {@code PrintStream}
* converts the exception back into an interrupt by doing: * converts the exception back into an interrupt by doing:
* <pre> * <pre>{@code
* Thread.currentThread().interrupt(); * Thread.currentThread().interrupt();
* </pre> * }</pre>
* or the equivalent. * or the equivalent.
* *
* @return <code>true</code> if and only if this stream has encountered an * @return {@code true} if and only if this stream has encountered an
* <code>IOException</code> other than * {@code IOException} other than
* <code>InterruptedIOException</code>, or the * {@code InterruptedIOException}, or the
* <code>setError</code> method has been invoked * {@code setError} method has been invoked
*/ */
public boolean checkError() { public boolean checkError() {
if (out != null) if (out != null)
@ -398,11 +398,11 @@ public class PrintStream extends FilterOutputStream
} }
/** /**
* Sets the error state of the stream to <code>true</code>. * Sets the error state of the stream to {@code true}.
* *
* <p> This method will cause subsequent invocations of {@link * <p> This method will cause subsequent invocations of {@link
* #checkError()} to return <tt>true</tt> until {@link * #checkError()} to return {@code true} until
* #clearError()} is invoked. * {@link #clearError()} is invoked.
* *
* @since 1.1 * @since 1.1
*/ */
@ -414,7 +414,7 @@ public class PrintStream extends FilterOutputStream
* Clears the internal error state of this stream. * Clears the internal error state of this stream.
* *
* <p> This method will cause subsequent invocations of {@link * <p> This method will cause subsequent invocations of {@link
* #checkError()} to return <tt>false</tt> until another write * #checkError()} to return {@code false} until another write
* operation fails and invokes {@link #setError()}. * operation fails and invokes {@link #setError()}.
* *
* @since 1.6 * @since 1.6
@ -430,12 +430,12 @@ public class PrintStream extends FilterOutputStream
/** /**
* Writes the specified byte to this stream. If the byte is a newline and * Writes the specified byte to this stream. If the byte is a newline and
* automatic flushing is enabled then the <code>flush</code> method will be * automatic flushing is enabled then the {@code flush} method will be
* invoked. * invoked.
* *
* <p> Note that the byte is written as given; to write a character that * <p> Note that the byte is written as given; to write a character that
* will be translated according to the platform's default character * will be translated according to the platform's default character
* encoding, use the <code>print(char)</code> or <code>println(char)</code> * encoding, use the {@code print(char)} or {@code println(char)}
* methods. * methods.
* *
* @param b The byte to be written * @param b The byte to be written
@ -460,13 +460,13 @@ public class PrintStream extends FilterOutputStream
} }
/** /**
* Writes <code>len</code> bytes from the specified byte array starting at * Writes {@code len} bytes from the specified byte array starting at
* offset <code>off</code> to this stream. If automatic flushing is * offset {@code off} to this stream. If automatic flushing is
* enabled then the <code>flush</code> method will be invoked. * enabled then the {@code flush} method will be invoked.
* *
* <p> Note that the bytes will be written as given; to write characters * <p> Note that the bytes will be written as given; to write characters
* that will be translated according to the platform's default character * that will be translated according to the platform's default character
* encoding, use the <code>print(char)</code> or <code>println(char)</code> * encoding, use the {@code print(char)} or {@code println(char)}
* methods. * methods.
* *
* @param buf A byte array * @param buf A byte array
@ -559,13 +559,13 @@ public class PrintStream extends FilterOutputStream
/* Methods that do not terminate lines */ /* Methods that do not terminate lines */
/** /**
* Prints a boolean value. The string produced by <code>{@link * Prints a boolean value. The string produced by {@link
* java.lang.String#valueOf(boolean)}</code> is translated into bytes * java.lang.String#valueOf(boolean)} is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the * are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param b The <code>boolean</code> to be printed * @param b The {@code boolean} to be printed
*/ */
public void print(boolean b) { public void print(boolean b) {
write(b ? "true" : "false"); write(b ? "true" : "false");
@ -575,22 +575,22 @@ public class PrintStream extends FilterOutputStream
* Prints a character. The character is translated into one or more bytes * Prints a character. The character is translated into one or more bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the * are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param c The <code>char</code> to be printed * @param c The {@code char} to be printed
*/ */
public void print(char c) { public void print(char c) {
write(String.valueOf(c)); write(String.valueOf(c));
} }
/** /**
* Prints an integer. The string produced by <code>{@link * Prints an integer. The string produced by {@link
* java.lang.String#valueOf(int)}</code> is translated into bytes * java.lang.String#valueOf(int)} is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the * are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param i The <code>int</code> to be printed * @param i The {@code int} to be printed
* @see java.lang.Integer#toString(int) * @see java.lang.Integer#toString(int)
*/ */
public void print(int i) { public void print(int i) {
@ -598,13 +598,13 @@ public class PrintStream extends FilterOutputStream
} }
/** /**
* Prints a long integer. The string produced by <code>{@link * Prints a long integer. The string produced by {@link
* java.lang.String#valueOf(long)}</code> is translated into bytes * java.lang.String#valueOf(long)} is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the * are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param l The <code>long</code> to be printed * @param l The {@code long} to be printed
* @see java.lang.Long#toString(long) * @see java.lang.Long#toString(long)
*/ */
public void print(long l) { public void print(long l) {
@ -612,13 +612,13 @@ public class PrintStream extends FilterOutputStream
} }
/** /**
* Prints a floating-point number. The string produced by <code>{@link * Prints a floating-point number. The string produced by {@link
* java.lang.String#valueOf(float)}</code> is translated into bytes * java.lang.String#valueOf(float)} is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the * are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param f The <code>float</code> to be printed * @param f The {@code float} to be printed
* @see java.lang.Float#toString(float) * @see java.lang.Float#toString(float)
*/ */
public void print(float f) { public void print(float f) {
@ -627,12 +627,12 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints a double-precision floating-point number. The string produced by * Prints a double-precision floating-point number. The string produced by
* <code>{@link java.lang.String#valueOf(double)}</code> is translated into * {@link java.lang.String#valueOf(double)} is translated into
* bytes according to the platform's default character encoding, and these * bytes according to the platform's default character encoding, and these
* bytes are written in exactly the manner of the <code>{@link * bytes are written in exactly the manner of the {@link
* #write(int)}</code> method. * #write(int)} method.
* *
* @param d The <code>double</code> to be printed * @param d The {@code double} to be printed
* @see java.lang.Double#toString(double) * @see java.lang.Double#toString(double)
*/ */
public void print(double d) { public void print(double d) {
@ -643,24 +643,24 @@ public class PrintStream extends FilterOutputStream
* Prints an array of characters. The characters are converted into bytes * Prints an array of characters. The characters are converted into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the * are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param s The array of chars to be printed * @param s The array of chars to be printed
* *
* @throws NullPointerException If <code>s</code> is <code>null</code> * @throws NullPointerException If {@code s} is {@code null}
*/ */
public void print(char s[]) { public void print(char s[]) {
write(s); write(s);
} }
/** /**
* Prints a string. If the argument is <code>null</code> then the string * Prints a string. If the argument is {@code null} then the string
* <code>"null"</code> is printed. Otherwise, the string's characters are * {@code "null"} is printed. Otherwise, the string's characters are
* converted into bytes according to the platform's default character * converted into bytes according to the platform's default character
* encoding, and these bytes are written in exactly the manner of the * encoding, and these bytes are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param s The <code>String</code> to be printed * @param s The {@code String} to be printed
*/ */
public void print(String s) { public void print(String s) {
if (s == null) { if (s == null) {
@ -670,13 +670,13 @@ public class PrintStream extends FilterOutputStream
} }
/** /**
* Prints an object. The string produced by the <code>{@link * Prints an object. The string produced by the {@link
* java.lang.String#valueOf(Object)}</code> method is translated into bytes * java.lang.String#valueOf(Object)} method is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the * are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param obj The <code>Object</code> to be printed * @param obj The {@code Object} to be printed
* @see java.lang.Object#toString() * @see java.lang.Object#toString()
*/ */
public void print(Object obj) { public void print(Object obj) {
@ -689,8 +689,8 @@ public class PrintStream extends FilterOutputStream
/** /**
* Terminates the current line by writing the line separator string. The * Terminates the current line by writing the line separator string. The
* line separator string is defined by the system property * line separator string is defined by the system property
* <code>line.separator</code>, and is not necessarily a single newline * {@code line.separator}, and is not necessarily a single newline
* character (<code>'\n'</code>). * character ({@code '\n'}).
*/ */
public void println() { public void println() {
newLine(); newLine();
@ -698,10 +698,10 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints a boolean and then terminate the line. This method behaves as * Prints a boolean and then terminate the line. This method behaves as
* though it invokes <code>{@link #print(boolean)}</code> and then * though it invokes {@link #print(boolean)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x The <code>boolean</code> to be printed * @param x The {@code boolean} to be printed
*/ */
public void println(boolean x) { public void println(boolean x) {
synchronized (this) { synchronized (this) {
@ -712,10 +712,10 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints a character and then terminate the line. This method behaves as * Prints a character and then terminate the line. This method behaves as
* though it invokes <code>{@link #print(char)}</code> and then * though it invokes {@link #print(char)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x The <code>char</code> to be printed. * @param x The {@code char} to be printed.
*/ */
public void println(char x) { public void println(char x) {
synchronized (this) { synchronized (this) {
@ -726,10 +726,10 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints an integer and then terminate the line. This method behaves as * Prints an integer and then terminate the line. This method behaves as
* though it invokes <code>{@link #print(int)}</code> and then * though it invokes {@link #print(int)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x The <code>int</code> to be printed. * @param x The {@code int} to be printed.
*/ */
public void println(int x) { public void println(int x) {
synchronized (this) { synchronized (this) {
@ -740,10 +740,10 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints a long and then terminate the line. This method behaves as * Prints a long and then terminate the line. This method behaves as
* though it invokes <code>{@link #print(long)}</code> and then * though it invokes {@link #print(long)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x a The <code>long</code> to be printed. * @param x a The {@code long} to be printed.
*/ */
public void println(long x) { public void println(long x) {
synchronized (this) { synchronized (this) {
@ -754,10 +754,10 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints a float and then terminate the line. This method behaves as * Prints a float and then terminate the line. This method behaves as
* though it invokes <code>{@link #print(float)}</code> and then * though it invokes {@link #print(float)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x The <code>float</code> to be printed. * @param x The {@code float} to be printed.
*/ */
public void println(float x) { public void println(float x) {
synchronized (this) { synchronized (this) {
@ -768,10 +768,10 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints a double and then terminate the line. This method behaves as * Prints a double and then terminate the line. This method behaves as
* though it invokes <code>{@link #print(double)}</code> and then * though it invokes {@link #print(double)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x The <code>double</code> to be printed. * @param x The {@code double} to be printed.
*/ */
public void println(double x) { public void println(double x) {
synchronized (this) { synchronized (this) {
@ -782,8 +782,8 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints an array of characters and then terminate the line. This method * Prints an array of characters and then terminate the line. This method
* behaves as though it invokes <code>{@link #print(char[])}</code> and * behaves as though it invokes {@link #print(char[])} and
* then <code>{@link #println()}</code>. * then {@link #println()}.
* *
* @param x an array of chars to print. * @param x an array of chars to print.
*/ */
@ -796,10 +796,10 @@ public class PrintStream extends FilterOutputStream
/** /**
* Prints a String and then terminate the line. This method behaves as * Prints a String and then terminate the line. This method behaves as
* though it invokes <code>{@link #print(String)}</code> and then * though it invokes {@link #print(String)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x The <code>String</code> to be printed. * @param x The {@code String} to be printed.
*/ */
public void println(String x) { public void println(String x) {
synchronized (this) { synchronized (this) {
@ -812,10 +812,10 @@ public class PrintStream extends FilterOutputStream
* Prints an Object and then terminate the line. This method calls * Prints an Object and then terminate the line. This method calls
* at first String.valueOf(x) to get the printed object's string value, * at first String.valueOf(x) to get the printed object's string value,
* then behaves as * then behaves as
* though it invokes <code>{@link #print(String)}</code> and then * though it invokes {@link #print(String)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x The <code>Object</code> to be printed. * @param x The {@code Object} to be printed.
*/ */
public void println(Object x) { public void println(Object x) {
String s = String.valueOf(x); String s = String.valueOf(x);
@ -830,11 +830,13 @@ public class PrintStream extends FilterOutputStream
* A convenience method to write a formatted string to this output stream * A convenience method to write a formatted string to this output stream
* using the specified format string and arguments. * using the specified format string and arguments.
* *
* <p> An invocation of this method of the form <tt>out.printf(format, * <p> An invocation of this method of the form
* args)</tt> behaves in exactly the same way as the invocation * {@code out.printf(format, args)} behaves
* in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.format(format, args) </pre> * out.format(format, args)
* }</pre>
* *
* @param format * @param format
* A format string as described in <a * A format string as described in <a
@ -848,7 +850,7 @@ public class PrintStream extends FilterOutputStream
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws java.util.IllegalFormatException * @throws java.util.IllegalFormatException
@ -861,7 +863,7 @@ public class PrintStream extends FilterOutputStream
* formatter class specification. * formatter class specification.
* *
* @throws NullPointerException * @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt> * If the {@code format} is {@code null}
* *
* @return This output stream * @return This output stream
* *
@ -875,15 +877,17 @@ public class PrintStream extends FilterOutputStream
* A convenience method to write a formatted string to this output stream * A convenience method to write a formatted string to this output stream
* using the specified format string and arguments. * using the specified format string and arguments.
* *
* <p> An invocation of this method of the form <tt>out.printf(l, format, * <p> An invocation of this method of the form
* args)</tt> behaves in exactly the same way as the invocation * {@code out.printf(l, format, args)} behaves
* in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.format(l, format, args) </pre> * out.format(l, format, args)
* }</pre>
* *
* @param l * @param l
* The {@linkplain java.util.Locale locale} to apply during * The {@linkplain java.util.Locale locale} to apply during
* formatting. If <tt>l</tt> is <tt>null</tt> then no localization * formatting. If {@code l} is {@code null} then no localization
* is applied. * is applied.
* *
* @param format * @param format
@ -898,7 +902,7 @@ public class PrintStream extends FilterOutputStream
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws java.util.IllegalFormatException * @throws java.util.IllegalFormatException
@ -911,7 +915,7 @@ public class PrintStream extends FilterOutputStream
* formatter class specification. * formatter class specification.
* *
* @throws NullPointerException * @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt> * If the {@code format} is {@code null}
* *
* @return This output stream * @return This output stream
* *
@ -941,7 +945,7 @@ public class PrintStream extends FilterOutputStream
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws java.util.IllegalFormatException * @throws java.util.IllegalFormatException
@ -954,7 +958,7 @@ public class PrintStream extends FilterOutputStream
* formatter class specification. * formatter class specification.
* *
* @throws NullPointerException * @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt> * If the {@code format} is {@code null}
* *
* @return This output stream * @return This output stream
* *
@ -983,7 +987,7 @@ public class PrintStream extends FilterOutputStream
* *
* @param l * @param l
* The {@linkplain java.util.Locale locale} to apply during * The {@linkplain java.util.Locale locale} to apply during
* formatting. If <tt>l</tt> is <tt>null</tt> then no localization * formatting. If {@code l} is {@code null} then no localization
* is applied. * is applied.
* *
* @param format * @param format
@ -998,7 +1002,7 @@ public class PrintStream extends FilterOutputStream
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws java.util.IllegalFormatException * @throws java.util.IllegalFormatException
@ -1011,7 +1015,7 @@ public class PrintStream extends FilterOutputStream
* formatter class specification. * formatter class specification.
* *
* @throws NullPointerException * @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt> * If the {@code format} is {@code null}
* *
* @return This output stream * @return This output stream
* *
@ -1037,21 +1041,22 @@ public class PrintStream extends FilterOutputStream
/** /**
* Appends the specified character sequence to this output stream. * Appends the specified character sequence to this output stream.
* *
* <p> An invocation of this method of the form <tt>out.append(csq)</tt> * <p> An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.print(csq.toString()) </pre> * out.print(csq.toString())
* }</pre>
* *
* <p> Depending on the specification of <tt>toString</tt> for the * <p> Depending on the specification of {@code toString} for the
* character sequence <tt>csq</tt>, the entire sequence may not be * character sequence {@code csq}, the entire sequence may not be
* appended. For instance, invoking then <tt>toString</tt> method of a * appended. For instance, invoking then {@code toString} method of a
* character buffer will return a subsequence whose content depends upon * character buffer will return a subsequence whose content depends upon
* the buffer's position and limit. * the buffer's position and limit.
* *
* @param csq * @param csq
* The character sequence to append. If <tt>csq</tt> is * The character sequence to append. If {@code csq} is
* <tt>null</tt>, then the four characters <tt>"null"</tt> are * {@code null}, then the four characters {@code "null"} are
* appended to this output stream. * appended to this output stream.
* *
* @return This output stream * @return This output stream
@ -1070,18 +1075,20 @@ public class PrintStream extends FilterOutputStream
* Appends a subsequence of the specified character sequence to this output * Appends a subsequence of the specified character sequence to this output
* stream. * stream.
* *
* <p> An invocation of this method of the form <tt>out.append(csq, start, * <p> An invocation of this method of the form
* end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in * {@code out.append(csq, start, end)} when
* {@code csq} is not {@code null}, behaves in
* exactly the same way as the invocation * exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.print(csq.subSequence(start, end).toString()) </pre> * out.print(csq.subSequence(start, end).toString())
* }</pre>
* *
* @param csq * @param csq
* The character sequence from which a subsequence will be * The character sequence from which a subsequence will be
* appended. If <tt>csq</tt> is <tt>null</tt>, then characters * appended. If {@code csq} is {@code null}, then characters
* will be appended as if <tt>csq</tt> contained the four * will be appended as if {@code csq} contained the four
* characters <tt>"null"</tt>. * characters {@code "null"}.
* *
* @param start * @param start
* The index of the first character in the subsequence * The index of the first character in the subsequence
@ -1093,9 +1100,9 @@ public class PrintStream extends FilterOutputStream
* @return This output stream * @return This output stream
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> * If {@code start} or {@code end} are negative, {@code start}
* is greater than <tt>end</tt>, or <tt>end</tt> is greater than * is greater than {@code end}, or {@code end} is greater than
* <tt>csq.length()</tt> * {@code csq.length()}
* *
* @since 1.5 * @since 1.5
*/ */
@ -1108,11 +1115,12 @@ public class PrintStream extends FilterOutputStream
/** /**
* Appends the specified character to this output stream. * Appends the specified character to this output stream.
* *
* <p> An invocation of this method of the form <tt>out.append(c)</tt> * <p> An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.print(c) </pre> * out.print(c)
* }</pre>
* *
* @param c * @param c
* The 16-bit character to append * The 16-bit character to append

View file

@ -34,13 +34,13 @@ import java.nio.charset.UnsupportedCharsetException;
/** /**
* Prints formatted representations of objects to a text-output stream. This * Prints formatted representations of objects to a text-output stream. This
* class implements all of the <tt>print</tt> methods found in {@link * class implements all of the {@code print} methods found in {@link
* PrintStream}. It does not contain methods for writing raw bytes, for which * PrintStream}. It does not contain methods for writing raw bytes, for which
* a program should use unencoded byte streams. * a program should use unencoded byte streams.
* *
* <p> Unlike the {@link PrintStream} class, if automatic flushing is enabled * <p> Unlike the {@link PrintStream} class, if automatic flushing is enabled
* it will be done only when one of the <tt>println</tt>, <tt>printf</tt>, or * it will be done only when one of the {@code println}, {@code printf}, or
* <tt>format</tt> methods is invoked, rather than whenever a newline character * {@code format} methods is invoked, rather than whenever a newline character
* happens to be output. These methods use the platform's own notion of line * happens to be output. These methods use the platform's own notion of line
* separator rather than the newline character. * separator rather than the newline character.
* *
@ -57,7 +57,7 @@ public class PrintWriter extends Writer {
/** /**
* The underlying character-output stream of this * The underlying character-output stream of this
* <code>PrintWriter</code>. * {@code PrintWriter}.
* *
* @since 1.2 * @since 1.2
*/ */
@ -98,8 +98,8 @@ public class PrintWriter extends Writer {
* Creates a new PrintWriter. * Creates a new PrintWriter.
* *
* @param out A character-output stream * @param out A character-output stream
* @param autoFlush A boolean; if true, the <tt>println</tt>, * @param autoFlush A boolean; if true, the {@code println},
* <tt>printf</tt>, or <tt>format</tt> methods will * {@code printf}, or {@code format} methods will
* flush the output buffer * flush the output buffer
*/ */
public PrintWriter(Writer out, public PrintWriter(Writer out,
@ -130,8 +130,8 @@ public class PrintWriter extends Writer {
* default character encoding. * default character encoding.
* *
* @param out An output stream * @param out An output stream
* @param autoFlush A boolean; if true, the <tt>println</tt>, * @param autoFlush A boolean; if true, the {@code println},
* <tt>printf</tt>, or <tt>format</tt> methods will * {@code printf}, or {@code format} methods will
* flush the output buffer * flush the output buffer
* *
* @see java.io.OutputStreamWriter#OutputStreamWriter(java.io.OutputStream) * @see java.io.OutputStreamWriter#OutputStreamWriter(java.io.OutputStream)
@ -340,7 +340,7 @@ public class PrintWriter extends Writer {
/** /**
* Flushes the stream if it's not closed and checks its error state. * Flushes the stream if it's not closed and checks its error state.
* *
* @return <code>true</code> if the print stream has encountered an error, * @return {@code true} if the print stream has encountered an error,
* either on the underlying output stream or during a format * either on the underlying output stream or during a format
* conversion. * conversion.
*/ */
@ -361,7 +361,7 @@ public class PrintWriter extends Writer {
* Indicates that an error has occurred. * Indicates that an error has occurred.
* *
* <p> This method will cause subsequent invocations of {@link * <p> This method will cause subsequent invocations of {@link
* #checkError()} to return <tt>true</tt> until {@link * #checkError()} to return {@code true} until {@link
* #clearError()} is invoked. * #clearError()} is invoked.
*/ */
protected void setError() { protected void setError() {
@ -372,7 +372,7 @@ public class PrintWriter extends Writer {
* Clears the error state of this stream. * Clears the error state of this stream.
* *
* <p> This method will cause subsequent invocations of {@link * <p> This method will cause subsequent invocations of {@link
* #checkError()} to return <tt>false</tt> until another write * #checkError()} to return {@code false} until another write
* operation fails and invokes {@link #setError()}. * operation fails and invokes {@link #setError()}.
* *
* @since 1.6 * @since 1.6
@ -485,13 +485,13 @@ public class PrintWriter extends Writer {
/* Methods that do not terminate lines */ /* Methods that do not terminate lines */
/** /**
* Prints a boolean value. The string produced by <code>{@link * Prints a boolean value. The string produced by {@link
* java.lang.String#valueOf(boolean)}</code> is translated into bytes * java.lang.String#valueOf(boolean)} is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the <code>{@link * are written in exactly the manner of the {@link
* #write(int)}</code> method. * #write(int)} method.
* *
* @param b The <code>boolean</code> to be printed * @param b The {@code boolean} to be printed
*/ */
public void print(boolean b) { public void print(boolean b) {
write(b ? "true" : "false"); write(b ? "true" : "false");
@ -500,23 +500,23 @@ public class PrintWriter extends Writer {
/** /**
* Prints a character. The character is translated into one or more bytes * Prints a character. The character is translated into one or more bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the <code>{@link * are written in exactly the manner of the {@link
* #write(int)}</code> method. * #write(int)} method.
* *
* @param c The <code>char</code> to be printed * @param c The {@code char} to be printed
*/ */
public void print(char c) { public void print(char c) {
write(c); write(c);
} }
/** /**
* Prints an integer. The string produced by <code>{@link * Prints an integer. The string produced by {@link
* java.lang.String#valueOf(int)}</code> is translated into bytes according * java.lang.String#valueOf(int)} is translated into bytes according
* to the platform's default character encoding, and these bytes are * to the platform's default character encoding, and these bytes are
* written in exactly the manner of the <code>{@link #write(int)}</code> * written in exactly the manner of the {@link #write(int)}
* method. * method.
* *
* @param i The <code>int</code> to be printed * @param i The {@code int} to be printed
* @see java.lang.Integer#toString(int) * @see java.lang.Integer#toString(int)
*/ */
public void print(int i) { public void print(int i) {
@ -524,13 +524,13 @@ public class PrintWriter extends Writer {
} }
/** /**
* Prints a long integer. The string produced by <code>{@link * Prints a long integer. The string produced by {@link
* java.lang.String#valueOf(long)}</code> is translated into bytes * java.lang.String#valueOf(long)} is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the <code>{@link #write(int)}</code> * are written in exactly the manner of the {@link #write(int)}
* method. * method.
* *
* @param l The <code>long</code> to be printed * @param l The {@code long} to be printed
* @see java.lang.Long#toString(long) * @see java.lang.Long#toString(long)
*/ */
public void print(long l) { public void print(long l) {
@ -538,13 +538,13 @@ public class PrintWriter extends Writer {
} }
/** /**
* Prints a floating-point number. The string produced by <code>{@link * Prints a floating-point number. The string produced by {@link
* java.lang.String#valueOf(float)}</code> is translated into bytes * java.lang.String#valueOf(float)} is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the <code>{@link #write(int)}</code> * are written in exactly the manner of the {@link #write(int)}
* method. * method.
* *
* @param f The <code>float</code> to be printed * @param f The {@code float} to be printed
* @see java.lang.Float#toString(float) * @see java.lang.Float#toString(float)
*/ */
public void print(float f) { public void print(float f) {
@ -553,12 +553,12 @@ public class PrintWriter extends Writer {
/** /**
* Prints a double-precision floating-point number. The string produced by * Prints a double-precision floating-point number. The string produced by
* <code>{@link java.lang.String#valueOf(double)}</code> is translated into * {@link java.lang.String#valueOf(double)} is translated into
* bytes according to the platform's default character encoding, and these * bytes according to the platform's default character encoding, and these
* bytes are written in exactly the manner of the <code>{@link * bytes are written in exactly the manner of the {@link
* #write(int)}</code> method. * #write(int)} method.
* *
* @param d The <code>double</code> to be printed * @param d The {@code double} to be printed
* @see java.lang.Double#toString(double) * @see java.lang.Double#toString(double)
*/ */
public void print(double d) { public void print(double d) {
@ -568,25 +568,25 @@ public class PrintWriter extends Writer {
/** /**
* Prints an array of characters. The characters are converted into bytes * Prints an array of characters. The characters are converted into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the <code>{@link #write(int)}</code> * are written in exactly the manner of the {@link #write(int)}
* method. * method.
* *
* @param s The array of chars to be printed * @param s The array of chars to be printed
* *
* @throws NullPointerException If <code>s</code> is <code>null</code> * @throws NullPointerException If {@code s} is {@code null}
*/ */
public void print(char s[]) { public void print(char s[]) {
write(s); write(s);
} }
/** /**
* Prints a string. If the argument is <code>null</code> then the string * Prints a string. If the argument is {@code null} then the string
* <code>"null"</code> is printed. Otherwise, the string's characters are * {@code "null"} is printed. Otherwise, the string's characters are
* converted into bytes according to the platform's default character * converted into bytes according to the platform's default character
* encoding, and these bytes are written in exactly the manner of the * encoding, and these bytes are written in exactly the manner of the
* <code>{@link #write(int)}</code> method. * {@link #write(int)} method.
* *
* @param s The <code>String</code> to be printed * @param s The {@code String} to be printed
*/ */
public void print(String s) { public void print(String s) {
if (s == null) { if (s == null) {
@ -596,13 +596,13 @@ public class PrintWriter extends Writer {
} }
/** /**
* Prints an object. The string produced by the <code>{@link * Prints an object. The string produced by the {@link
* java.lang.String#valueOf(Object)}</code> method is translated into bytes * java.lang.String#valueOf(Object)} method is translated into bytes
* according to the platform's default character encoding, and these bytes * according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the <code>{@link #write(int)}</code> * are written in exactly the manner of the {@link #write(int)}
* method. * method.
* *
* @param obj The <code>Object</code> to be printed * @param obj The {@code Object} to be printed
* @see java.lang.Object#toString() * @see java.lang.Object#toString()
*/ */
public void print(Object obj) { public void print(Object obj) {
@ -614,8 +614,8 @@ public class PrintWriter extends Writer {
/** /**
* Terminates the current line by writing the line separator string. The * Terminates the current line by writing the line separator string. The
* line separator string is defined by the system property * line separator string is defined by the system property
* <code>line.separator</code>, and is not necessarily a single newline * {@code line.separator}, and is not necessarily a single newline
* character (<code>'\n'</code>). * character ({@code '\n'}).
*/ */
public void println() { public void println() {
newLine(); newLine();
@ -623,10 +623,10 @@ public class PrintWriter extends Writer {
/** /**
* Prints a boolean value and then terminates the line. This method behaves * Prints a boolean value and then terminates the line. This method behaves
* as though it invokes <code>{@link #print(boolean)}</code> and then * as though it invokes {@link #print(boolean)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x the <code>boolean</code> value to be printed * @param x the {@code boolean} value to be printed
*/ */
public void println(boolean x) { public void println(boolean x) {
synchronized (lock) { synchronized (lock) {
@ -637,10 +637,10 @@ public class PrintWriter extends Writer {
/** /**
* Prints a character and then terminates the line. This method behaves as * Prints a character and then terminates the line. This method behaves as
* though it invokes <code>{@link #print(char)}</code> and then <code>{@link * though it invokes {@link #print(char)} and then {@link
* #println()}</code>. * #println()}.
* *
* @param x the <code>char</code> value to be printed * @param x the {@code char} value to be printed
*/ */
public void println(char x) { public void println(char x) {
synchronized (lock) { synchronized (lock) {
@ -651,10 +651,10 @@ public class PrintWriter extends Writer {
/** /**
* Prints an integer and then terminates the line. This method behaves as * Prints an integer and then terminates the line. This method behaves as
* though it invokes <code>{@link #print(int)}</code> and then <code>{@link * though it invokes {@link #print(int)} and then {@link
* #println()}</code>. * #println()}.
* *
* @param x the <code>int</code> value to be printed * @param x the {@code int} value to be printed
*/ */
public void println(int x) { public void println(int x) {
synchronized (lock) { synchronized (lock) {
@ -665,10 +665,10 @@ public class PrintWriter extends Writer {
/** /**
* Prints a long integer and then terminates the line. This method behaves * Prints a long integer and then terminates the line. This method behaves
* as though it invokes <code>{@link #print(long)}</code> and then * as though it invokes {@link #print(long)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x the <code>long</code> value to be printed * @param x the {@code long} value to be printed
*/ */
public void println(long x) { public void println(long x) {
synchronized (lock) { synchronized (lock) {
@ -679,10 +679,10 @@ public class PrintWriter extends Writer {
/** /**
* Prints a floating-point number and then terminates the line. This method * Prints a floating-point number and then terminates the line. This method
* behaves as though it invokes <code>{@link #print(float)}</code> and then * behaves as though it invokes {@link #print(float)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x the <code>float</code> value to be printed * @param x the {@code float} value to be printed
*/ */
public void println(float x) { public void println(float x) {
synchronized (lock) { synchronized (lock) {
@ -693,10 +693,10 @@ public class PrintWriter extends Writer {
/** /**
* Prints a double-precision floating-point number and then terminates the * Prints a double-precision floating-point number and then terminates the
* line. This method behaves as though it invokes <code>{@link * line. This method behaves as though it invokes {@link
* #print(double)}</code> and then <code>{@link #println()}</code>. * #print(double)} and then {@link #println()}.
* *
* @param x the <code>double</code> value to be printed * @param x the {@code double} value to be printed
*/ */
public void println(double x) { public void println(double x) {
synchronized (lock) { synchronized (lock) {
@ -707,10 +707,10 @@ public class PrintWriter extends Writer {
/** /**
* Prints an array of characters and then terminates the line. This method * Prints an array of characters and then terminates the line. This method
* behaves as though it invokes <code>{@link #print(char[])}</code> and then * behaves as though it invokes {@link #print(char[])} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x the array of <code>char</code> values to be printed * @param x the array of {@code char} values to be printed
*/ */
public void println(char x[]) { public void println(char x[]) {
synchronized (lock) { synchronized (lock) {
@ -721,10 +721,10 @@ public class PrintWriter extends Writer {
/** /**
* Prints a String and then terminates the line. This method behaves as * Prints a String and then terminates the line. This method behaves as
* though it invokes <code>{@link #print(String)}</code> and then * though it invokes {@link #print(String)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x the <code>String</code> value to be printed * @param x the {@code String} value to be printed
*/ */
public void println(String x) { public void println(String x) {
synchronized (lock) { synchronized (lock) {
@ -737,10 +737,10 @@ public class PrintWriter extends Writer {
* Prints an Object and then terminates the line. This method calls * Prints an Object and then terminates the line. This method calls
* at first String.valueOf(x) to get the printed object's string value, * at first String.valueOf(x) to get the printed object's string value,
* then behaves as * then behaves as
* though it invokes <code>{@link #print(String)}</code> and then * though it invokes {@link #print(String)} and then
* <code>{@link #println()}</code>. * {@link #println()}.
* *
* @param x The <code>Object</code> to be printed. * @param x The {@code Object} to be printed.
*/ */
public void println(Object x) { public void println(Object x) {
String s = String.valueOf(x); String s = String.valueOf(x);
@ -755,11 +755,13 @@ public class PrintWriter extends Writer {
* the specified format string and arguments. If automatic flushing is * the specified format string and arguments. If automatic flushing is
* enabled, calls to this method will flush the output buffer. * enabled, calls to this method will flush the output buffer.
* *
* <p> An invocation of this method of the form <tt>out.printf(format, * <p> An invocation of this method of the form
* args)</tt> behaves in exactly the same way as the invocation * {@code out.printf(format, args)}
* behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.format(format, args) </pre> * out.format(format, args)
* }</pre>
* *
* @param format * @param format
* A format string as described in <a * A format string as described in <a
@ -773,7 +775,7 @@ public class PrintWriter extends Writer {
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws java.util.IllegalFormatException * @throws java.util.IllegalFormatException
@ -786,7 +788,7 @@ public class PrintWriter extends Writer {
* formatter class specification. * formatter class specification.
* *
* @throws NullPointerException * @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt> * If the {@code format} is {@code null}
* *
* @return This writer * @return This writer
* *
@ -801,15 +803,17 @@ public class PrintWriter extends Writer {
* the specified format string and arguments. If automatic flushing is * the specified format string and arguments. If automatic flushing is
* enabled, calls to this method will flush the output buffer. * enabled, calls to this method will flush the output buffer.
* *
* <p> An invocation of this method of the form <tt>out.printf(l, format, * <p> An invocation of this method of the form
* args)</tt> behaves in exactly the same way as the invocation * {@code out.printf(l, format, args)}
* behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.format(l, format, args) </pre> * out.format(l, format, args)
* }</pre>
* *
* @param l * @param l
* The {@linkplain java.util.Locale locale} to apply during * The {@linkplain java.util.Locale locale} to apply during
* formatting. If <tt>l</tt> is <tt>null</tt> then no localization * formatting. If {@code l} is {@code null} then no localization
* is applied. * is applied.
* *
* @param format * @param format
@ -824,7 +828,7 @@ public class PrintWriter extends Writer {
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws java.util.IllegalFormatException * @throws java.util.IllegalFormatException
@ -837,7 +841,7 @@ public class PrintWriter extends Writer {
* formatter class specification. * formatter class specification.
* *
* @throws NullPointerException * @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt> * If the {@code format} is {@code null}
* *
* @return This writer * @return This writer
* *
@ -868,7 +872,7 @@ public class PrintWriter extends Writer {
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws java.util.IllegalFormatException * @throws java.util.IllegalFormatException
@ -881,7 +885,7 @@ public class PrintWriter extends Writer {
* Formatter class specification. * Formatter class specification.
* *
* @throws NullPointerException * @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt> * If the {@code format} is {@code null}
* *
* @return This writer * @return This writer
* *
@ -913,7 +917,7 @@ public class PrintWriter extends Writer {
* *
* @param l * @param l
* The {@linkplain java.util.Locale locale} to apply during * The {@linkplain java.util.Locale locale} to apply during
* formatting. If <tt>l</tt> is <tt>null</tt> then no localization * formatting. If {@code l} is {@code null} then no localization
* is applied. * is applied.
* *
* @param format * @param format
@ -928,7 +932,7 @@ public class PrintWriter extends Writer {
* limited by the maximum dimension of a Java array as defined by * limited by the maximum dimension of a Java array as defined by
* <cite>The Java&trade; Virtual Machine Specification</cite>. * <cite>The Java&trade; Virtual Machine Specification</cite>.
* The behaviour on a * The behaviour on a
* <tt>null</tt> argument depends on the <a * {@code null} argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws java.util.IllegalFormatException * @throws java.util.IllegalFormatException
@ -941,7 +945,7 @@ public class PrintWriter extends Writer {
* formatter class specification. * formatter class specification.
* *
* @throws NullPointerException * @throws NullPointerException
* If the <tt>format</tt> is <tt>null</tt> * If the {@code format} is {@code null}
* *
* @return This writer * @return This writer
* *
@ -968,21 +972,22 @@ public class PrintWriter extends Writer {
/** /**
* Appends the specified character sequence to this writer. * Appends the specified character sequence to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(csq)</tt> * <p> An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.write(csq.toString()) </pre> * out.write(csq.toString())
* }</pre>
* *
* <p> Depending on the specification of <tt>toString</tt> for the * <p> Depending on the specification of {@code toString} for the
* character sequence <tt>csq</tt>, the entire sequence may not be * character sequence {@code csq}, the entire sequence may not be
* appended. For instance, invoking the <tt>toString</tt> method of a * appended. For instance, invoking the {@code toString} method of a
* character buffer will return a subsequence whose content depends upon * character buffer will return a subsequence whose content depends upon
* the buffer's position and limit. * the buffer's position and limit.
* *
* @param csq * @param csq
* The character sequence to append. If <tt>csq</tt> is * The character sequence to append. If {@code csq} is
* <tt>null</tt>, then the four characters <tt>"null"</tt> are * {@code null}, then the four characters {@code "null"} are
* appended to this writer. * appended to this writer.
* *
* @return This writer * @return This writer
@ -1000,18 +1005,20 @@ public class PrintWriter extends Writer {
/** /**
* Appends a subsequence of the specified character sequence to this writer. * Appends a subsequence of the specified character sequence to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(csq, start, * <p> An invocation of this method of the form
* end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in * {@code out.append(csq, start, end)}
* when {@code csq} is not {@code null}, behaves in
* exactly the same way as the invocation * exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.write(csq.subSequence(start, end).toString()) </pre> * out.write(csq.subSequence(start, end).toString())
* }</pre>
* *
* @param csq * @param csq
* The character sequence from which a subsequence will be * The character sequence from which a subsequence will be
* appended. If <tt>csq</tt> is <tt>null</tt>, then characters * appended. If {@code csq} is {@code null}, then characters
* will be appended as if <tt>csq</tt> contained the four * will be appended as if {@code csq} contained the four
* characters <tt>"null"</tt>. * characters {@code "null"}.
* *
* @param start * @param start
* The index of the first character in the subsequence * The index of the first character in the subsequence
@ -1023,9 +1030,9 @@ public class PrintWriter extends Writer {
* @return This writer * @return This writer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> * If {@code start} or {@code end} are negative, {@code start}
* is greater than <tt>end</tt>, or <tt>end</tt> is greater than * is greater than {@code end}, or {@code end} is greater than
* <tt>csq.length()</tt> * {@code csq.length()}
* *
* @since 1.5 * @since 1.5
*/ */
@ -1038,11 +1045,12 @@ public class PrintWriter extends Writer {
/** /**
* Appends the specified character to this writer. * Appends the specified character to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(c)</tt> * <p> An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.write(c) </pre> * out.write(c)
* }</pre>
* *
* @param c * @param c
* The 16-bit character to append * The 16-bit character to append

View file

@ -82,10 +82,10 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* {@link FileDescriptor} object is created to represent the * {@link FileDescriptor} object is created to represent the
* connection to the file. * connection to the file.
* *
* <p> The <tt>mode</tt> argument specifies the access mode with which the * <p> The {@code mode} argument specifies the access mode with which the
* file is to be opened. The permitted values and their meanings are as * file is to be opened. The permitted values and their meanings are as
* specified for the <a * specified for the <a
* href="#mode"><tt>RandomAccessFile(File,String)</tt></a> constructor. * href="#mode">{@code RandomAccessFile(File,String)}</a> constructor.
* *
* <p> * <p>
* If there is a security manager, its {@code checkRead} method * If there is a security manager, its {@code checkRead} method
@ -99,19 +99,19 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @param name the system-dependent filename * @param name the system-dependent filename
* @param mode the access <a href="#mode">mode</a> * @param mode the access <a href="#mode">mode</a>
* @exception IllegalArgumentException if the mode argument is not equal * @exception IllegalArgumentException if the mode argument is not equal
* to one of <tt>"r"</tt>, <tt>"rw"</tt>, <tt>"rws"</tt>, or * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or
* <tt>"rwd"</tt> * {@code "rwd"}
* @exception FileNotFoundException * @exception FileNotFoundException
* if the mode is <tt>"r"</tt> but the given string does not * if the mode is {@code "r"} but the given string does not
* denote an existing regular file, or if the mode begins with * denote an existing regular file, or if the mode begins with
* <tt>"rw"</tt> but the given string does not denote an * {@code "rw"} but the given string does not denote an
* existing, writable regular file and a new regular file of * existing, writable regular file and a new regular file of
* that name cannot be created, or if some other error occurs * that name cannot be created, or if some other error occurs
* while opening or creating the file * while opening or creating the file
* @exception SecurityException if a security manager exists and its * @exception SecurityException if a security manager exists and its
* {@code checkRead} method denies read access to the file * {@code checkRead} method denies read access to the file
* or the mode is "rw" and the security manager's * or the mode is {@code "rw"} and the security manager's
* {@code checkWrite} method denies write access to the file * {@code checkWrite} method denies write access to the file
* @see java.lang.SecurityException * @see java.lang.SecurityException
* @see java.lang.SecurityManager#checkRead(java.lang.String) * @see java.lang.SecurityManager#checkRead(java.lang.String)
* @see java.lang.SecurityManager#checkWrite(java.lang.String) * @see java.lang.SecurityManager#checkWrite(java.lang.String)
@ -129,33 +129,33 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* write to, the file specified by the {@link File} argument. A new {@link * write to, the file specified by the {@link File} argument. A new {@link
* FileDescriptor} object is created to represent this file connection. * FileDescriptor} object is created to represent this file connection.
* *
* <p>The <a name="mode"><tt>mode</tt></a> argument specifies the access mode * <p>The <a name="mode">{@code mode}</a> argument specifies the access mode
* in which the file is to be opened. The permitted values and their * in which the file is to be opened. The permitted values and their
* meanings are: * meanings are:
* *
* <table summary="Access mode permitted values and meanings"> * <table summary="Access mode permitted values and meanings">
* <tr><th align="left">Value</th><th align="left">Meaning</th></tr> * <tr><th align="left">Value</th><th align="left">Meaning</th></tr>
* <tr><td valign="top"><tt>"r"</tt></td> * <tr><td valign="top">{@code "r"}</td>
* <td> Open for reading only. Invoking any of the <tt>write</tt> * <td> Open for reading only. Invoking any of the {@code write}
* methods of the resulting object will cause an {@link * methods of the resulting object will cause an
* java.io.IOException} to be thrown. </td></tr> * {@link java.io.IOException} to be thrown.</td></tr>
* <tr><td valign="top"><tt>"rw"</tt></td> * <tr><td valign="top">{@code "rw"}</td>
* <td> Open for reading and writing. If the file does not already * <td> Open for reading and writing. If the file does not already
* exist then an attempt will be made to create it. </td></tr> * exist then an attempt will be made to create it.</td></tr>
* <tr><td valign="top"><tt>"rws"</tt></td> * <tr><td valign="top">{@code "rws"}</td>
* <td> Open for reading and writing, as with <tt>"rw"</tt>, and also * <td> Open for reading and writing, as with {@code "rw"}, and also
* require that every update to the file's content or metadata be * require that every update to the file's content or metadata be
* written synchronously to the underlying storage device. </td></tr> * written synchronously to the underlying storage device.</td></tr>
* <tr><td valign="top"><tt>"rwd"&nbsp;&nbsp;</tt></td> * <tr><td valign="top">{@code "rwd"}</td>
* <td> Open for reading and writing, as with <tt>"rw"</tt>, and also * <td> Open for reading and writing, as with {@code "rw"}, and also
* require that every update to the file's content be written * require that every update to the file's content be written
* synchronously to the underlying storage device. </td></tr> * synchronously to the underlying storage device.</td></tr>
* </table> * </table>
* *
* The <tt>"rws"</tt> and <tt>"rwd"</tt> modes work much like the {@link * The {@code "rws"} and {@code "rwd"} modes work much like the {@link
* java.nio.channels.FileChannel#force(boolean) force(boolean)} method of * java.nio.channels.FileChannel#force(boolean) force(boolean)} method of
* the {@link java.nio.channels.FileChannel} class, passing arguments of * the {@link java.nio.channels.FileChannel} class, passing arguments of
* <tt>true</tt> and <tt>false</tt>, respectively, except that they always * {@code true} and {@code false}, respectively, except that they always
* apply to every I/O operation and are therefore often more efficient. If * apply to every I/O operation and are therefore often more efficient. If
* the file resides on a local storage device then when an invocation of a * the file resides on a local storage device then when an invocation of a
* method of this class returns it is guaranteed that all changes made to * method of this class returns it is guaranteed that all changes made to
@ -164,9 +164,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* event of a system crash. If the file does not reside on a local device * event of a system crash. If the file does not reside on a local device
* then no such guarantee is made. * then no such guarantee is made.
* *
* <p>The <tt>"rwd"</tt> mode can be used to reduce the number of I/O * <p>The {@code "rwd"} mode can be used to reduce the number of I/O
* operations performed. Using <tt>"rwd"</tt> only requires updates to the * operations performed. Using {@code "rwd"} only requires updates to the
* file's content to be written to storage; using <tt>"rws"</tt> requires * file's content to be written to storage; using {@code "rws"} requires
* updates to both the file's content and its metadata to be written, which * updates to both the file's content and its metadata to be written, which
* generally requires at least one more low-level I/O operation. * generally requires at least one more low-level I/O operation.
* *
@ -181,19 +181,19 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* @param mode the access mode, as described * @param mode the access mode, as described
* <a href="#mode">above</a> * <a href="#mode">above</a>
* @exception IllegalArgumentException if the mode argument is not equal * @exception IllegalArgumentException if the mode argument is not equal
* to one of <tt>"r"</tt>, <tt>"rw"</tt>, <tt>"rws"</tt>, or * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or
* <tt>"rwd"</tt> * {@code "rwd"}
* @exception FileNotFoundException * @exception FileNotFoundException
* if the mode is <tt>"r"</tt> but the given file object does * if the mode is {@code "r"} but the given file object does
* not denote an existing regular file, or if the mode begins * not denote an existing regular file, or if the mode begins
* with <tt>"rw"</tt> but the given file object does not denote * with {@code "rw"} but the given file object does not denote
* an existing, writable regular file and a new regular file of * an existing, writable regular file and a new regular file of
* that name cannot be created, or if some other error occurs * that name cannot be created, or if some other error occurs
* while opening or creating the file * while opening or creating the file
* @exception SecurityException if a security manager exists and its * @exception SecurityException if a security manager exists and its
* {@code checkRead} method denies read access to the file * {@code checkRead} method denies read access to the file
* or the mode is "rw" and the security manager's * or the mode is {@code "rw"} and the security manager's
* {@code checkWrite} method denies write access to the file * {@code checkWrite} method denies write access to the file
* @see java.lang.SecurityManager#checkRead(java.lang.String) * @see java.lang.SecurityManager#checkRead(java.lang.String)
* @see java.lang.SecurityManager#checkWrite(java.lang.String) * @see java.lang.SecurityManager#checkWrite(java.lang.String)
* @see java.nio.channels.FileChannel#force(boolean) * @see java.nio.channels.FileChannel#force(boolean)

View file

@ -54,7 +54,7 @@ public abstract class Reader implements Readable, Closeable {
* The object used to synchronize operations on this stream. For * The object used to synchronize operations on this stream. For
* efficiency, a character-stream object may use an object other than * efficiency, a character-stream object may use an object other than
* itself to protect critical sections. A subclass should therefore use * itself to protect critical sections. A subclass should therefore use
* the object in this field rather than <tt>this</tt> or a synchronized * the object in this field rather than {@code this} or a synchronized
* method. * method.
*/ */
protected Object lock; protected Object lock;
@ -111,7 +111,7 @@ public abstract class Reader implements Readable, Closeable {
* should override this method. * should override this method.
* *
* @return The character read, as an integer in the range 0 to 65535 * @return The character read, as an integer in the range 0 to 65535
* (<tt>0x00-0xffff</tt>), or -1 if the end of the stream has * ({@code 0x00-0xffff}), or -1 if the end of the stream has
* been reached * been reached
* *
* @exception IOException If an I/O error occurs * @exception IOException If an I/O error occurs

View file

@ -30,9 +30,9 @@ package java.io;
* A character stream that collects its output in a string buffer, which can * A character stream that collects its output in a string buffer, which can
* then be used to construct a string. * then be used to construct a string.
* <p> * <p>
* Closing a <tt>StringWriter</tt> has no effect. The methods in this class * Closing a {@code StringWriter} has no effect. The methods in this class
* can be called after the stream has been closed without generating an * can be called after the stream has been closed without generating an
* <tt>IOException</tt>. * {@code IOException}.
* *
* @author Mark Reinhold * @author Mark Reinhold
* @since 1.1 * @since 1.1
@ -56,11 +56,11 @@ public class StringWriter extends Writer {
* size. * size.
* *
* @param initialSize * @param initialSize
* The number of <tt>char</tt> values that will fit into this buffer * The number of {@code char} values that will fit into this buffer
* before it is automatically expanded * before it is automatically expanded
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If <tt>initialSize</tt> is negative * If {@code initialSize} is negative
*/ */
public StringWriter(int initialSize) { public StringWriter(int initialSize) {
if (initialSize < 0) { if (initialSize < 0) {
@ -115,21 +115,21 @@ public class StringWriter extends Writer {
/** /**
* Appends the specified character sequence to this writer. * Appends the specified character sequence to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(csq)</tt> * <p> An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
* out.write(csq.toString()) </pre> * out.write(csq.toString()) </pre>
* *
* <p> Depending on the specification of <tt>toString</tt> for the * <p> Depending on the specification of {@code toString} for the
* character sequence <tt>csq</tt>, the entire sequence may not be * character sequence {@code csq}, the entire sequence may not be
* appended. For instance, invoking the <tt>toString</tt> method of a * appended. For instance, invoking the {@code toString} method of a
* character buffer will return a subsequence whose content depends upon * character buffer will return a subsequence whose content depends upon
* the buffer's position and limit. * the buffer's position and limit.
* *
* @param csq * @param csq
* The character sequence to append. If <tt>csq</tt> is * The character sequence to append. If {@code csq} is
* <tt>null</tt>, then the four characters <tt>"null"</tt> are * {@code null}, then the four characters "{@code null}" are
* appended to this writer. * appended to this writer.
* *
* @return This writer * @return This writer
@ -147,18 +147,20 @@ public class StringWriter extends Writer {
/** /**
* Appends a subsequence of the specified character sequence to this writer. * Appends a subsequence of the specified character sequence to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(csq, start, * <p> An invocation of this method of the form
* end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in * {@code out.append(csq, start, end)} when {@code csq}
* is not {@code null}, behaves in
* exactly the same way as the invocation * exactly the same way as the invocation
* *
* <pre> * <pre>{@code
* out.write(csq.subSequence(start, end).toString()) </pre> * out.write(csq.subSequence(start, end).toString())
* }</pre>
* *
* @param csq * @param csq
* The character sequence from which a subsequence will be * The character sequence from which a subsequence will be
* appended. If <tt>csq</tt> is <tt>null</tt>, then characters * appended. If {@code csq} is {@code null}, then characters
* will be appended as if <tt>csq</tt> contained the four * will be appended as if {@code csq} contained the four
* characters <tt>"null"</tt>. * characters "{@code null}".
* *
* @param start * @param start
* The index of the first character in the subsequence * The index of the first character in the subsequence
@ -170,9 +172,9 @@ public class StringWriter extends Writer {
* @return This writer * @return This writer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> * If {@code start} or {@code end} are negative, {@code start}
* is greater than <tt>end</tt>, or <tt>end</tt> is greater than * is greater than {@code end}, or {@code end} is greater than
* <tt>csq.length()</tt> * {@code csq.length()}
* *
* @since 1.5 * @since 1.5
*/ */
@ -185,7 +187,7 @@ public class StringWriter extends Writer {
/** /**
* Appends the specified character to this writer. * Appends the specified character to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(c)</tt> * <p> An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
@ -226,9 +228,9 @@ public class StringWriter extends Writer {
} }
/** /**
* Closing a <tt>StringWriter</tt> has no effect. The methods in this * Closing a {@code StringWriter} has no effect. The methods in this
* class can be called after the stream has been closed without generating * class can be called after the stream has been closed without generating
* an <tt>IOException</tt>. * an {@code IOException}.
*/ */
public void close() throws IOException { public void close() throws IOException {
} }

View file

@ -63,7 +63,7 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
* The object used to synchronize operations on this stream. For * The object used to synchronize operations on this stream. For
* efficiency, a character-stream object may use an object other than * efficiency, a character-stream object may use an object other than
* itself to protect critical sections. A subclass should therefore use * itself to protect critical sections. A subclass should therefore use
* the object in this field rather than <tt>this</tt> or a synchronized * the object in this field rather than {@code this} or a synchronized
* method. * method.
*/ */
protected Object lock; protected Object lock;
@ -170,8 +170,8 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
* Number of characters to write * Number of characters to write
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>off</tt> is negative, or <tt>len</tt> is negative, * If {@code off} is negative, or {@code len} is negative,
* or <tt>off+len</tt> is negative or greater than the length * or {@code off+len} is negative or greater than the length
* of the given string * of the given string
* *
* @throws IOException * @throws IOException
@ -196,21 +196,21 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
/** /**
* Appends the specified character sequence to this writer. * Appends the specified character sequence to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(csq)</tt> * <p> An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
* out.write(csq.toString()) </pre> * out.write(csq.toString()) </pre>
* *
* <p> Depending on the specification of <tt>toString</tt> for the * <p> Depending on the specification of {@code toString} for the
* character sequence <tt>csq</tt>, the entire sequence may not be * character sequence {@code csq}, the entire sequence may not be
* appended. For instance, invoking the <tt>toString</tt> method of a * appended. For instance, invoking the {@code toString} method of a
* character buffer will return a subsequence whose content depends upon * character buffer will return a subsequence whose content depends upon
* the buffer's position and limit. * the buffer's position and limit.
* *
* @param csq * @param csq
* The character sequence to append. If <tt>csq</tt> is * The character sequence to append. If {@code csq} is
* <tt>null</tt>, then the four characters <tt>"null"</tt> are * {@code null}, then the four characters "{@code null}" are
* appended to this writer. * appended to this writer.
* *
* @return This writer * @return This writer
@ -230,20 +230,22 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
/** /**
* Appends a subsequence of the specified character sequence to this writer. * Appends a subsequence of the specified character sequence to this writer.
* <tt>Appendable</tt>. * {@code Appendable}.
* *
* <p> An invocation of this method of the form <tt>out.append(csq, start, * <p> An invocation of this method of the form
* end)</tt> when <tt>csq</tt> is not <tt>null</tt> behaves in exactly the * {@code out.append(csq, start, end)} when {@code csq}
* is not {@code null} behaves in exactly the
* same way as the invocation * same way as the invocation
* *
* <pre> * <pre>{@code
* out.write(csq.subSequence(start, end).toString()) </pre> * out.write(csq.subSequence(start, end).toString())
* }</pre>
* *
* @param csq * @param csq
* The character sequence from which a subsequence will be * The character sequence from which a subsequence will be
* appended. If <tt>csq</tt> is <tt>null</tt>, then characters * appended. If {@code csq} is {@code null}, then characters
* will be appended as if <tt>csq</tt> contained the four * will be appended as if {@code csq} contained the four
* characters <tt>"null"</tt>. * characters "{@code null}".
* *
* @param start * @param start
* The index of the first character in the subsequence * The index of the first character in the subsequence
@ -255,9 +257,9 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
* @return This writer * @return This writer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> * If {@code start} or {@code end} are negative, {@code start}
* is greater than <tt>end</tt>, or <tt>end</tt> is greater than * is greater than {@code end}, or {@code end} is greater than
* <tt>csq.length()</tt> * {@code csq.length()}
* *
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs
@ -273,7 +275,7 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
/** /**
* Appends the specified character to this writer. * Appends the specified character to this writer.
* *
* <p> An invocation of this method of the form <tt>out.append(c)</tt> * <p> An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>

View file

@ -28,15 +28,15 @@ package java.lang;
import java.io.IOException; import java.io.IOException;
/** /**
* An object to which <tt>char</tt> sequences and values can be appended. The * An object to which {@code char} sequences and values can be appended. The
* <tt>Appendable</tt> interface must be implemented by any class whose * {@code Appendable} interface must be implemented by any class whose
* instances are intended to receive formatted output from a {@link * instances are intended to receive formatted output from a {@link
* java.util.Formatter}. * java.util.Formatter}.
* *
* <p> The characters to be appended should be valid Unicode characters as * <p> The characters to be appended should be valid Unicode characters as
* described in <a href="Character.html#unicode">Unicode Character * described in <a href="Character.html#unicode">Unicode Character
* Representation</a>. Note that supplementary characters may be composed of * Representation</a>. Note that supplementary characters may be composed of
* multiple 16-bit <tt>char</tt> values. * multiple 16-bit {@code char} values.
* *
* <p> Appendables are not necessarily safe for multithreaded access. Thread * <p> Appendables are not necessarily safe for multithreaded access. Thread
* safety is the responsibility of classes that extend and implement this * safety is the responsibility of classes that extend and implement this
@ -51,19 +51,19 @@ import java.io.IOException;
public interface Appendable { public interface Appendable {
/** /**
* Appends the specified character sequence to this <tt>Appendable</tt>. * Appends the specified character sequence to this {@code Appendable}.
* *
* <p> Depending on which class implements the character sequence * <p> Depending on which class implements the character sequence
* <tt>csq</tt>, the entire sequence may not be appended. For * {@code csq}, the entire sequence may not be appended. For
* instance, if <tt>csq</tt> is a {@link java.nio.CharBuffer} then * instance, if {@code csq} is a {@link java.nio.CharBuffer} then
* the subsequence to append is defined by the buffer's position and limit. * the subsequence to append is defined by the buffer's position and limit.
* *
* @param csq * @param csq
* The character sequence to append. If <tt>csq</tt> is * The character sequence to append. If {@code csq} is
* <tt>null</tt>, then the four characters <tt>"null"</tt> are * {@code null}, then the four characters {@code "null"} are
* appended to this Appendable. * appended to this Appendable.
* *
* @return A reference to this <tt>Appendable</tt> * @return A reference to this {@code Appendable}
* *
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs
@ -72,10 +72,10 @@ public interface Appendable {
/** /**
* Appends a subsequence of the specified character sequence to this * Appends a subsequence of the specified character sequence to this
* <tt>Appendable</tt>. * {@code Appendable}.
* *
* <p> An invocation of this method of the form <tt>out.append(csq, start, * <p> An invocation of this method of the form {@code out.append(csq, start, end)}
* end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in * when {@code csq} is not {@code null}, behaves in
* exactly the same way as the invocation * exactly the same way as the invocation
* *
* <pre> * <pre>
@ -83,9 +83,9 @@ public interface Appendable {
* *
* @param csq * @param csq
* The character sequence from which a subsequence will be * The character sequence from which a subsequence will be
* appended. If <tt>csq</tt> is <tt>null</tt>, then characters * appended. If {@code csq} is {@code null}, then characters
* will be appended as if <tt>csq</tt> contained the four * will be appended as if {@code csq} contained the four
* characters <tt>"null"</tt>. * characters {@code "null"}.
* *
* @param start * @param start
* The index of the first character in the subsequence * The index of the first character in the subsequence
@ -94,12 +94,12 @@ public interface Appendable {
* The index of the character following the last character in the * The index of the character following the last character in the
* subsequence * subsequence
* *
* @return A reference to this <tt>Appendable</tt> * @return A reference to this {@code Appendable}
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> * If {@code start} or {@code end} are negative, {@code start}
* is greater than <tt>end</tt>, or <tt>end</tt> is greater than * is greater than {@code end}, or {@code end} is greater than
* <tt>csq.length()</tt> * {@code csq.length()}
* *
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs
@ -107,12 +107,12 @@ public interface Appendable {
Appendable append(CharSequence csq, int start, int end) throws IOException; Appendable append(CharSequence csq, int start, int end) throws IOException;
/** /**
* Appends the specified character to this <tt>Appendable</tt>. * Appends the specified character to this {@code Appendable}.
* *
* @param c * @param c
* The character to append * The character to append
* *
* @return A reference to this <tt>Appendable</tt> * @return A reference to this {@code Appendable}
* *
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs

View file

@ -28,7 +28,7 @@ import java.util.*;
/* /*
* Class to track and run user level shutdown hooks registered through * Class to track and run user level shutdown hooks registered through
* <tt>{@link Runtime#addShutdownHook Runtime.addShutdownHook}</tt>. * {@link Runtime#addShutdownHook Runtime.addShutdownHook}.
* *
* @see java.lang.Runtime#addShutdownHook * @see java.lang.Runtime#addShutdownHook
* @see java.lang.Runtime#removeShutdownHook * @see java.lang.Runtime#removeShutdownHook

View file

@ -29,8 +29,8 @@ package java.lang;
* A collection of assertion status directives (such as "enable assertions * A collection of assertion status directives (such as "enable assertions
* in package p" or "disable assertions in class c"). This class is used by * in package p" or "disable assertions in class c"). This class is used by
* the JVM to communicate the assertion status directives implied by * the JVM to communicate the assertion status directives implied by
* the <tt>java</tt> command line flags <tt>-enableassertions</tt> * the {@code java} command line flags {@code -enableassertions}
* (<tt>-ea</tt>) and <tt>-disableassertions</tt> (<tt>-da</tt>). * ({@code -ea}) and {@code -disableassertions} ({@code -da}).
* *
* @since 1.4 * @since 1.4
* @author Josh Bloch * @author Josh Bloch
@ -44,19 +44,19 @@ class AssertionStatusDirectives {
String[] classes; String[] classes;
/** /**
* A parallel array to <tt>classes</tt>, indicating whether each class * A parallel array to {@code classes}, indicating whether each class
* is to have assertions enabled or disabled. A value of <tt>true</tt> * is to have assertions enabled or disabled. A value of {@code true}
* for <tt>classEnabled[i]</tt> indicates that the class named by * for {@code classEnabled[i]} indicates that the class named by
* <tt>classes[i]</tt> should have assertions enabled; a value of * {@code classes[i]} should have assertions enabled; a value of
* <tt>false</tt> indicates that it should have classes disabled. * {@code false} indicates that it should have classes disabled.
* This array must have the same number of elements as <tt>classes</tt>. * This array must have the same number of elements as {@code classes}.
* *
* <p>In the case of conflicting directives for the same class, the * <p>In the case of conflicting directives for the same class, the
* last directive for a given class wins. In other words, if a string * last directive for a given class wins. In other words, if a string
* <tt>s</tt> appears multiple times in the <tt>classes</tt> array * {@code s} appears multiple times in the {@code classes} array
* and <tt>i</tt> is the highest integer for which * and {@code i} is the highest integer for which
* <tt>classes[i].equals(s)</tt>, then <tt>classEnabled[i]</tt> * {@code classes[i].equals(s)}, then {@code classEnabled[i]}
* indicates whether assertions are to be enabled in class <tt>s</tt>. * indicates whether assertions are to be enabled in class {@code s}.
*/ */
boolean[] classEnabled; boolean[] classEnabled;
@ -68,21 +68,21 @@ class AssertionStatusDirectives {
String[] packages; String[] packages;
/** /**
* A parallel array to <tt>packages</tt>, indicating whether each * A parallel array to {@code packages}, indicating whether each
* package-tree is to have assertions enabled or disabled. A value of * package-tree is to have assertions enabled or disabled. A value of
* <tt>true</tt> for <tt>packageEnabled[i]</tt> indicates that the * {@code true} for {@code packageEnabled[i]} indicates that the
* package-tree named by <tt>packages[i]</tt> should have assertions * package-tree named by {@code packages[i]} should have assertions
* enabled; a value of <tt>false</tt> indicates that it should have * enabled; a value of {@code false} indicates that it should have
* assertions disabled. This array must have the same number of * assertions disabled. This array must have the same number of
* elements as <tt>packages</tt>. * elements as {@code packages}.
* *
* In the case of conflicting directives for the same package-tree, the * In the case of conflicting directives for the same package-tree, the
* last directive for a given package-tree wins. In other words, if a * last directive for a given package-tree wins. In other words, if a
* string <tt>s</tt> appears multiple times in the <tt>packages</tt> array * string {@code s} appears multiple times in the {@code packages} array
* and <tt>i</tt> is the highest integer for which * and {@code i} is the highest integer for which
* <tt>packages[i].equals(s)</tt>, then <tt>packageEnabled[i]</tt> * {@code packages[i].equals(s)}, then {@code packageEnabled[i]}
* indicates whether assertions are to be enabled in package-tree * indicates whether assertions are to be enabled in package-tree
* <tt>s</tt>. * {@code s}.
*/ */
boolean[] packageEnabled; boolean[] packageEnabled;

View file

@ -34,21 +34,21 @@ import java.util.stream.IntStream;
import java.util.stream.StreamSupport; import java.util.stream.StreamSupport;
/** /**
* A <tt>CharSequence</tt> is a readable sequence of <code>char</code> values. This * A {@code CharSequence} is a readable sequence of {@code char} values. This
* interface provides uniform, read-only access to many different kinds of * interface provides uniform, read-only access to many different kinds of
* <code>char</code> sequences. * {@code char} sequences.
* A <code>char</code> value represents a character in the <i>Basic * A {@code char} value represents a character in the <i>Basic
* Multilingual Plane (BMP)</i> or a surrogate. Refer to <a * Multilingual Plane (BMP)</i> or a surrogate. Refer to <a
* href="Character.html#unicode">Unicode Character Representation</a> for details. * href="Character.html#unicode">Unicode Character Representation</a> for details.
* *
* <p> This interface does not refine the general contracts of the {@link * <p> This interface does not refine the general contracts of the {@link
* java.lang.Object#equals(java.lang.Object) equals} and {@link * java.lang.Object#equals(java.lang.Object) equals} and {@link
* java.lang.Object#hashCode() hashCode} methods. The result of comparing two * java.lang.Object#hashCode() hashCode} methods. The result of comparing two
* objects that implement <tt>CharSequence</tt> is therefore, in general, * objects that implement {@code CharSequence} is therefore, in general,
* undefined. Each object may be implemented by a different class, and there * undefined. Each object may be implemented by a different class, and there
* is no guarantee that each class will be capable of testing its instances * is no guarantee that each class will be capable of testing its instances
* for equality with those of the other. It is therefore inappropriate to use * for equality with those of the other. It is therefore inappropriate to use
* arbitrary <tt>CharSequence</tt> instances as elements in a set or as keys in * arbitrary {@code CharSequence} instances as elements in a set or as keys in
* a map. </p> * a map. </p>
* *
* @author Mike McCloskey * @author Mike McCloskey
@ -60,38 +60,38 @@ public interface CharSequence {
/** /**
* Returns the length of this character sequence. The length is the number * Returns the length of this character sequence. The length is the number
* of 16-bit <code>char</code>s in the sequence. * of 16-bit {@code char}s in the sequence.
* *
* @return the number of <code>char</code>s in this sequence * @return the number of {@code char}s in this sequence
*/ */
int length(); int length();
/** /**
* Returns the <code>char</code> value at the specified index. An index ranges from zero * Returns the {@code char} value at the specified index. An index ranges from zero
* to <tt>length() - 1</tt>. The first <code>char</code> value of the sequence is at * to {@code length() - 1}. The first {@code char} value of the sequence is at
* index zero, the next at index one, and so on, as for array * index zero, the next at index one, and so on, as for array
* indexing. * indexing.
* *
* <p>If the <code>char</code> value specified by the index is a * <p>If the {@code char} value specified by the index is a
* <a href="{@docRoot}/java/lang/Character.html#unicode">surrogate</a>, the surrogate * <a href="{@docRoot}/java/lang/Character.html#unicode">surrogate</a>, the surrogate
* value is returned. * value is returned.
* *
* @param index the index of the <code>char</code> value to be returned * @param index the index of the {@code char} value to be returned
* *
* @return the specified <code>char</code> value * @return the specified {@code char} value
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* if the <tt>index</tt> argument is negative or not less than * if the {@code index} argument is negative or not less than
* <tt>length()</tt> * {@code length()}
*/ */
char charAt(int index); char charAt(int index);
/** /**
* Returns a <code>CharSequence</code> that is a subsequence of this sequence. * Returns a {@code CharSequence} that is a subsequence of this sequence.
* The subsequence starts with the <code>char</code> value at the specified index and * The subsequence starts with the {@code char} value at the specified index and
* ends with the <code>char</code> value at index <tt>end - 1</tt>. The length * ends with the {@code char} value at index {@code end - 1}. The length
* (in <code>char</code>s) of the * (in {@code char}s) of the
* returned sequence is <tt>end - start</tt>, so if <tt>start == end</tt> * returned sequence is {@code end - start}, so if {@code start == end}
* then an empty sequence is returned. * then an empty sequence is returned.
* *
* @param start the start index, inclusive * @param start the start index, inclusive
@ -100,9 +100,9 @@ public interface CharSequence {
* @return the specified subsequence * @return the specified subsequence
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* if <tt>start</tt> or <tt>end</tt> are negative, * if {@code start} or {@code end} are negative,
* if <tt>end</tt> is greater than <tt>length()</tt>, * if {@code end} is greater than {@code length()},
* or if <tt>start</tt> is greater than <tt>end</tt> * or if {@code start} is greater than {@code end}
*/ */
CharSequence subSequence(int start, int end); CharSequence subSequence(int start, int end);

View file

@ -3502,7 +3502,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/** /**
* Returns the UnicodeBlock with the given name. Block * Returns the UnicodeBlock with the given name. Block
* names are determined by The Unicode Standard. The file * names are determined by The Unicode Standard. The file
* Blocks-&lt;version&gt;.txt defines blocks for a particular * {@code Blocks-<version>.txt} defines blocks for a particular
* version of the standard. The {@link Character} class specifies * version of the standard. The {@link Character} class specifies
* the version of the standard that it supports. * the version of the standard that it supports.
* <p> * <p>
@ -7195,8 +7195,8 @@ class Character implements java.io.Serializable, Comparable<Character> {
/** /**
* Returns the UnicodeScript constant with the given Unicode script * Returns the UnicodeScript constant with the given Unicode script
* name or the script name alias. Script names and their aliases are * name or the script name alias. Script names and their aliases are
* determined by The Unicode Standard. The files Scripts&lt;version&gt;.txt * determined by The Unicode Standard. The files {@code Scripts<version>.txt}
* and PropertyValueAliases&lt;version&gt;.txt define script names * and {@code PropertyValueAliases<version>.txt} define script names
* and the script name aliases for a particular version of the * and the script name aliases for a particular version of the
* standard. The {@link Character} class specifies the version of * standard. The {@link Character} class specifies the version of
* the standard that it supports. * the standard that it supports.
@ -7255,9 +7255,9 @@ class Character implements java.io.Serializable, Comparable<Character> {
} }
/** /**
* Returns a <tt>Character</tt> instance representing the specified * Returns a {@code Character} instance representing the specified
* <tt>char</tt> value. * {@code char} value.
* If a new <tt>Character</tt> instance is not required, this method * If a new {@code Character} instance is not required, this method
* should generally be used in preference to the constructor * should generally be used in preference to the constructor
* {@link #Character(char)}, as this method is likely to yield * {@link #Character(char)}, as this method is likely to yield
* significantly better space and time performance by caching * significantly better space and time performance by caching
@ -7268,7 +7268,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
* cache other values outside of this range. * cache other values outside of this range.
* *
* @param c a char value. * @param c a char value.
* @return a <tt>Character</tt> instance representing <tt>c</tt>. * @return a {@code Character} instance representing {@code c}.
* @since 1.5 * @since 1.5
*/ */
@HotSpotIntrinsicCandidate @HotSpotIntrinsicCandidate
@ -9871,7 +9871,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
} }
/** /**
* The number of bits used to represent a <tt>char</tt> value in unsigned * The number of bits used to represent a {@code char} value in unsigned
* binary form, constant {@code 16}. * binary form, constant {@code 16}.
* *
* @since 1.5 * @since 1.5
@ -9888,11 +9888,11 @@ class Character implements java.io.Serializable, Comparable<Character> {
/** /**
* Returns the value obtained by reversing the order of the bytes in the * Returns the value obtained by reversing the order of the bytes in the
* specified <tt>char</tt> value. * specified {@code char} value.
* *
* @param ch The {@code char} of which to reverse the byte order. * @param ch The {@code char} of which to reverse the byte order.
* @return the value obtained by reversing (or, equivalently, swapping) * @return the value obtained by reversing (or, equivalently, swapping)
* the bytes in the specified <tt>char</tt> value. * the bytes in the specified {@code char} value.
* @since 1.5 * @since 1.5
*/ */
@HotSpotIntrinsicCandidate @HotSpotIntrinsicCandidate

View file

@ -98,7 +98,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
/** /**
* Returns the exception that was raised if an error occurred while * Returns the exception that was raised if an error occurred while
* attempting to load the class. Otherwise, returns <tt>null</tt>. * attempting to load the class. Otherwise, returns {@code null}.
* *
* <p>This method predates the general-purpose exception chaining facility. * <p>This method predates the general-purpose exception chaining facility.
* The {@link Throwable#getCause()} method is now the preferred means of * The {@link Throwable#getCause()} method is now the preferred means of
@ -114,7 +114,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
/** /**
* Returns the cause of this exception (the exception that was raised * Returns the cause of this exception (the exception that was raised
* if an error occurred while attempting to load the class; otherwise * if an error occurred while attempting to load the class; otherwise
* <tt>null</tt>). * {@code null}).
* *
* @return the cause of this exception. * @return the cause of this exception.
* @since 1.4 * @since 1.4

View file

@ -36,11 +36,11 @@ package java.lang;
* <code>CloneNotSupportedException</code> being thrown. * <code>CloneNotSupportedException</code> being thrown.
* <p> * <p>
* By convention, classes that implement this interface should override * By convention, classes that implement this interface should override
* <tt>Object.clone</tt> (which is protected) with a public method. * {@code Object.clone} (which is protected) with a public method.
* See {@link java.lang.Object#clone()} for details on overriding this * See {@link java.lang.Object#clone()} for details on overriding this
* method. * method.
* <p> * <p>
* Note that this interface does <i>not</i> contain the <tt>clone</tt> method. * Note that this interface does <i>not</i> contain the {@code clone} method.
* Therefore, it is not possible to clone an object merely by virtue of the * Therefore, it is not possible to clone an object merely by virtue of the
* fact that it implements this interface. Even if the clone method is invoked * fact that it implements this interface. Even if the clone method is invoked
* reflectively, there is no guarantee that it will succeed. * reflectively, there is no guarantee that it will succeed.

View file

@ -29,7 +29,7 @@ import java.util.*;
/** /**
* This interface imposes a total ordering on the objects of each class that * This interface imposes a total ordering on the objects of each class that
* implements it. This ordering is referred to as the class's <i>natural * implements it. This ordering is referred to as the class's <i>natural
* ordering</i>, and the class's <tt>compareTo</tt> method is referred to as * ordering</i>, and the class's {@code compareTo} method is referred to as
* its <i>natural comparison method</i>.<p> * its <i>natural comparison method</i>.<p>
* *
* Lists (and arrays) of objects that implement this interface can be sorted * Lists (and arrays) of objects that implement this interface can be sorted
@ -39,45 +39,45 @@ import java.util.*;
* elements in a {@linkplain SortedSet sorted set}, without the need to * elements in a {@linkplain SortedSet sorted set}, without the need to
* specify a {@linkplain Comparator comparator}.<p> * specify a {@linkplain Comparator comparator}.<p>
* *
* The natural ordering for a class <tt>C</tt> is said to be <i>consistent * The natural ordering for a class {@code C} is said to be <i>consistent
* with equals</i> if and only if <tt>e1.compareTo(e2) == 0</tt> has * with equals</i> if and only if {@code e1.compareTo(e2) == 0} has
* the same boolean value as <tt>e1.equals(e2)</tt> for every * the same boolean value as {@code e1.equals(e2)} for every
* <tt>e1</tt> and <tt>e2</tt> of class <tt>C</tt>. Note that <tt>null</tt> * {@code e1} and {@code e2} of class {@code C}. Note that {@code null}
* is not an instance of any class, and <tt>e.compareTo(null)</tt> should * is not an instance of any class, and {@code e.compareTo(null)} should
* throw a <tt>NullPointerException</tt> even though <tt>e.equals(null)</tt> * throw a {@code NullPointerException} even though {@code e.equals(null)}
* returns <tt>false</tt>.<p> * returns {@code false}.<p>
* *
* It is strongly recommended (though not required) that natural orderings be * It is strongly recommended (though not required) that natural orderings be
* consistent with equals. This is so because sorted sets (and sorted maps) * consistent with equals. This is so because sorted sets (and sorted maps)
* without explicit comparators behave "strangely" when they are used with * without explicit comparators behave "strangely" when they are used with
* elements (or keys) whose natural ordering is inconsistent with equals. In * elements (or keys) whose natural ordering is inconsistent with equals. In
* particular, such a sorted set (or sorted map) violates the general contract * particular, such a sorted set (or sorted map) violates the general contract
* for set (or map), which is defined in terms of the <tt>equals</tt> * for set (or map), which is defined in terms of the {@code equals}
* method.<p> * method.<p>
* *
* For example, if one adds two keys <tt>a</tt> and <tt>b</tt> such that * For example, if one adds two keys {@code a} and {@code b} such that
* {@code (!a.equals(b) && a.compareTo(b) == 0)} to a sorted * {@code (!a.equals(b) && a.compareTo(b) == 0)} to a sorted
* set that does not use an explicit comparator, the second <tt>add</tt> * set that does not use an explicit comparator, the second {@code add}
* operation returns false (and the size of the sorted set does not increase) * operation returns false (and the size of the sorted set does not increase)
* because <tt>a</tt> and <tt>b</tt> are equivalent from the sorted set's * because {@code a} and {@code b} are equivalent from the sorted set's
* perspective.<p> * perspective.<p>
* *
* Virtually all Java core classes that implement <tt>Comparable</tt> have natural * Virtually all Java core classes that implement {@code Comparable} have natural
* orderings that are consistent with equals. One exception is * orderings that are consistent with equals. One exception is
* <tt>java.math.BigDecimal</tt>, whose natural ordering equates * {@code java.math.BigDecimal}, whose natural ordering equates
* <tt>BigDecimal</tt> objects with equal values and different precisions * {@code BigDecimal} objects with equal values and different precisions
* (such as 4.0 and 4.00).<p> * (such as 4.0 and 4.00).<p>
* *
* For the mathematically inclined, the <i>relation</i> that defines * For the mathematically inclined, the <i>relation</i> that defines
* the natural ordering on a given class C is:<pre> * the natural ordering on a given class C is:<pre>{@code
* {(x, y) such that x.compareTo(y) &lt;= 0}. * {(x, y) such that x.compareTo(y) <= 0}.
* </pre> The <i>quotient</i> for this total order is: <pre> * }</pre> The <i>quotient</i> for this total order is: <pre>{@code
* {(x, y) such that x.compareTo(y) == 0}. * {(x, y) such that x.compareTo(y) == 0}.
* </pre> * }</pre>
* *
* It follows immediately from the contract for <tt>compareTo</tt> that the * It follows immediately from the contract for {@code compareTo} that the
* quotient is an <i>equivalence relation</i> on <tt>C</tt>, and that the * quotient is an <i>equivalence relation</i> on {@code C}, and that the
* natural ordering is a <i>total order</i> on <tt>C</tt>. When we say that a * natural ordering is a <i>total order</i> on {@code C}. When we say that a
* class's natural ordering is <i>consistent with equals</i>, we mean that the * class's natural ordering is <i>consistent with equals</i>, we mean that the
* quotient for the natural ordering is the equivalence relation defined by * quotient for the natural ordering is the equivalence relation defined by
* the class's {@link Object#equals(Object) equals(Object)} method:<pre> * the class's {@link Object#equals(Object) equals(Object)} method:<pre>
@ -99,30 +99,31 @@ public interface Comparable<T> {
* negative integer, zero, or a positive integer as this object is less * negative integer, zero, or a positive integer as this object is less
* than, equal to, or greater than the specified object. * than, equal to, or greater than the specified object.
* *
* <p>The implementor must ensure <tt>sgn(x.compareTo(y)) == * <p>The implementor must ensure
* -sgn(y.compareTo(x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This * {@code sgn(x.compareTo(y)) == -sgn(y.compareTo(x))}
* implies that <tt>x.compareTo(y)</tt> must throw an exception iff * for all {@code x} and {@code y}. (This
* <tt>y.compareTo(x)</tt> throws an exception.) * implies that {@code x.compareTo(y)} must throw an exception iff
* {@code y.compareTo(x)} throws an exception.)
* *
* <p>The implementor must also ensure that the relation is transitive: * <p>The implementor must also ensure that the relation is transitive:
* <tt>(x.compareTo(y)&gt;0 &amp;&amp; y.compareTo(z)&gt;0)</tt> implies * {@code (x.compareTo(y) > 0 && y.compareTo(z) > 0)} implies
* <tt>x.compareTo(z)&gt;0</tt>. * {@code x.compareTo(z) > 0}.
* *
* <p>Finally, the implementor must ensure that <tt>x.compareTo(y)==0</tt> * <p>Finally, the implementor must ensure that {@code x.compareTo(y)==0}
* implies that <tt>sgn(x.compareTo(z)) == sgn(y.compareTo(z))</tt>, for * implies that {@code sgn(x.compareTo(z)) == sgn(y.compareTo(z))}, for
* all <tt>z</tt>. * all {@code z}.
* *
* <p>It is strongly recommended, but <i>not</i> strictly required that * <p>It is strongly recommended, but <i>not</i> strictly required that
* <tt>(x.compareTo(y)==0) == (x.equals(y))</tt>. Generally speaking, any * {@code (x.compareTo(y)==0) == (x.equals(y))}. Generally speaking, any
* class that implements the <tt>Comparable</tt> interface and violates * class that implements the {@code Comparable} interface and violates
* this condition should clearly indicate this fact. The recommended * this condition should clearly indicate this fact. The recommended
* language is "Note: this class has a natural ordering that is * language is "Note: this class has a natural ordering that is
* inconsistent with equals." * inconsistent with equals."
* *
* <p>In the foregoing description, the notation * <p>In the foregoing description, the notation
* <tt>sgn(</tt><i>expression</i><tt>)</tt> designates the mathematical * {@code sgn(}<i>expression</i>{@code )} designates the mathematical
* <i>signum</i> function, which is defined to return one of <tt>-1</tt>, * <i>signum</i> function, which is defined to return one of {@code -1},
* <tt>0</tt>, or <tt>1</tt> according to whether the value of * {@code 0}, or {@code 1} according to whether the value of
* <i>expression</i> is negative, zero or positive. * <i>expression</i> is negative, zero or positive.
* *
* @param o the object to be compared. * @param o the object to be compared.

View file

@ -51,7 +51,7 @@ public class EnumConstantNotPresentException extends RuntimeException {
private String constantName; private String constantName;
/** /**
* Constructs an <tt>EnumConstantNotPresentException</tt> for the * Constructs an {@code EnumConstantNotPresentException} for the
* specified constant. * specified constant.
* *
* @param enumType the type of the missing enum constant * @param enumType the type of the missing enum constant

View file

@ -75,7 +75,7 @@ public class Exception extends Throwable {
* @param message the detail message (which is saved for later retrieval * @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method). * by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or * permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.4 * @since 1.4
@ -86,14 +86,14 @@ public class Exception extends Throwable {
/** /**
* Constructs a new exception with the specified cause and a detail * Constructs a new exception with the specified cause and a detail
* message of <tt>(cause==null ? null : cause.toString())</tt> (which * message of {@code (cause==null ? null : cause.toString())} (which
* typically contains the class and detail message of <tt>cause</tt>). * typically contains the class and detail message of {@code cause}).
* This constructor is useful for exceptions that are little more than * This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link * wrappers for other throwables (for example, {@link
* java.security.PrivilegedActionException}). * java.security.PrivilegedActionException}).
* *
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or * permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.4 * @since 1.4

View file

@ -63,7 +63,7 @@ class IllegalArgumentException extends RuntimeException {
* @param message the detail message (which is saved for later retrieval * @param message the detail message (which is saved for later retrieval
* by the {@link Throwable#getMessage()} method). * by the {@link Throwable#getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link Throwable#getCause()} method). (A <tt>null</tt> value * {@link Throwable#getCause()} method). (A {@code null} value
* is permitted, and indicates that the cause is nonexistent or * is permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.5 * @since 1.5
@ -74,14 +74,14 @@ class IllegalArgumentException extends RuntimeException {
/** /**
* Constructs a new exception with the specified cause and a detail * Constructs a new exception with the specified cause and a detail
* message of <tt>(cause==null ? null : cause.toString())</tt> (which * message of {@code (cause==null ? null : cause.toString())} (which
* typically contains the class and detail message of <tt>cause</tt>). * typically contains the class and detail message of {@code cause}).
* This constructor is useful for exceptions that are little more than * This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link * wrappers for other throwables (for example, {@link
* java.security.PrivilegedActionException}). * java.security.PrivilegedActionException}).
* *
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link Throwable#getCause()} method). (A <tt>null</tt> value is * {@link Throwable#getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or * permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.5 * @since 1.5

View file

@ -66,7 +66,7 @@ class IllegalStateException extends RuntimeException {
* @param message the detail message (which is saved for later retrieval * @param message the detail message (which is saved for later retrieval
* by the {@link Throwable#getMessage()} method). * by the {@link Throwable#getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link Throwable#getCause()} method). (A <tt>null</tt> value * {@link Throwable#getCause()} method). (A {@code null} value
* is permitted, and indicates that the cause is nonexistent or * is permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.5 * @since 1.5
@ -77,14 +77,14 @@ class IllegalStateException extends RuntimeException {
/** /**
* Constructs a new exception with the specified cause and a detail * Constructs a new exception with the specified cause and a detail
* message of <tt>(cause==null ? null : cause.toString())</tt> (which * message of {@code (cause==null ? null : cause.toString())} (which
* typically contains the class and detail message of <tt>cause</tt>). * typically contains the class and detail message of {@code cause}).
* This constructor is useful for exceptions that are little more than * This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link * wrappers for other throwables (for example, {@link
* java.security.PrivilegedActionException}). * java.security.PrivilegedActionException}).
* *
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link Throwable#getCause()} method). (A <tt>null</tt> value is * {@link Throwable#getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or * permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.5 * @since 1.5

View file

@ -27,12 +27,12 @@ package java.lang;
import java.lang.ref.*; import java.lang.ref.*;
/** /**
* This class extends <tt>ThreadLocal</tt> to provide inheritance of values * This class extends {@code ThreadLocal} to provide inheritance of values
* from parent thread to child thread: when a child thread is created, the * from parent thread to child thread: when a child thread is created, the
* child receives initial values for all inheritable thread-local variables * child receives initial values for all inheritable thread-local variables
* for which the parent has values. Normally the child's values will be * for which the parent has values. Normally the child's values will be
* identical to the parent's; however, the child's value can be made an * identical to the parent's; however, the child's value can be made an
* arbitrary function of the parent's by overriding the <tt>childValue</tt> * arbitrary function of the parent's by overriding the {@code childValue}
* method in this class. * method in this class.
* *
* <p>Inheritable thread-local variables are used in preference to * <p>Inheritable thread-local variables are used in preference to

View file

@ -28,8 +28,8 @@ package java.lang;
import java.io.IOException; import java.io.IOException;
/** /**
* A <tt>Readable</tt> is a source of characters. Characters from * A {@code Readable} is a source of characters. Characters from
* a <tt>Readable</tt> are made available to callers of the read * a {@code Readable} are made available to callers of the read
* method via a {@link java.nio.CharBuffer CharBuffer}. * method via a {@link java.nio.CharBuffer CharBuffer}.
* *
* @since 1.5 * @since 1.5

View file

@ -71,7 +71,7 @@ public class RuntimeException extends Exception {
* @param message the detail message (which is saved for later retrieval * @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method). * by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or * permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.4 * @since 1.4
@ -81,13 +81,13 @@ public class RuntimeException extends Exception {
} }
/** Constructs a new runtime exception with the specified cause and a /** Constructs a new runtime exception with the specified cause and a
* detail message of <tt>(cause==null ? null : cause.toString())</tt> * detail message of {@code (cause==null ? null : cause.toString())}
* (which typically contains the class and detail message of * (which typically contains the class and detail message of
* <tt>cause</tt>). This constructor is useful for runtime exceptions * {@code cause}). This constructor is useful for runtime exceptions
* that are little more than wrappers for other throwables. * that are little more than wrappers for other throwables.
* *
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or * permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.4 * @since 1.4

View file

@ -172,9 +172,8 @@ import java.util.StringTokenizer;
* <tr> * <tr>
* <td>modifyThread</td> * <td>modifyThread</td>
* <td>Modification of threads, e.g., via calls to Thread * <td>Modification of threads, e.g., via calls to Thread
* <tt>interrupt</tt>, <tt>stop</tt>, <tt>suspend</tt>, * {@code interrupt, stop, suspend, resume, setDaemon, setPriority,
* <tt>resume</tt>, <tt>setDaemon</tt>, <tt>setPriority</tt>, * setName} and {@code setUncaughtExceptionHandler}
* <tt>setName</tt> and <tt>setUncaughtExceptionHandler</tt>
* methods</td> * methods</td>
* <td>This allows an attacker to modify the behaviour of * <td>This allows an attacker to modify the behaviour of
* any thread in the system.</td> * any thread in the system.</td>

View file

@ -36,14 +36,14 @@ public class SecurityException extends RuntimeException {
private static final long serialVersionUID = 6878364983674394167L; private static final long serialVersionUID = 6878364983674394167L;
/** /**
* Constructs a <code>SecurityException</code> with no detail message. * Constructs a {@code SecurityException} with no detail message.
*/ */
public SecurityException() { public SecurityException() {
super(); super();
} }
/** /**
* Constructs a <code>SecurityException</code> with the specified * Constructs a {@code SecurityException} with the specified
* detail message. * detail message.
* *
* @param s the detail message. * @param s the detail message.
@ -53,13 +53,13 @@ public class SecurityException extends RuntimeException {
} }
/** /**
* Creates a <code>SecurityException</code> with the specified * Creates a {@code SecurityException} with the specified
* detail message and cause. * detail message and cause.
* *
* @param message the detail message (which is saved for later retrieval * @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method). * by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is permitted, * {@link #getCause()} method). (A {@code null} value is permitted,
* and indicates that the cause is nonexistent or unknown.) * and indicates that the cause is nonexistent or unknown.)
* @since 1.5 * @since 1.5
*/ */
@ -68,13 +68,13 @@ public class SecurityException extends RuntimeException {
} }
/** /**
* Creates a <code>SecurityException</code> with the specified cause * Creates a {@code SecurityException} with the specified cause
* and a detail message of <tt>(cause==null ? null : cause.toString())</tt> * and a detail message of {@code (cause==null ? null : cause.toString())}
* (which typically contains the class and detail message of * (which typically contains the class and detail message of
* <tt>cause</tt>). * {@code cause}).
* *
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A <tt>null</tt> value is permitted, * {@link #getCause()} method). (A {@code null} value is permitted,
* and indicates that the cause is nonexistent or unknown.) * and indicates that the cause is nonexistent or unknown.)
* @since 1.5 * @since 1.5
*/ */

View file

@ -87,7 +87,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
* string concatenation and conversion, see Gosling, Joy, and Steele, * string concatenation and conversion, see Gosling, Joy, and Steele,
* <i>The Java Language Specification</i>. * <i>The Java Language Specification</i>.
* *
* <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in this class will cause a {@link NullPointerException} to be * or method in this class will cause a {@link NullPointerException} to be
* thrown. * thrown.
* *
@ -1135,7 +1135,7 @@ public final class String
* or both. If they have different characters at one or more index * or both. If they have different characters at one or more index
* positions, let <i>k</i> be the smallest such index; then the string * positions, let <i>k</i> be the smallest such index; then the string
* whose character at position <i>k</i> has the smaller value, as * whose character at position <i>k</i> has the smaller value, as
* determined by using the &lt; operator, lexicographically precedes the * determined by using the {@code <} operator, lexicographically precedes the
* other string. In this case, {@code compareTo} returns the * other string. In this case, {@code compareTo} returns the
* difference of the two character values at position {@code k} in * difference of the two character values at position {@code k} in
* the two string -- that is, the value: * the two string -- that is, the value:

View file

@ -205,7 +205,7 @@ public final class System {
* Returns the unique {@link java.io.Console Console} object associated * Returns the unique {@link java.io.Console Console} object associated
* with the current Java virtual machine, if any. * with the current Java virtual machine, if any.
* *
* @return The system console, if any, otherwise <tt>null</tt>. * @return The system console, if any, otherwise {@code null}.
* *
* @since 1.6 * @since 1.6
*/ */
@ -232,7 +232,7 @@ public final class System {
* inheritedChannel}, this method may return other kinds of * inheritedChannel}, this method may return other kinds of
* channels in the future. * channels in the future.
* *
* @return The inherited channel, if any, otherwise <tt>null</tt>. * @return The inherited channel, if any, otherwise {@code null}.
* *
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs

View file

@ -616,7 +616,7 @@ class Thread implements Runnable {
* Similarly, specifying a lower value may allow a greater number of * Similarly, specifying a lower value may allow a greater number of
* threads to exist concurrently without throwing an {@link * threads to exist concurrently without throwing an {@link
* OutOfMemoryError} (or other internal error). The details of * OutOfMemoryError} (or other internal error). The details of
* the relationship between the value of the <tt>stackSize</tt> parameter * the relationship between the value of the {@code stackSize} parameter
* and the maximum recursion depth and concurrency level are * and the maximum recursion depth and concurrency level are
* platform-dependent. <b>On some platforms, the value of the * platform-dependent. <b>On some platforms, the value of the
* {@code stackSize} parameter may have no effect whatsoever.</b> * {@code stackSize} parameter may have no effect whatsoever.</b>
@ -1476,7 +1476,7 @@ class Thread implements Runnable {
} }
/** /**
* Returns <tt>true</tt> if and only if the current thread holds the * Returns {@code true} if and only if the current thread holds the
* monitor lock on the specified object. * monitor lock on the specified object.
* *
* <p>This method is designed to allow a program to assert that * <p>This method is designed to allow a program to assert that
@ -1486,8 +1486,8 @@ class Thread implements Runnable {
* </pre> * </pre>
* *
* @param obj the object on which to test lock ownership * @param obj the object on which to test lock ownership
* @throws NullPointerException if obj is <tt>null</tt> * @throws NullPointerException if obj is {@code null}
* @return <tt>true</tt> if the current thread holds the monitor lock on * @return {@code true} if the current thread holds the monitor lock on
* the specified object. * the specified object.
* @since 1.4 * @since 1.4
*/ */
@ -1509,8 +1509,8 @@ class Thread implements Runnable {
* *
* <p>If there is a security manager, and this thread is not * <p>If there is a security manager, and this thread is not
* the current thread, then the security manager's * the current thread, then the security manager's
* <tt>checkPermission</tt> method is called with a * {@code checkPermission} method is called with a
* <tt>RuntimePermission("getStackTrace")</tt> permission * {@code RuntimePermission("getStackTrace")} permission
* to see if it's ok to get the stack trace. * to see if it's ok to get the stack trace.
* *
* <p>Some virtual machines may, under some circumstances, omit one * <p>Some virtual machines may, under some circumstances, omit one
@ -1519,12 +1519,12 @@ class Thread implements Runnable {
* this thread is permitted to return a zero-length array from this * this thread is permitted to return a zero-length array from this
* method. * method.
* *
* @return an array of <tt>StackTraceElement</tt>, * @return an array of {@code StackTraceElement},
* each represents one stack frame. * each represents one stack frame.
* *
* @throws SecurityException * @throws SecurityException
* if a security manager exists and its * if a security manager exists and its
* <tt>checkPermission</tt> method doesn't allow * {@code checkPermission} method doesn't allow
* getting the stack trace of thread. * getting the stack trace of thread.
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
* @see RuntimePermission * @see RuntimePermission
@ -1562,8 +1562,8 @@ class Thread implements Runnable {
/** /**
* Returns a map of stack traces for all live threads. * Returns a map of stack traces for all live threads.
* The map keys are threads and each map value is an array of * The map keys are threads and each map value is an array of
* <tt>StackTraceElement</tt> that represents the stack dump * {@code StackTraceElement} that represents the stack dump
* of the corresponding <tt>Thread</tt>. * of the corresponding {@code Thread}.
* The returned stack traces are in the format specified for * The returned stack traces are in the format specified for
* the {@link #getStackTrace getStackTrace} method. * the {@link #getStackTrace getStackTrace} method.
* *
@ -1574,18 +1574,18 @@ class Thread implements Runnable {
* no stack trace information about a thread. * no stack trace information about a thread.
* *
* <p>If there is a security manager, then the security manager's * <p>If there is a security manager, then the security manager's
* <tt>checkPermission</tt> method is called with a * {@code checkPermission} method is called with a
* <tt>RuntimePermission("getStackTrace")</tt> permission as well as * {@code RuntimePermission("getStackTrace")} permission as well as
* <tt>RuntimePermission("modifyThreadGroup")</tt> permission * {@code RuntimePermission("modifyThreadGroup")} permission
* to see if it is ok to get the stack trace of all threads. * to see if it is ok to get the stack trace of all threads.
* *
* @return a <tt>Map</tt> from <tt>Thread</tt> to an array of * @return a {@code Map} from {@code Thread} to an array of
* <tt>StackTraceElement</tt> that represents the stack trace of * {@code StackTraceElement} that represents the stack trace of
* the corresponding thread. * the corresponding thread.
* *
* @throws SecurityException * @throws SecurityException
* if a security manager exists and its * if a security manager exists and its
* <tt>checkPermission</tt> method doesn't allow * {@code checkPermission} method doesn't allow
* getting the stack trace of thread. * getting the stack trace of thread.
* @see #getStackTrace * @see #getStackTrace
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
@ -1693,7 +1693,7 @@ class Thread implements Runnable {
/** /**
* Returns the identifier of this Thread. The thread ID is a positive * Returns the identifier of this Thread. The thread ID is a positive
* <tt>long</tt> number generated when this thread was created. * {@code long} number generated when this thread was created.
* The thread ID is unique and remains unchanged during its lifetime. * The thread ID is unique and remains unchanged during its lifetime.
* When a thread is terminated, this thread ID may be reused. * When a thread is terminated, this thread ID may be reused.
* *
@ -1774,10 +1774,10 @@ class Thread implements Runnable {
* <p>A thread in the waiting state is waiting for another thread to * <p>A thread in the waiting state is waiting for another thread to
* perform a particular action. * perform a particular action.
* *
* For example, a thread that has called <tt>Object.wait()</tt> * For example, a thread that has called {@code Object.wait()}
* on an object is waiting for another thread to call * on an object is waiting for another thread to call
* <tt>Object.notify()</tt> or <tt>Object.notifyAll()</tt> on * {@code Object.notify()} or {@code Object.notifyAll()} on
* that object. A thread that has called <tt>Thread.join()</tt> * that object. A thread that has called {@code Thread.join()}
* is waiting for a specified thread to terminate. * is waiting for a specified thread to terminate.
*/ */
WAITING, WAITING,
@ -1819,17 +1819,17 @@ class Thread implements Runnable {
// Added in JSR-166 // Added in JSR-166
/** /**
* Interface for handlers invoked when a <tt>Thread</tt> abruptly * Interface for handlers invoked when a {@code Thread} abruptly
* terminates due to an uncaught exception. * terminates due to an uncaught exception.
* <p>When a thread is about to terminate due to an uncaught exception * <p>When a thread is about to terminate due to an uncaught exception
* the Java Virtual Machine will query the thread for its * the Java Virtual Machine will query the thread for its
* <tt>UncaughtExceptionHandler</tt> using * {@code UncaughtExceptionHandler} using
* {@link #getUncaughtExceptionHandler} and will invoke the handler's * {@link #getUncaughtExceptionHandler} and will invoke the handler's
* <tt>uncaughtException</tt> method, passing the thread and the * {@code uncaughtException} method, passing the thread and the
* exception as arguments. * exception as arguments.
* If a thread has not had its <tt>UncaughtExceptionHandler</tt> * If a thread has not had its {@code UncaughtExceptionHandler}
* explicitly set, then its <tt>ThreadGroup</tt> object acts as its * explicitly set, then its {@code ThreadGroup} object acts as its
* <tt>UncaughtExceptionHandler</tt>. If the <tt>ThreadGroup</tt> object * {@code UncaughtExceptionHandler}. If the {@code ThreadGroup} object
* has no * has no
* special requirements for dealing with the exception, it can forward * special requirements for dealing with the exception, it can forward
* the invocation to the {@linkplain #getDefaultUncaughtExceptionHandler * the invocation to the {@linkplain #getDefaultUncaughtExceptionHandler
@ -1869,8 +1869,8 @@ class Thread implements Runnable {
* uncaught exception handler. If the thread does not have an explicit * uncaught exception handler. If the thread does not have an explicit
* uncaught exception handler set, and the thread's thread group * uncaught exception handler set, and the thread's thread group
* (including parent thread groups) does not specialize its * (including parent thread groups) does not specialize its
* <tt>uncaughtException</tt> method, then the default handler's * {@code uncaughtException} method, then the default handler's
* <tt>uncaughtException</tt> method will be invoked. * {@code uncaughtException} method will be invoked.
* <p>By setting the default uncaught exception handler, an application * <p>By setting the default uncaught exception handler, an application
* can change the way in which uncaught exceptions are handled (such as * can change the way in which uncaught exceptions are handled (such as
* logging to a specific device, or file) for those threads that would * logging to a specific device, or file) for those threads that would
@ -1878,15 +1878,14 @@ class Thread implements Runnable {
* provided. * provided.
* *
* <p>Note that the default uncaught exception handler should not usually * <p>Note that the default uncaught exception handler should not usually
* defer to the thread's <tt>ThreadGroup</tt> object, as that could cause * defer to the thread's {@code ThreadGroup} object, as that could cause
* infinite recursion. * infinite recursion.
* *
* @param eh the object to use as the default uncaught exception handler. * @param eh the object to use as the default uncaught exception handler.
* If <tt>null</tt> then there is no default handler. * If {@code null} then there is no default handler.
* *
* @throws SecurityException if a security manager is present and it * @throws SecurityException if a security manager is present and it denies
* denies <tt>{@link RuntimePermission} * {@link RuntimePermission}{@code ("setDefaultUncaughtExceptionHandler")}
* (&quot;setDefaultUncaughtExceptionHandler&quot;)</tt>
* *
* @see #setUncaughtExceptionHandler * @see #setUncaughtExceptionHandler
* @see #getUncaughtExceptionHandler * @see #getUncaughtExceptionHandler
@ -1906,7 +1905,7 @@ class Thread implements Runnable {
/** /**
* Returns the default handler invoked when a thread abruptly terminates * Returns the default handler invoked when a thread abruptly terminates
* due to an uncaught exception. If the returned value is <tt>null</tt>, * due to an uncaught exception. If the returned value is {@code null},
* there is no default. * there is no default.
* @since 1.5 * @since 1.5
* @see #setDefaultUncaughtExceptionHandler * @see #setDefaultUncaughtExceptionHandler
@ -1920,8 +1919,8 @@ class Thread implements Runnable {
* Returns the handler invoked when this thread abruptly terminates * Returns the handler invoked when this thread abruptly terminates
* due to an uncaught exception. If this thread has not had an * due to an uncaught exception. If this thread has not had an
* uncaught exception handler explicitly set then this thread's * uncaught exception handler explicitly set then this thread's
* <tt>ThreadGroup</tt> object is returned, unless this thread * {@code ThreadGroup} object is returned, unless this thread
* has terminated, in which case <tt>null</tt> is returned. * has terminated, in which case {@code null} is returned.
* @since 1.5 * @since 1.5
* @return the uncaught exception handler for this thread * @return the uncaught exception handler for this thread
*/ */
@ -1935,10 +1934,10 @@ class Thread implements Runnable {
* due to an uncaught exception. * due to an uncaught exception.
* <p>A thread can take full control of how it responds to uncaught * <p>A thread can take full control of how it responds to uncaught
* exceptions by having its uncaught exception handler explicitly set. * exceptions by having its uncaught exception handler explicitly set.
* If no such handler is set then the thread's <tt>ThreadGroup</tt> * If no such handler is set then the thread's {@code ThreadGroup}
* object acts as its handler. * object acts as its handler.
* @param eh the object to use as this thread's uncaught exception * @param eh the object to use as this thread's uncaught exception
* handler. If <tt>null</tt> then this thread has no explicit handler. * handler. If {@code null} then this thread has no explicit handler.
* @throws SecurityException if the current thread is not allowed to * @throws SecurityException if the current thread is not allowed to
* modify this thread. * modify this thread.
* @see #setDefaultUncaughtExceptionHandler * @see #setDefaultUncaughtExceptionHandler

View file

@ -728,7 +728,7 @@ class ThreadGroup implements Thread.UncaughtExceptionHandler {
* @see java.lang.ThreadGroup#checkAccess() * @see java.lang.ThreadGroup#checkAccess()
* @since 1.0 * @since 1.0
* @deprecated This method is used solely in conjunction with * @deprecated This method is used solely in conjunction with
* <tt>Thread.suspend</tt> and <tt>ThreadGroup.suspend</tt>, * {@code Thread.suspend} and {@code ThreadGroup.suspend},
* both of which have been deprecated, as they are inherently * both of which have been deprecated, as they are inherently
* deadlock-prone. See {@link Thread#suspend} for details. * deadlock-prone. See {@link Thread#suspend} for details.
*/ */

View file

@ -29,7 +29,7 @@ package java.lang;
* Thrown when an application tries to access a type using a string * Thrown when an application tries to access a type using a string
* representing the type's name, but no definition for the type with * representing the type's name, but no definition for the type with
* the specified name can be found. This exception differs from * the specified name can be found. This exception differs from
* {@link ClassNotFoundException} in that <tt>ClassNotFoundException</tt> is a * {@link ClassNotFoundException} in that {@code ClassNotFoundException} is a
* checked exception, whereas this exception is unchecked. * checked exception, whereas this exception is unchecked.
* *
* <p>Note that this exception may be used when undefined type variables * <p>Note that this exception may be used when undefined type variables
@ -49,12 +49,12 @@ public class TypeNotPresentException extends RuntimeException {
private String typeName; private String typeName;
/** /**
* Constructs a <tt>TypeNotPresentException</tt> for the named type * Constructs a {@code TypeNotPresentException} for the named type
* with the specified cause. * with the specified cause.
* *
* @param typeName the fully qualified name of the unavailable type * @param typeName the fully qualified name of the unavailable type
* @param cause the exception that was thrown when the system attempted to * @param cause the exception that was thrown when the system attempted to
* load the named type, or <tt>null</tt> if unavailable or inapplicable * load the named type, or {@code null} if unavailable or inapplicable
*/ */
public TypeNotPresentException(String typeName, Throwable cause) { public TypeNotPresentException(String typeName, Throwable cause) {
super("Type " + typeName + " not present", cause); super("Type " + typeName + " not present", cause);

View file

@ -63,7 +63,7 @@ public class UnsupportedOperationException extends RuntimeException {
* @param message the detail message (which is saved for later retrieval * @param message the detail message (which is saved for later retrieval
* by the {@link Throwable#getMessage()} method). * by the {@link Throwable#getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link Throwable#getCause()} method). (A <tt>null</tt> value * {@link Throwable#getCause()} method). (A {@code null} value
* is permitted, and indicates that the cause is nonexistent or * is permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.5 * @since 1.5
@ -74,14 +74,14 @@ public class UnsupportedOperationException extends RuntimeException {
/** /**
* Constructs a new exception with the specified cause and a detail * Constructs a new exception with the specified cause and a detail
* message of <tt>(cause==null ? null : cause.toString())</tt> (which * message of {@code (cause==null ? null : cause.toString())} (which
* typically contains the class and detail message of <tt>cause</tt>). * typically contains the class and detail message of {@code cause}).
* This constructor is useful for exceptions that are little more than * This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link * wrappers for other throwables (for example, {@link
* java.security.PrivilegedActionException}). * java.security.PrivilegedActionException}).
* *
* @param cause the cause (which is saved for later retrieval by the * @param cause the cause (which is saved for later retrieval by the
* {@link Throwable#getCause()} method). (A <tt>null</tt> value is * {@link Throwable#getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or * permitted, and indicates that the cause is nonexistent or
* unknown.) * unknown.)
* @since 1.5 * @since 1.5

View file

@ -50,28 +50,28 @@ public interface Annotation {
* to the corresponding member of this annotation, as defined below: * to the corresponding member of this annotation, as defined below:
* <ul> * <ul>
* <li>Two corresponding primitive typed members whose values are * <li>Two corresponding primitive typed members whose values are
* <tt>x</tt> and <tt>y</tt> are considered equal if <tt>x == y</tt>, * {@code x} and {@code y} are considered equal if {@code x == y},
* unless their type is <tt>float</tt> or <tt>double</tt>. * unless their type is {@code float} or {@code double}.
* *
* <li>Two corresponding <tt>float</tt> members whose values * <li>Two corresponding {@code float} members whose values
* are <tt>x</tt> and <tt>y</tt> are considered equal if * are {@code x} and {@code y} are considered equal if
* <tt>Float.valueOf(x).equals(Float.valueOf(y))</tt>. * {@code Float.valueOf(x).equals(Float.valueOf(y))}.
* (Unlike the <tt>==</tt> operator, NaN is considered equal * (Unlike the {@code ==} operator, NaN is considered equal
* to itself, and <tt>0.0f</tt> unequal to <tt>-0.0f</tt>.) * to itself, and {@code 0.0f} unequal to {@code -0.0f}.)
* *
* <li>Two corresponding <tt>double</tt> members whose values * <li>Two corresponding {@code double} members whose values
* are <tt>x</tt> and <tt>y</tt> are considered equal if * are {@code x} and {@code y} are considered equal if
* <tt>Double.valueOf(x).equals(Double.valueOf(y))</tt>. * {@code Double.valueOf(x).equals(Double.valueOf(y))}.
* (Unlike the <tt>==</tt> operator, NaN is considered equal * (Unlike the {@code ==} operator, NaN is considered equal
* to itself, and <tt>0.0</tt> unequal to <tt>-0.0</tt>.) * to itself, and {@code 0.0} unequal to {@code -0.0}.)
* *
* <li>Two corresponding <tt>String</tt>, <tt>Class</tt>, enum, or * <li>Two corresponding {@code String}, {@code Class}, enum, or
* annotation typed members whose values are <tt>x</tt> and <tt>y</tt> * annotation typed members whose values are {@code x} and {@code y}
* are considered equal if <tt>x.equals(y)</tt>. (Note that this * are considered equal if {@code x.equals(y)}. (Note that this
* definition is recursive for annotation typed members.) * definition is recursive for annotation typed members.)
* *
* <li>Two corresponding array typed members <tt>x</tt> and <tt>y</tt> * <li>Two corresponding array typed members {@code x} and {@code y}
* are considered equal if <tt>Arrays.equals(x, y)</tt>, for the * are considered equal if {@code Arrays.equals(x, y)}, for the
* appropriate overloading of {@link java.util.Arrays#equals}. * appropriate overloading of {@link java.util.Arrays#equals}.
* </ul> * </ul>
* *
@ -93,16 +93,16 @@ public interface Annotation {
* *
* <p>The hash code of a member-value depends on its type: * <p>The hash code of a member-value depends on its type:
* <ul> * <ul>
* <li>The hash code of a primitive value <tt><i>v</i></tt> is equal to * <li>The hash code of a primitive value <i>{@code v}</i> is equal to
* <tt><i>WrapperType</i>.valueOf(<i>v</i>).hashCode()</tt>, where * <code><i>WrapperType</i>.valueOf(<i>v</i>).hashCode()</code>, where
* <tt><i>WrapperType</i></tt> is the wrapper type corresponding * <i>{@code WrapperType}</i> is the wrapper type corresponding
* to the primitive type of <tt><i>v</i></tt> ({@link Byte}, * to the primitive type of <i>{@code v}</i> ({@link Byte},
* {@link Character}, {@link Double}, {@link Float}, {@link Integer}, * {@link Character}, {@link Double}, {@link Float}, {@link Integer},
* {@link Long}, {@link Short}, or {@link Boolean}). * {@link Long}, {@link Short}, or {@link Boolean}).
* *
* <li>The hash code of a string, enum, class, or annotation member-value * <li>The hash code of a string, enum, class, or annotation member-value
I <tt><i>v</i></tt> is computed as by calling I <i>{@code v}</i> is computed as by calling
* <tt><i>v</i>.hashCode()</tt>. (In the case of annotation * <code><i>v</i>.hashCode()</code>. (In the case of annotation
* member values, this is a recursive definition.) * member values, this is a recursive definition.)
* *
* <li>The hash code of an array member-value is computed by calling * <li>The hash code of an array member-value is computed by calling

View file

@ -40,7 +40,7 @@ public class AnnotationFormatError extends Error {
private static final long serialVersionUID = -4256701562333669892L; private static final long serialVersionUID = -4256701562333669892L;
/** /**
* Constructs a new <tt>AnnotationFormatError</tt> with the specified * Constructs a new {@code AnnotationFormatError} with the specified
* detail message. * detail message.
* *
* @param message the detail message. * @param message the detail message.
@ -50,13 +50,13 @@ public class AnnotationFormatError extends Error {
} }
/** /**
* Constructs a new <tt>AnnotationFormatError</tt> with the specified * Constructs a new {@code AnnotationFormatError} with the specified
* detail message and cause. Note that the detail message associated * detail message and cause. Note that the detail message associated
* with <code>cause</code> is <i>not</i> automatically incorporated in * with {@code cause} is <i>not</i> automatically incorporated in
* this error's detail message. * this error's detail message.
* *
* @param message the detail message * @param message the detail message
* @param cause the cause (A <tt>null</tt> value is permitted, and * @param cause the cause (A {@code null} value is permitted, and
* indicates that the cause is nonexistent or unknown.) * indicates that the cause is nonexistent or unknown.)
*/ */
public AnnotationFormatError(String message, Throwable cause) { public AnnotationFormatError(String message, Throwable cause) {
@ -65,12 +65,12 @@ public class AnnotationFormatError extends Error {
/** /**
* Constructs a new <tt>AnnotationFormatError</tt> with the specified * Constructs a new {@code AnnotationFormatError} with the specified
* cause and a detail message of * cause and a detail message of
* <tt>(cause == null ? null : cause.toString())</tt> (which * {@code (cause == null ? null : cause.toString())} (which
* typically contains the class and detail message of <tt>cause</tt>). * typically contains the class and detail message of {@code cause}).
* *
* @param cause the cause (A <tt>null</tt> value is permitted, and * @param cause the cause (A {@code null} value is permitted, and
* indicates that the cause is nonexistent or unknown.) * indicates that the cause is nonexistent or unknown.)
*/ */
public AnnotationFormatError(Throwable cause) { public AnnotationFormatError(Throwable cause) {

View file

@ -42,7 +42,7 @@ public class AnnotationTypeMismatchException extends RuntimeException {
private static final long serialVersionUID = 8125925355765570191L; private static final long serialVersionUID = 8125925355765570191L;
/** /**
* The <tt>Method</tt> object for the annotation element. * The {@code Method} object for the annotation element.
*/ */
private final Method element; private final Method element;
@ -57,7 +57,7 @@ public class AnnotationTypeMismatchException extends RuntimeException {
* Constructs an AnnotationTypeMismatchException for the specified * Constructs an AnnotationTypeMismatchException for the specified
* annotation type element and found data type. * annotation type element and found data type.
* *
* @param element the <tt>Method</tt> object for the annotation element * @param element the {@code Method} object for the annotation element
* @param foundType the (erroneous) type of data found in the annotation. * @param foundType the (erroneous) type of data found in the annotation.
* This string may, but is not required to, contain the value * This string may, but is not required to, contain the value
* as well. The exact format of the string is unspecified. * as well. The exact format of the string is unspecified.
@ -70,9 +70,9 @@ public class AnnotationTypeMismatchException extends RuntimeException {
} }
/** /**
* Returns the <tt>Method</tt> object for the incorrectly typed element. * Returns the {@code Method} object for the incorrectly typed element.
* *
* @return the <tt>Method</tt> object for the incorrectly typed element * @return the {@code Method} object for the incorrectly typed element
*/ */
public Method element() { public Method element() {
return this.element; return this.element;

View file

@ -746,7 +746,7 @@ class MethodType implements java.io.Serializable {
/** /**
* Compares the specified object with this type for equality. * Compares the specified object with this type for equality.
* That is, it returns <tt>true</tt> if and only if the specified object * That is, it returns {@code true} if and only if the specified object
* is also a method type with exactly the same parameters and return type. * is also a method type with exactly the same parameters and return type.
* @param x object to compare * @param x object to compare
* @see Object#equals(Object) * @see Object#equals(Object)

View file

@ -38,8 +38,8 @@ package java.lang.ref;
* time or at some later time it will enqueue the reference. * time or at some later time it will enqueue the reference.
* *
* <p> In order to ensure that a reclaimable object remains so, the referent of * <p> In order to ensure that a reclaimable object remains so, the referent of
* a phantom reference may not be retrieved: The <code>get</code> method of a * a phantom reference may not be retrieved: The {@code get} method of a
* phantom reference always returns <code>null</code>. * phantom reference always returns {@code null}.
* *
* <p> Unlike soft and weak references, phantom references are not * <p> Unlike soft and weak references, phantom references are not
* automatically cleared by the garbage collector as they are enqueued. An * automatically cleared by the garbage collector as they are enqueued. An
@ -55,9 +55,9 @@ public class PhantomReference<T> extends Reference<T> {
/** /**
* Returns this reference object's referent. Because the referent of a * Returns this reference object's referent. Because the referent of a
* phantom reference is always inaccessible, this method always returns * phantom reference is always inaccessible, this method always returns
* <code>null</code>. * {@code null}.
* *
* @return <code>null</code> * @return {@code null}
*/ */
public T get() { public T get() {
return null; return null;
@ -67,14 +67,14 @@ public class PhantomReference<T> extends Reference<T> {
* Creates a new phantom reference that refers to the given object and * Creates a new phantom reference that refers to the given object and
* is registered with the given queue. * is registered with the given queue.
* *
* <p> It is possible to create a phantom reference with a <tt>null</tt> * <p> It is possible to create a phantom reference with a {@code null}
* queue, but such a reference is completely useless: Its <tt>get</tt> * queue, but such a reference is completely useless: Its {@code get}
* method will always return null and, since it does not have a queue, it * method will always return null and, since it does not have a queue, it
* will never be enqueued. * will never be enqueued.
* *
* @param referent the object the new phantom reference will refer to * @param referent the object the new phantom reference will refer to
* @param q the queue with which the reference is to be registered, * @param q the queue with which the reference is to be registered,
* or <tt>null</tt> if registration is not required * or {@code null} if registration is not required
*/ */
public PhantomReference(T referent, ReferenceQueue<? super T> q) { public PhantomReference(T referent, ReferenceQueue<? super T> q) {
super(referent, q); super(referent, q);

View file

@ -96,10 +96,10 @@ public class ReferenceQueue<T> {
/** /**
* Polls this queue to see if a reference object is available. If one is * Polls this queue to see if a reference object is available. If one is
* available without further delay then it is removed from the queue and * available without further delay then it is removed from the queue and
* returned. Otherwise this method immediately returns <tt>null</tt>. * returned. Otherwise this method immediately returns {@code null}.
* *
* @return A reference object, if one was immediately available, * @return A reference object, if one was immediately available,
* otherwise <code>null</code> * otherwise {@code null}
*/ */
public Reference<? extends T> poll() { public Reference<? extends T> poll() {
if (head == null) if (head == null)
@ -116,12 +116,12 @@ public class ReferenceQueue<T> {
* <p> This method does not offer real-time guarantees: It schedules the * <p> This method does not offer real-time guarantees: It schedules the
* timeout as if by invoking the {@link Object#wait(long)} method. * timeout as if by invoking the {@link Object#wait(long)} method.
* *
* @param timeout If positive, block for up to <code>timeout</code> * @param timeout If positive, block for up to {@code timeout}
* milliseconds while waiting for a reference to be * milliseconds while waiting for a reference to be
* added to this queue. If zero, block indefinitely. * added to this queue. If zero, block indefinitely.
* *
* @return A reference object, if one was available within the specified * @return A reference object, if one was available within the specified
* timeout period, otherwise <code>null</code> * timeout period, otherwise {@code null}
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the value of the timeout argument is negative * If the value of the timeout argument is negative

View file

@ -42,7 +42,7 @@ package java.lang.ref;
* *
* <p> All soft references to softly-reachable objects are guaranteed to have * <p> All soft references to softly-reachable objects are guaranteed to have
* been cleared before the virtual machine throws an * been cleared before the virtual machine throws an
* <code>OutOfMemoryError</code>. Otherwise no constraints are placed upon the * {@code OutOfMemoryError}. Otherwise no constraints are placed upon the
* time at which a soft reference will be cleared or the order in which a set * time at which a soft reference will be cleared or the order in which a set
* of such references to different objects will be cleared. Virtual machine * of such references to different objects will be cleared. Virtual machine
* implementations are, however, encouraged to bias against clearing * implementations are, however, encouraged to bias against clearing
@ -92,7 +92,7 @@ public class SoftReference<T> extends Reference<T> {
* *
* @param referent object the new soft reference will refer to * @param referent object the new soft reference will refer to
* @param q the queue with which the reference is to be registered, * @param q the queue with which the reference is to be registered,
* or <tt>null</tt> if registration is not required * or {@code null} if registration is not required
* *
*/ */
public SoftReference(T referent, ReferenceQueue<? super T> q) { public SoftReference(T referent, ReferenceQueue<? super T> q) {
@ -103,10 +103,10 @@ public class SoftReference<T> extends Reference<T> {
/** /**
* Returns this reference object's referent. If this reference object has * Returns this reference object's referent. If this reference object has
* been cleared, either by the program or by the garbage collector, then * been cleared, either by the program or by the garbage collector, then
* this method returns <code>null</code>. * this method returns {@code null}.
* *
* @return The object to which this reference refers, or * @return The object to which this reference refers, or
* <code>null</code> if this reference object has been cleared * {@code null} if this reference object has been cleared
*/ */
public T get() { public T get() {
T o = super.get(); T o = super.get();

View file

@ -63,7 +63,7 @@ public class WeakReference<T> extends Reference<T> {
* *
* @param referent object the new weak reference will refer to * @param referent object the new weak reference will refer to
* @param q the queue with which the reference is to be registered, * @param q the queue with which the reference is to be registered,
* or <tt>null</tt> if registration is not required * or {@code null} if registration is not required
*/ */
public WeakReference(T referent, ReferenceQueue<? super T> q) { public WeakReference(T referent, ReferenceQueue<? super T> q) {
super(referent, q); super(referent, q);

View file

@ -286,9 +286,9 @@ public final class Constructor<T> extends Executable {
* followed by the fully-qualified name of the declaring class, * followed by the fully-qualified name of the declaring class,
* followed by a parenthesized, comma-separated list of the * followed by a parenthesized, comma-separated list of the
* constructor's formal parameter types. For example: * constructor's formal parameter types. For example:
* <pre> * <pre>{@code
* public java.util.Hashtable(int,float) * public java.util.Hashtable(int,float)
* </pre> * }</pre>
* *
* <p>The only possible modifiers for constructors are the access * <p>The only possible modifiers for constructors are the access
* modifiers {@code public}, {@code protected} or * modifiers {@code public}, {@code protected} or
@ -322,8 +322,8 @@ public final class Constructor<T> extends Executable {
* *
* If this constructor was declared to take a variable number of * If this constructor was declared to take a variable number of
* arguments, instead of denoting the last parameter as * arguments, instead of denoting the last parameter as
* "<tt><i>Type</i>[]</tt>", it is denoted as * "<code><i>Type</i>[]</code>", it is denoted as
* "<tt><i>Type</i>...</tt>". * "<code><i>Type</i>...</code>".
* *
* A space is used to separate access modifiers from one another * A space is used to separate access modifiers from one another
* and from the type parameters or return type. If there are no * and from the type parameters or return type. If there are no

View file

@ -387,8 +387,8 @@ public final class Method extends Executable {
* *
* If this method was declared to take a variable number of * If this method was declared to take a variable number of
* arguments, instead of denoting the last parameter as * arguments, instead of denoting the last parameter as
* "<tt><i>Type</i>[]</tt>", it is denoted as * "<code><i>Type</i>[]</code>", it is denoted as
* "<tt><i>Type</i>...</tt>". * "<code><i>Type</i>...</code>".
* *
* A space is used to separate access modifiers from one another * A space is used to separate access modifiers from one another
* and from the type parameters or return type. If there are no * and from the type parameters or return type. If there are no

View file

@ -40,7 +40,7 @@ import java.util.Arrays;
* decimal point. If negative, the unscaled value of the number is * decimal point. If negative, the unscaled value of the number is
* multiplied by ten to the power of the negation of the scale. The * multiplied by ten to the power of the negation of the scale. The
* value of the number represented by the {@code BigDecimal} is * value of the number represented by the {@code BigDecimal} is
* therefore <tt>(unscaledValue &times; 10<sup>-scale</sup>)</tt>. * therefore <code>(unscaledValue &times; 10<sup>-scale</sup>)</code>.
* *
* <p>The {@code BigDecimal} class provides operations for * <p>The {@code BigDecimal} class provides operations for
* arithmetic, scale manipulation, rounding, comparison, hashing, and * arithmetic, scale manipulation, rounding, comparison, hashing, and
@ -709,8 +709,8 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
/** /**
* Translates the string representation of a {@code BigDecimal} * Translates the string representation of a {@code BigDecimal}
* into a {@code BigDecimal}. The string representation consists * into a {@code BigDecimal}. The string representation consists
* of an optional sign, {@code '+'} (<tt> '&#92;u002B'</tt>) or * of an optional sign, {@code '+'} (<code> '&#92;u002B'</code>) or
* {@code '-'} (<tt>'&#92;u002D'</tt>), followed by a sequence of * {@code '-'} (<code>'&#92;u002D'</code>), followed by a sequence of
* zero or more decimal digits ("the integer"), optionally * zero or more decimal digits ("the integer"), optionally
* followed by a fraction, optionally followed by an exponent. * followed by a fraction, optionally followed by an exponent.
* *
@ -721,7 +721,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* <i>significand</i>. * <i>significand</i>.
* *
* <p>The exponent consists of the character {@code 'e'} * <p>The exponent consists of the character {@code 'e'}
* (<tt>'&#92;u0065'</tt>) or {@code 'E'} (<tt>'&#92;u0045'</tt>) * (<code>'&#92;u0065'</code>) or {@code 'E'} (<code>'&#92;u0045'</code>)
* followed by one or more decimal digits. The value of the * followed by one or more decimal digits. The value of the
* exponent must lie between -{@link Integer#MAX_VALUE} ({@link * exponent must lie between -{@link Integer#MAX_VALUE} ({@link
* Integer#MIN_VALUE}+1) and {@link Integer#MAX_VALUE}, inclusive. * Integer#MIN_VALUE}+1) and {@link Integer#MAX_VALUE}, inclusive.
@ -834,7 +834,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* is the exact decimal representation of the {@code double}'s * is the exact decimal representation of the {@code double}'s
* binary floating-point value. The scale of the returned * binary floating-point value. The scale of the returned
* {@code BigDecimal} is the smallest value such that * {@code BigDecimal} is the smallest value such that
* <tt>(10<sup>scale</sup> &times; val)</tt> is an integer. * <code>(10<sup>scale</sup> &times; val)</code> is an integer.
* <p> * <p>
* <b>Notes:</b> * <b>Notes:</b>
* <ol> * <ol>
@ -857,7 +857,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* creates a {@code BigDecimal} which is <i>exactly</i> equal to * creates a {@code BigDecimal} which is <i>exactly</i> equal to
* 0.1, as one would expect. Therefore, it is generally * 0.1, as one would expect. Therefore, it is generally
* recommended that the {@linkplain #BigDecimal(String) * recommended that the {@linkplain #BigDecimal(String)
* <tt>String</tt> constructor} be used in preference to this one. * String constructor} be used in preference to this one.
* *
* <li> * <li>
* When a {@code double} must be used as a source for a * When a {@code double} must be used as a source for a
@ -881,7 +881,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* Translates a {@code double} into a {@code BigDecimal}, with * Translates a {@code double} into a {@code BigDecimal}, with
* rounding according to the context settings. The scale of the * rounding according to the context settings. The scale of the
* {@code BigDecimal} is the smallest value such that * {@code BigDecimal} is the smallest value such that
* <tt>(10<sup>scale</sup> &times; val)</tt> is an integer. * <code>(10<sup>scale</sup> &times; val)</code> is an integer.
* *
* <p>The results of this constructor can be somewhat unpredictable * <p>The results of this constructor can be somewhat unpredictable
* and its use is generally not recommended; see the notes under * and its use is generally not recommended; see the notes under
@ -1010,7 +1010,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* Translates a {@code BigInteger} unscaled value and an * Translates a {@code BigInteger} unscaled value and an
* {@code int} scale into a {@code BigDecimal}. The value of * {@code int} scale into a {@code BigDecimal}. The value of
* the {@code BigDecimal} is * the {@code BigDecimal} is
* <tt>(unscaledVal &times; 10<sup>-scale</sup>)</tt>. * <code>(unscaledVal &times; 10<sup>-scale</sup>)</code>.
* *
* @param unscaledVal unscaled value of the {@code BigDecimal}. * @param unscaledVal unscaled value of the {@code BigDecimal}.
* @param scale scale of the {@code BigDecimal}. * @param scale scale of the {@code BigDecimal}.
@ -1026,8 +1026,8 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* Translates a {@code BigInteger} unscaled value and an * Translates a {@code BigInteger} unscaled value and an
* {@code int} scale into a {@code BigDecimal}, with rounding * {@code int} scale into a {@code BigDecimal}, with rounding
* according to the context settings. The value of the * according to the context settings. The value of the
* {@code BigDecimal} is <tt>(unscaledVal &times; * {@code BigDecimal} is <code>(unscaledVal &times;
* 10<sup>-scale</sup>)</tt>, rounded according to the * 10<sup>-scale</sup>)</code>, rounded according to the
* {@code precision} and rounding mode settings. * {@code precision} and rounding mode settings.
* *
* @param unscaledVal unscaled value of the {@code BigDecimal}. * @param unscaledVal unscaled value of the {@code BigDecimal}.
@ -1196,7 +1196,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* @param unscaledVal unscaled value of the {@code BigDecimal}. * @param unscaledVal unscaled value of the {@code BigDecimal}.
* @param scale scale of the {@code BigDecimal}. * @param scale scale of the {@code BigDecimal}.
* @return a {@code BigDecimal} whose value is * @return a {@code BigDecimal} whose value is
* <tt>(unscaledVal &times; 10<sup>-scale</sup>)</tt>. * <code>(unscaledVal &times; 10<sup>-scale</sup>)</code>.
*/ */
public static BigDecimal valueOf(long unscaledVal, int scale) { public static BigDecimal valueOf(long unscaledVal, int scale) {
if (scale == 0) if (scale == 0)
@ -1476,8 +1476,8 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
} }
/** /**
* Returns a {@code BigDecimal} whose value is <tt>(this &times; * Returns a {@code BigDecimal} whose value is <code>(this &times;
* multiplicand)</tt>, and whose scale is {@code (this.scale() + * multiplicand)</code>, and whose scale is {@code (this.scale() +
* multiplicand.scale())}. * multiplicand.scale())}.
* *
* @param multiplicand value to be multiplied by this {@code BigDecimal}. * @param multiplicand value to be multiplied by this {@code BigDecimal}.
@ -1501,8 +1501,8 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
} }
/** /**
* Returns a {@code BigDecimal} whose value is <tt>(this &times; * Returns a {@code BigDecimal} whose value is <code>(this &times;
* multiplicand)</tt>, with rounding according to the context settings. * multiplicand)</code>, with rounding according to the context settings.
* *
* @param multiplicand value to be multiplied by this {@code BigDecimal}. * @param multiplicand value to be multiplied by this {@code BigDecimal}.
* @param mc the context to use. * @param mc the context to use.
@ -1995,7 +1995,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
/** /**
* Returns a {@code BigDecimal} whose value is * Returns a {@code BigDecimal} whose value is
* <tt>(this<sup>n</sup>)</tt>, The power is computed exactly, to * <code>(this<sup>n</sup>)</code>, The power is computed exactly, to
* unlimited precision. * unlimited precision.
* *
* <p>The parameter {@code n} must be in the range 0 through * <p>The parameter {@code n} must be in the range 0 through
@ -2006,7 +2006,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* range of this method. * range of this method.
* *
* @param n power to raise this {@code BigDecimal} to. * @param n power to raise this {@code BigDecimal} to.
* @return <tt>this<sup>n</sup></tt> * @return <code>this<sup>n</sup></code>
* @throws ArithmeticException if {@code n} is out of range. * @throws ArithmeticException if {@code n} is out of range.
* @since 1.5 * @since 1.5
*/ */
@ -2022,7 +2022,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
/** /**
* Returns a {@code BigDecimal} whose value is * Returns a {@code BigDecimal} whose value is
* <tt>(this<sup>n</sup>)</tt>. The current implementation uses * <code>(this<sup>n</sup>)</code>. The current implementation uses
* the core algorithm defined in ANSI standard X3.274-1996 with * the core algorithm defined in ANSI standard X3.274-1996 with
* rounding according to the context settings. In general, the * rounding according to the context settings. In general, the
* returned numerical value is within two ulps of the exact * returned numerical value is within two ulps of the exact
@ -2063,7 +2063,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* *
* @param n power to raise this {@code BigDecimal} to. * @param n power to raise this {@code BigDecimal} to.
* @param mc the context to use. * @param mc the context to use.
* @return <tt>this<sup>n</sup></tt> using the ANSI standard X3.274-1996 * @return <code>this<sup>n</sup></code> using the ANSI standard X3.274-1996
* algorithm * algorithm
* @throws ArithmeticException if the result is inexact but the * @throws ArithmeticException if the result is inexact but the
* rounding mode is {@code UNNECESSARY}, or {@code n} is out * rounding mode is {@code UNNECESSARY}, or {@code n} is out
@ -2251,8 +2251,8 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
/** /**
* Returns a {@code BigInteger} whose value is the <i>unscaled * Returns a {@code BigInteger} whose value is the <i>unscaled
* value</i> of this {@code BigDecimal}. (Computes <tt>(this * * value</i> of this {@code BigDecimal}. (Computes <code>(this *
* 10<sup>this.scale()</sup>)</tt>.) * 10<sup>this.scale()</sup>)</code>.)
* *
* @return the unscaled value of this {@code BigDecimal}. * @return the unscaled value of this {@code BigDecimal}.
* @since 1.2 * @since 1.2
@ -2371,7 +2371,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* <p>Note that since BigDecimal objects are immutable, calls of * <p>Note that since BigDecimal objects are immutable, calls of
* this method do <i>not</i> result in the original object being * this method do <i>not</i> result in the original object being
* modified, contrary to the usual convention of having methods * modified, contrary to the usual convention of having methods
* named <tt>set<i>X</i></tt> mutate field <i>{@code X}</i>. * named <code>set<i>X</i></code> mutate field <i>{@code X}</i>.
* Instead, {@code setScale} returns an object with the proper * Instead, {@code setScale} returns an object with the proper
* scale; the returned object may or may not be newly allocated. * scale; the returned object may or may not be newly allocated.
* *
@ -2404,7 +2404,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* <p>Note that since BigDecimal objects are immutable, calls of * <p>Note that since BigDecimal objects are immutable, calls of
* this method do <i>not</i> result in the original object being * this method do <i>not</i> result in the original object being
* modified, contrary to the usual convention of having methods * modified, contrary to the usual convention of having methods
* named <tt>set<i>X</i></tt> mutate field <i>{@code X}</i>. * named <code>set<i>X</i></code> mutate field <i>{@code X}</i>.
* Instead, {@code setScale} returns an object with the proper * Instead, {@code setScale} returns an object with the proper
* scale; the returned object may or may not be newly allocated. * scale; the returned object may or may not be newly allocated.
* *
@ -2498,7 +2498,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* <p>Note that since {@code BigDecimal} objects are immutable, * <p>Note that since {@code BigDecimal} objects are immutable,
* calls of this method do <i>not</i> result in the original * calls of this method do <i>not</i> result in the original
* object being modified, contrary to the usual convention of * object being modified, contrary to the usual convention of
* having methods named <tt>set<i>X</i></tt> mutate field * having methods named <code>set<i>X</i></code> mutate field
* <i>{@code X}</i>. Instead, {@code setScale} returns an * <i>{@code X}</i>. Instead, {@code setScale} returns an
* object with the proper scale; the returned object may or may * object with the proper scale; the returned object may or may
* not be newly allocated. * not be newly allocated.
@ -2525,8 +2525,8 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* {@code n} is non-negative, the call merely adds {@code n} to * {@code n} is non-negative, the call merely adds {@code n} to
* the scale. If {@code n} is negative, the call is equivalent * the scale. If {@code n} is negative, the call is equivalent
* to {@code movePointRight(-n)}. The {@code BigDecimal} * to {@code movePointRight(-n)}. The {@code BigDecimal}
* returned by this call has value <tt>(this &times; * returned by this call has value <code>(this &times;
* 10<sup>-n</sup>)</tt> and scale {@code max(this.scale()+n, * 10<sup>-n</sup>)</code> and scale {@code max(this.scale()+n,
* 0)}. * 0)}.
* *
* @param n number of places to move the decimal point to the left. * @param n number of places to move the decimal point to the left.
@ -2547,8 +2547,8 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* If {@code n} is non-negative, the call merely subtracts * If {@code n} is non-negative, the call merely subtracts
* {@code n} from the scale. If {@code n} is negative, the call * {@code n} from the scale. If {@code n} is negative, the call
* is equivalent to {@code movePointLeft(-n)}. The * is equivalent to {@code movePointLeft(-n)}. The
* {@code BigDecimal} returned by this call has value <tt>(this * {@code BigDecimal} returned by this call has value <code>(this
* &times; 10<sup>n</sup>)</tt> and scale {@code max(this.scale()-n, * &times; 10<sup>n</sup>)</code> and scale {@code max(this.scale()-n,
* 0)}. * 0)}.
* *
* @param n number of places to move the decimal point to the right. * @param n number of places to move the decimal point to the right.
@ -2825,12 +2825,12 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* adjusted exponent converted to a character form. The latter is * adjusted exponent converted to a character form. The latter is
* in base ten, using the characters {@code '0'} through * in base ten, using the characters {@code '0'} through
* {@code '9'} with no leading zeros, and is always prefixed by a * {@code '9'} with no leading zeros, and is always prefixed by a
* sign character {@code '-'} (<tt>'&#92;u002D'</tt>) if the * sign character {@code '-'} (<code>'&#92;u002D'</code>) if the
* adjusted exponent is negative, {@code '+'} * adjusted exponent is negative, {@code '+'}
* (<tt>'&#92;u002B'</tt>) otherwise). * (<code>'&#92;u002B'</code>) otherwise).
* *
* <p>Finally, the entire string is prefixed by a minus sign * <p>Finally, the entire string is prefixed by a minus sign
* character {@code '-'} (<tt>'&#92;u002D'</tt>) if the unscaled * character {@code '-'} (<code>'&#92;u002D'</code>) if the unscaled
* value is less than zero. No sign character is prefixed if the * value is less than zero. No sign character is prefixed if the
* unscaled value is zero or positive. * unscaled value is zero or positive.
* *
@ -2930,7 +2930,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* in the result. * in the result.
* *
* The entire string is prefixed by a minus sign character '-' * The entire string is prefixed by a minus sign character '-'
* (<tt>'&#92;u002D'</tt>) if the unscaled value is less than * (<code>'&#92;u002D'</code>) if the unscaled value is less than
* zero. No sign character is prefixed if the unscaled value is * zero. No sign character is prefixed if the unscaled value is
* zero or positive. * zero or positive.
* *

View file

@ -2289,11 +2289,11 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
} }
/** /**
* Returns a BigInteger whose value is <tt>(this<sup>exponent</sup>)</tt>. * Returns a BigInteger whose value is <code>(this<sup>exponent</sup>)</code>.
* Note that {@code exponent} is an integer rather than a BigInteger. * Note that {@code exponent} is an integer rather than a BigInteger.
* *
* @param exponent exponent to which this BigInteger is to be raised. * @param exponent exponent to which this BigInteger is to be raised.
* @return <tt>this<sup>exponent</sup></tt> * @return <code>this<sup>exponent</sup></code>
* @throws ArithmeticException {@code exponent} is negative. (This would * @throws ArithmeticException {@code exponent} is negative. (This would
* cause the operation to yield a non-integer value.) * cause the operation to yield a non-integer value.)
*/ */
@ -2552,12 +2552,12 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
/** /**
* Returns a BigInteger whose value is * Returns a BigInteger whose value is
* <tt>(this<sup>exponent</sup> mod m)</tt>. (Unlike {@code pow}, this * <code>(this<sup>exponent</sup> mod m)</code>. (Unlike {@code pow}, this
* method permits negative exponents.) * method permits negative exponents.)
* *
* @param exponent the exponent. * @param exponent the exponent.
* @param m the modulus. * @param m the modulus.
* @return <tt>this<sup>exponent</sup> mod m</tt> * @return <code>this<sup>exponent</sup> mod m</code>
* @throws ArithmeticException {@code m} &le; 0 or the exponent is * @throws ArithmeticException {@code m} &le; 0 or the exponent is
* negative and this BigInteger is not <i>relatively * negative and this BigInteger is not <i>relatively
* prime</i> to {@code m}. * prime</i> to {@code m}.
@ -3152,7 +3152,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* Returns a BigInteger whose value is {@code (this << n)}. * Returns a BigInteger whose value is {@code (this << n)}.
* The shift distance, {@code n}, may be negative, in which case * The shift distance, {@code n}, may be negative, in which case
* this method performs a right shift. * this method performs a right shift.
* (Computes <tt>floor(this * 2<sup>n</sup>)</tt>.) * (Computes <code>floor(this * 2<sup>n</sup>)</code>.)
* *
* @param n shift distance, in bits. * @param n shift distance, in bits.
* @return {@code this << n} * @return {@code this << n}
@ -3175,7 +3175,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
/** /**
* Returns a magnitude array whose value is {@code (mag << n)}. * Returns a magnitude array whose value is {@code (mag << n)}.
* The shift distance, {@code n}, is considered unnsigned. * The shift distance, {@code n}, is considered unnsigned.
* (Computes <tt>this * 2<sup>n</sup></tt>.) * (Computes <code>this * 2<sup>n</sup></code>.)
* *
* @param mag magnitude, the most-significant int ({@code mag[0]}) must be non-zero. * @param mag magnitude, the most-significant int ({@code mag[0]}) must be non-zero.
* @param n unsigned shift distance, in bits. * @param n unsigned shift distance, in bits.
@ -3212,7 +3212,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* Returns a BigInteger whose value is {@code (this >> n)}. Sign * Returns a BigInteger whose value is {@code (this >> n)}. Sign
* extension is performed. The shift distance, {@code n}, may be * extension is performed. The shift distance, {@code n}, may be
* negative, in which case this method performs a left shift. * negative, in which case this method performs a left shift.
* (Computes <tt>floor(this / 2<sup>n</sup>)</tt>.) * (Computes <code>floor(this / 2<sup>n</sup>)</code>.)
* *
* @param n shift distance, in bits. * @param n shift distance, in bits.
* @return {@code this >> n} * @return {@code this >> n}
@ -3235,7 +3235,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
/** /**
* Returns a BigInteger whose value is {@code (this >> n)}. The shift * Returns a BigInteger whose value is {@code (this >> n)}. The shift
* distance, {@code n}, is considered unsigned. * distance, {@code n}, is considered unsigned.
* (Computes <tt>floor(this * 2<sup>-n</sup>)</tt>.) * (Computes <code>floor(this * 2<sup>-n</sup>)</code>.)
* *
* @param n unsigned shift distance, in bits. * @param n unsigned shift distance, in bits.
* @return {@code this >> n} * @return {@code this >> n}

View file

@ -268,7 +268,7 @@ public final class MathContext implements Serializable {
* Returns the string representation of this {@code MathContext}. * Returns the string representation of this {@code MathContext}.
* The {@code String} returned represents the settings of the * The {@code String} returned represents the settings of the
* {@code MathContext} object as two space-delimited words * {@code MathContext} object as two space-delimited words
* (separated by a single space character, <tt>'&#92;u0020'</tt>, * (separated by a single space character, <code>'&#92;u0020'</code>,
* and with no leading or trailing white space), as follows: * and with no leading or trailing white space), as follows:
* <ol> * <ol>
* <li> * <li>

View file

@ -254,7 +254,7 @@ class MutableBigInteger {
/** /**
* Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1 * Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1
* as this MutableBigInteger is numerically less than, equal to, or * as this MutableBigInteger is numerically less than, equal to, or
* greater than <tt>b</tt>. * greater than {@code b}.
*/ */
final int compare(MutableBigInteger b) { final int compare(MutableBigInteger b) {
int blen = b.intLen; int blen = b.intLen;