8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base

Minor coding style update of javadoc tag in any file in java.base

Reviewed-by: bchristi, lancea
This commit is contained in:
Julia Boes 2019-09-24 09:43:43 +01:00
parent 13d0bac294
commit d15a57b842
139 changed files with 3499 additions and 3499 deletions

View file

@ -29,20 +29,20 @@ import jdk.internal.misc.Unsafe;
import jdk.internal.util.ArraysSupport;
/**
* A <code>BufferedInputStream</code> adds
* A {@code BufferedInputStream} adds
* functionality to another input stream-namely,
* the ability to buffer the input and to
* support the <code>mark</code> and <code>reset</code>
* methods. When the <code>BufferedInputStream</code>
* support the {@code mark} and {@code reset}
* methods. When the {@code BufferedInputStream}
* is created, an internal buffer array is
* created. As bytes from the stream are read
* or skipped, the internal buffer is refilled
* as necessary from the contained input stream,
* many bytes at a time. The <code>mark</code>
* many bytes at a time. The {@code mark}
* operation remembers a point in the input
* stream and the <code>reset</code> operation
* stream and the {@code reset} operation
* causes all the bytes read since the most
* recent <code>mark</code> operation to be
* recent {@code mark} operation to be
* reread before new bytes are taken from
* the contained input stream.
*
@ -81,23 +81,23 @@ class BufferedInputStream extends FilterInputStream {
* The index one greater than the index of the last valid byte in
* the buffer.
* This value is always
* in the range <code>0</code> through <code>buf.length</code>;
* elements <code>buf[0]</code> through <code>buf[count-1]
* </code>contain buffered input data obtained
* in the range {@code 0} through {@code buf.length};
* elements {@code buf[0]} through {@code buf[count-1]}
* contain buffered input data obtained
* from the underlying input stream.
*/
protected int count;
/**
* The current position in the buffer. This is the index of the next
* character to be read from the <code>buf</code> array.
* character to be read from the {@code buf} array.
* <p>
* This value is always in the range <code>0</code>
* through <code>count</code>. If it is less
* than <code>count</code>, then <code>buf[pos]</code>
* This value is always in the range {@code 0}
* through {@code count}. If it is less
* than {@code count}, then {@code buf[pos]}
* is the next byte to be supplied as input;
* if it is equal to <code>count</code>, then
* the next <code>read</code> or <code>skip</code>
* if it is equal to {@code count}, then
* the next {@code read} or {@code skip}
* operation will require more bytes to be
* read from the contained input stream.
*
@ -106,28 +106,28 @@ class BufferedInputStream extends FilterInputStream {
protected int pos;
/**
* The value of the <code>pos</code> field at the time the last
* <code>mark</code> method was called.
* The value of the {@code pos} field at the time the last
* {@code mark} method was called.
* <p>
* This value is always
* in the range <code>-1</code> through <code>pos</code>.
* in the range {@code -1} through {@code pos}.
* If there is no marked position in the input
* stream, this field is <code>-1</code>. If
* stream, this field is {@code -1}. If
* there is a marked position in the input
* stream, then <code>buf[markpos]</code>
* stream, then {@code buf[markpos]}
* is the first byte to be supplied as input
* after a <code>reset</code> operation. If
* <code>markpos</code> is not <code>-1</code>,
* then all bytes from positions <code>buf[markpos]</code>
* through <code>buf[pos-1]</code> must remain
* after a {@code reset} operation. If
* {@code markpos} is not {@code -1},
* then all bytes from positions {@code buf[markpos]}
* through {@code buf[pos-1]} must remain
* in the buffer array (though they may be
* moved to another place in the buffer array,
* with suitable adjustments to the values
* of <code>count</code>, <code>pos</code>,
* and <code>markpos</code>); they may not
* of {@code count}, {@code pos},
* and {@code markpos}); they may not
* be discarded unless and until the difference
* between <code>pos</code> and <code>markpos</code>
* exceeds <code>marklimit</code>.
* between {@code pos} and {@code markpos}
* exceeds {@code marklimit}.
*
* @see java.io.BufferedInputStream#mark(int)
* @see java.io.BufferedInputStream#pos
@ -136,12 +136,12 @@ class BufferedInputStream extends FilterInputStream {
/**
* The maximum read ahead allowed after a call to the
* <code>mark</code> method before subsequent calls to the
* <code>reset</code> method fail.
* Whenever the difference between <code>pos</code>
* and <code>markpos</code> exceeds <code>marklimit</code>,
* {@code mark} method before subsequent calls to the
* {@code reset} method fail.
* Whenever the difference between {@code pos}
* and {@code markpos} exceeds {@code marklimit},
* then the mark may be dropped by setting
* <code>markpos</code> to <code>-1</code>.
* {@code markpos} to {@code -1}.
*
* @see java.io.BufferedInputStream#mark(int)
* @see java.io.BufferedInputStream#reset()
@ -171,10 +171,10 @@ class BufferedInputStream extends FilterInputStream {
}
/**
* Creates a <code>BufferedInputStream</code>
* Creates a {@code BufferedInputStream}
* and saves its argument, the input stream
* <code>in</code>, for later use. An internal
* buffer array is created and stored in <code>buf</code>.
* {@code in}, for later use. An internal
* buffer array is created and stored in {@code buf}.
*
* @param in the underlying input stream.
*/
@ -183,12 +183,12 @@ class BufferedInputStream extends FilterInputStream {
}
/**
* Creates a <code>BufferedInputStream</code>
* Creates a {@code BufferedInputStream}
* with the specified buffer size,
* and saves its argument, the input stream
* <code>in</code>, for later use. An internal
* buffer array of length <code>size</code>
* is created and stored in <code>buf</code>.
* {@code in}, for later use. An internal
* buffer array of length {@code size}
* is created and stored in {@code buf}.
*
* @param in the underlying input stream.
* @param size the buffer size.
@ -249,10 +249,10 @@ class BufferedInputStream extends FilterInputStream {
/**
* See
* the general contract of the <code>read</code>
* method of <code>InputStream</code>.
* the general contract of the {@code read}
* method of {@code InputStream}.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
@ -300,21 +300,21 @@ class BufferedInputStream extends FilterInputStream {
* <code>{@link InputStream#read(byte[], int, int) read}</code> method of
* the <code>{@link InputStream}</code> class. As an additional
* convenience, it attempts to read as many bytes as possible by repeatedly
* invoking the <code>read</code> method of the underlying stream. This
* iterated <code>read</code> continues until one of the following
* invoking the {@code read} method of the underlying stream. This
* iterated {@code read} continues until one of the following
* conditions becomes true: <ul>
*
* <li> The specified number of bytes have been read,
*
* <li> The <code>read</code> method of the underlying stream returns
* <code>-1</code>, indicating end-of-file, or
* <li> The {@code read} method of the underlying stream returns
* {@code -1}, indicating end-of-file, or
*
* <li> The <code>available</code> method of the underlying stream
* <li> The {@code available} method of the underlying stream
* returns zero, indicating that further input requests would block.
*
* </ul> If the first <code>read</code> on the underlying stream returns
* <code>-1</code> to indicate end-of-file then this method returns
* <code>-1</code>. Otherwise this method returns the number of bytes
* </ul> If the first {@code read} on the underlying stream returns
* {@code -1} to indicate end-of-file then this method returns
* {@code -1}. Otherwise this method returns the number of bytes
* actually read.
*
* <p> Subclasses of this class are encouraged, but not required, to
@ -323,7 +323,7 @@ class BufferedInputStream extends FilterInputStream {
* @param b destination buffer.
* @param off offset at which to start storing bytes.
* @param len maximum number of bytes to read.
* @return the number of bytes read, or <code>-1</code> if the end of
* @return the number of bytes read, or {@code -1} if the end of
* the stream has been reached.
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
@ -355,8 +355,8 @@ class BufferedInputStream extends FilterInputStream {
}
/**
* See the general contract of the <code>skip</code>
* method of <code>InputStream</code>.
* See the general contract of the {@code skip}
* method of {@code InputStream}.
*
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
@ -413,8 +413,8 @@ class BufferedInputStream extends FilterInputStream {
}
/**
* See the general contract of the <code>mark</code>
* method of <code>InputStream</code>.
* See the general contract of the {@code mark}
* method of {@code InputStream}.
*
* @param readlimit the maximum limit of bytes that can be read before
* the mark position becomes invalid.
@ -426,14 +426,14 @@ class BufferedInputStream extends FilterInputStream {
}
/**
* See the general contract of the <code>reset</code>
* method of <code>InputStream</code>.
* See the general contract of the {@code reset}
* method of {@code InputStream}.
* <p>
* If <code>markpos</code> is <code>-1</code>
* If {@code markpos} is {@code -1}
* (no mark has been set or the mark has been
* invalidated), an <code>IOException</code>
* is thrown. Otherwise, <code>pos</code> is
* set equal to <code>markpos</code>.
* invalidated), an {@code IOException}
* is thrown. Otherwise, {@code pos} is
* set equal to {@code markpos}.
*
* @throws IOException if this stream has not been marked or,
* if the mark has been invalidated, or the stream
@ -449,13 +449,13 @@ class BufferedInputStream extends FilterInputStream {
}
/**
* Tests if this input stream supports the <code>mark</code>
* and <code>reset</code> methods. The <code>markSupported</code>
* method of <code>BufferedInputStream</code> returns
* <code>true</code>.
* Tests if this input stream supports the {@code mark}
* and {@code reset} methods. The {@code markSupported}
* method of {@code BufferedInputStream} returns
* {@code true}.
*
* @return a <code>boolean</code> indicating if this stream type supports
* the <code>mark</code> and <code>reset</code> methods.
* @return a {@code boolean} indicating if this stream type supports
* the {@code mark} and {@code reset} methods.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
*/

View file

@ -98,15 +98,15 @@ public class BufferedOutputStream extends FilterOutputStream {
}
/**
* Writes <code>len</code> bytes from the specified byte array
* starting at offset <code>off</code> to this buffered output stream.
* Writes {@code len} bytes from the specified byte array
* starting at offset {@code off} to this buffered output stream.
*
* <p> Ordinarily this method stores bytes from the given array into this
* stream's buffer, flushing the buffer to the underlying output stream as
* needed. If the requested length is at least as large as this stream's
* buffer, however, then this method will flush the buffer and write the
* bytes directly to the underlying output stream. Thus redundant
* <code>BufferedOutputStream</code>s will not copy data unnecessarily.
* {@code BufferedOutputStream}s will not copy data unnecessarily.
*
* @param b the data.
* @param off the start offset in the data.

View file

@ -235,22 +235,22 @@ public class BufferedReader extends Reader {
* <code>{@link Reader#read(char[], int, int) read}</code> method of the
* <code>{@link Reader}</code> class. As an additional convenience, it
* attempts to read as many characters as possible by repeatedly invoking
* the <code>read</code> method of the underlying stream. This iterated
* <code>read</code> continues until one of the following conditions becomes
* the {@code read} method of the underlying stream. This iterated
* {@code read} continues until one of the following conditions becomes
* true: <ul>
*
* <li> The specified number of characters have been read,
*
* <li> The <code>read</code> method of the underlying stream returns
* <code>-1</code>, indicating end-of-file, or
* <li> The {@code read} method of the underlying stream returns
* {@code -1}, indicating end-of-file, or
*
* <li> The <code>ready</code> method of the underlying stream
* returns <code>false</code>, indicating that further input requests
* <li> The {@code ready} method of the underlying stream
* returns {@code false}, indicating that further input requests
* would block.
*
* </ul> If the first <code>read</code> on the underlying stream returns
* <code>-1</code> to indicate end-of-file then this method returns
* <code>-1</code>. Otherwise this method returns the number of characters
* </ul> If the first {@code read} on the underlying stream returns
* {@code -1} to indicate end-of-file then this method returns
* {@code -1}. Otherwise this method returns the number of characters
* actually read.
*
* <p> Subclasses of this class are encouraged, but not required, to
@ -261,7 +261,7 @@ public class BufferedReader extends Reader {
* however, the buffer is empty, the mark is not valid, and the requested
* length is at least as large as the buffer, then this method will read
* characters directly from the underlying stream into the given array.
* Thus redundant <code>BufferedReader</code>s will not copy data
* Thus redundant {@code BufferedReader}s will not copy data
* unnecessarily.
*
* @param cbuf Destination buffer
@ -403,7 +403,7 @@ public class BufferedReader extends Reader {
*
* @return The number of characters actually skipped
*
* @throws IllegalArgumentException If <code>n</code> is negative.
* @throws IllegalArgumentException If {@code n} is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {

View file

@ -148,10 +148,10 @@ public class CharArrayReader extends Reader {
/**
* Skips characters. Returns the number of characters that were skipped.
*
* <p>The <code>n</code> parameter may be negative, even though the
* <code>skip</code> method of the {@link Reader} superclass throws
* an exception in this case. If <code>n</code> is negative, then
* this method does nothing and returns <code>0</code>.
* <p>The {@code n} parameter may be negative, even though the
* {@code skip} method of the {@link Reader} superclass throws
* an exception in this case. If {@code n} is negative, then
* this method does nothing and returns {@code 0}.
*
* @param n The number of characters to skip
* @return The number of characters actually skipped

View file

@ -60,34 +60,34 @@ class DataInputStream extends FilterInputStream implements DataInput {
/**
* Reads some number of bytes from the contained input stream and
* stores them into the buffer array <code>b</code>. The number of
* stores them into the buffer array {@code b}. The number of
* bytes actually read is returned as an integer. This method blocks
* until input data is available, end of file is detected, or an
* exception is thrown.
*
* <p>If <code>b</code> is null, a <code>NullPointerException</code> is
* thrown. If the length of <code>b</code> is zero, then no bytes are
* read and <code>0</code> is returned; otherwise, there is an attempt
* <p>If {@code b} is null, a {@code NullPointerException} is
* thrown. If the length of {@code b} is zero, then no bytes are
* read and {@code 0} is returned; otherwise, there is an attempt
* to read at least one byte. If no byte is available because the
* stream is at end of file, the value <code>-1</code> is returned;
* otherwise, at least one byte is read and stored into <code>b</code>.
* stream is at end of file, the value {@code -1} is returned;
* otherwise, at least one byte is read and stored into {@code b}.
*
* <p>The first byte read is stored into element <code>b[0]</code>, the
* next one into <code>b[1]</code>, and so on. The number of bytes read
* is, at most, equal to the length of <code>b</code>. Let <code>k</code>
* <p>The first byte read is stored into element {@code b[0]}, the
* next one into {@code b[1]}, and so on. The number of bytes read
* is, at most, equal to the length of {@code b}. Let {@code k}
* be the number of bytes actually read; these bytes will be stored in
* elements <code>b[0]</code> through <code>b[k-1]</code>, leaving
* elements <code>b[k]</code> through <code>b[b.length-1]</code>
* elements {@code b[0]} through {@code b[k-1]}, leaving
* elements {@code b[k]} through {@code b[b.length-1]}
* unaffected.
*
* <p>The <code>read(b)</code> method has the same effect as:
* <p>The {@code read(b)} method has the same effect as:
* <blockquote><pre>
* read(b, 0, b.length)
* </pre></blockquote>
*
* @param b the buffer into which the data is read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end
* {@code -1} if there is no more data because the end
* of the stream has been reached.
* @throws IOException if the first byte cannot be read for any reason
* other than end of file, the stream has been closed and the underlying
@ -101,43 +101,43 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* Reads up to <code>len</code> bytes of data from the contained
* Reads up to {@code len} bytes of data from the contained
* input stream into an array of bytes. An attempt is made to read
* as many as <code>len</code> bytes, but a smaller number may be read,
* as many as {@code len} bytes, but a smaller number may be read,
* possibly zero. The number of bytes actually read is returned as an
* integer.
*
* <p> This method blocks until input data is available, end of file is
* detected, or an exception is thrown.
*
* <p> If <code>len</code> is zero, then no bytes are read and
* <code>0</code> is returned; otherwise, there is an attempt to read at
* <p> If {@code len} is zero, then no bytes are read and
* {@code 0} is returned; otherwise, there is an attempt to read at
* least one byte. If no byte is available because the stream is at end of
* file, the value <code>-1</code> is returned; otherwise, at least one
* byte is read and stored into <code>b</code>.
* file, the value {@code -1} is returned; otherwise, at least one
* byte is read and stored into {@code b}.
*
* <p> The first byte read is stored into element <code>b[off]</code>, the
* next one into <code>b[off+1]</code>, and so on. The number of bytes read
* is, at most, equal to <code>len</code>. Let <i>k</i> be the number of
* <p> The first byte read is stored into element {@code b[off]}, the
* next one into {@code b[off+1]}, and so on. The number of bytes read
* is, at most, equal to {@code len}. Let <i>k</i> be the number of
* bytes actually read; these bytes will be stored in elements
* <code>b[off]</code> through <code>b[off+</code><i>k</i><code>-1]</code>,
* leaving elements <code>b[off+</code><i>k</i><code>]</code> through
* <code>b[off+len-1]</code> unaffected.
* {@code b[off]} through {@code b[off+}<i>k</i>{@code -1]},
* leaving elements {@code b[off+}<i>k</i>{@code ]} through
* {@code b[off+len-1]} unaffected.
*
* <p> In every case, elements <code>b[0]</code> through
* <code>b[off]</code> and elements <code>b[off+len]</code> through
* <code>b[b.length-1]</code> are unaffected.
* <p> In every case, elements {@code b[0]} through
* {@code b[off]} and elements {@code b[off+len]} through
* {@code b[b.length-1]} are unaffected.
*
* @param b the buffer into which the data is read.
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end
* {@code -1} if there is no more data because the end
* of the stream has been reached.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws IOException if the first byte cannot be read for any reason
* other than end of file, the stream has been closed and the underlying
* input stream does not support reading after close, or another I/O
@ -205,8 +205,8 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>skipBytes</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code skipBytes}
* method of {@code DataInput}.
* <p>
* Bytes for this operation are read from the contained
* input stream.
@ -230,13 +230,13 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readBoolean</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readBoolean}
* method of {@code DataInput}.
* <p>
* Bytes for this operation are read from the contained
* input stream.
*
* @return the <code>boolean</code> value read.
* @return the {@code boolean} value read.
* @throws EOFException if this input stream has reached the end.
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
@ -251,15 +251,15 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readByte</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readByte}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next byte of this input stream as a signed 8-bit
* <code>byte</code>.
* {@code byte}.
* @throws EOFException if this input stream has reached the end.
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
@ -274,8 +274,8 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readUnsignedByte</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readUnsignedByte}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
@ -297,8 +297,8 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readShort</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readShort}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
@ -322,8 +322,8 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readUnsignedShort</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readUnsignedShort}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
@ -347,15 +347,15 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readChar</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readChar}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next two bytes of this input stream, interpreted as a
* <code>char</code>.
* {@code char}.
* @throws EOFException if this input stream reaches the end before
* reading two bytes.
* @throws IOException the stream has been closed and the contained
@ -372,15 +372,15 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readInt</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readInt}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next four bytes of this input stream, interpreted as an
* <code>int</code>.
* {@code int}.
* @throws EOFException if this input stream reaches the end before
* reading four bytes.
* @throws IOException the stream has been closed and the contained
@ -401,15 +401,15 @@ class DataInputStream extends FilterInputStream implements DataInput {
private byte readBuffer[] = new byte[8];
/**
* See the general contract of the <code>readLong</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readLong}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next eight bytes of this input stream, interpreted as a
* <code>long</code>.
* {@code long}.
* @throws EOFException if this input stream reaches the end before
* reading eight bytes.
* @throws IOException the stream has been closed and the contained
@ -430,15 +430,15 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readFloat</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readFloat}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next four bytes of this input stream, interpreted as a
* <code>float</code>.
* {@code float}.
* @throws EOFException if this input stream reaches the end before
* reading four bytes.
* @throws IOException the stream has been closed and the contained
@ -452,15 +452,15 @@ class DataInputStream extends FilterInputStream implements DataInput {
}
/**
* See the general contract of the <code>readDouble</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readDouble}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next eight bytes of this input stream, interpreted as a
* <code>double</code>.
* {@code double}.
* @throws EOFException if this input stream reaches the end before
* reading eight bytes.
* @throws IOException the stream has been closed and the contained
@ -476,8 +476,8 @@ class DataInputStream extends FilterInputStream implements DataInput {
private char lineBuffer[];
/**
* See the general contract of the <code>readLine</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readLine}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
@ -485,9 +485,9 @@ class DataInputStream extends FilterInputStream implements DataInput {
*
* @deprecated This method does not properly convert bytes to characters.
* As of JDK&nbsp;1.1, the preferred way to read lines of text is via the
* <code>BufferedReader.readLine()</code> method. Programs that use the
* <code>DataInputStream</code> class to read lines can be converted to use
* the <code>BufferedReader</code> class by replacing code of the form:
* {@code BufferedReader.readLine()} method. Programs that use the
* {@code DataInputStream} class to read lines can be converted to use
* the {@code BufferedReader} class by replacing code of the form:
* <blockquote><pre>
* DataInputStream d =&nbsp;new&nbsp;DataInputStream(in);
* </pre></blockquote>
@ -548,8 +548,8 @@ loop: while (true) {
}
/**
* See the general contract of the <code>readUTF</code>
* method of <code>DataInput</code>.
* See the general contract of the {@code readUTF}
* method of {@code DataInput}.
* <p>
* Bytes
* for this operation are read from the contained
@ -571,13 +571,13 @@ loop: while (true) {
/**
* Reads from the
* stream <code>in</code> a representation
* stream {@code in} a representation
* of a Unicode character string encoded in
* <a href="DataInput.html#modified-utf-8">modified UTF-8</a> format;
* this string of characters is then returned as a <code>String</code>.
* this string of characters is then returned as a {@code String}.
* The details of the modified UTF-8 representation
* are exactly the same as for the <code>readUTF</code>
* method of <code>DataInput</code>.
* are exactly the same as for the {@code readUTF}
* method of {@code DataInput}.
*
* @param in a data input stream.
* @return a Unicode string.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,12 +26,12 @@
package java.io;
/**
* The <code>DataOutput</code> interface provides
* The {@code DataOutput} interface provides
* for converting data from any of the Java
* primitive types to a series of bytes and
* writing these bytes to a binary stream.
* There is also a facility for converting
* a <code>String</code> into
* a {@code String} into
* <a href="DataInput.html#modified-utf-8">modified UTF-8</a>
* format and writing the resulting series
* of bytes.
@ -39,7 +39,7 @@ package java.io;
* For all the methods in this interface that
* write bytes, it is generally true that if
* a byte cannot be written for any reason,
* an <code>IOException</code> is thrown.
* an {@code IOException} is thrown.
*
* @author Frank Yellin
* @see java.io.DataInput
@ -50,8 +50,8 @@ public
interface DataOutput {
/**
* Writes to the output stream the eight
* low-order bits of the argument <code>b</code>.
* The 24 high-order bits of <code>b</code>
* low-order bits of the argument {@code b}.
* The 24 high-order bits of {@code b}
* are ignored.
*
* @param b the byte to be written.
@ -60,14 +60,14 @@ interface DataOutput {
void write(int b) throws IOException;
/**
* Writes to the output stream all the bytes in array <code>b</code>.
* If <code>b</code> is <code>null</code>,
* a <code>NullPointerException</code> is thrown.
* If <code>b.length</code> is zero, then
* Writes to the output stream all the bytes in array {@code b}.
* If {@code b} is {@code null},
* a {@code NullPointerException} is thrown.
* If {@code b.length} is zero, then
* no bytes are written. Otherwise, the byte
* <code>b[0]</code> is written first, then
* <code>b[1]</code>, and so on; the last byte
* written is <code>b[b.length-1]</code>.
* {@code b[0]} is written first, then
* {@code b[1]}, and so on; the last byte
* written is {@code b[b.length-1]}.
*
* @param b the data.
* @throws IOException if an I/O error occurs.
@ -75,19 +75,19 @@ interface DataOutput {
void write(byte b[]) throws IOException;
/**
* Writes <code>len</code> bytes from array
* <code>b</code>, in order, to
* the output stream. If <code>b</code>
* is <code>null</code>, a <code>NullPointerException</code>
* is thrown. If <code>off</code> is negative,
* or <code>len</code> is negative, or <code>off+len</code>
* Writes {@code len} bytes from array
* {@code b}, in order, to
* the output stream. If {@code b}
* is {@code null}, a {@code NullPointerException}
* is thrown. If {@code off} is negative,
* or {@code len} is negative, or {@code off+len}
* is greater than the length of the array
* <code>b</code>, then an <code>IndexOutOfBoundsException</code>
* is thrown. If <code>len</code> is zero,
* {@code b}, then an {@code IndexOutOfBoundsException}
* is thrown. If {@code len} is zero,
* then no bytes are written. Otherwise, the
* byte <code>b[off]</code> is written first,
* then <code>b[off+1]</code>, and so on; the
* last byte written is <code>b[off+len-1]</code>.
* byte {@code b[off]} is written first,
* then {@code b[off+1]}, and so on; the
* last byte written is {@code b[off+len-1]}.
*
* @param b the data.
* @param off the start offset in the data.
@ -97,16 +97,16 @@ interface DataOutput {
void write(byte b[], int off, int len) throws IOException;
/**
* Writes a <code>boolean</code> value to this output stream.
* If the argument <code>v</code>
* is <code>true</code>, the value <code>(byte)1</code>
* is written; if <code>v</code> is <code>false</code>,
* the value <code>(byte)0</code> is written.
* Writes a {@code boolean} value to this output stream.
* If the argument {@code v}
* is {@code true}, the value {@code (byte)1}
* is written; if {@code v} is {@code false},
* the value {@code (byte)0} is written.
* The byte written by this method may
* be read by the <code>readBoolean</code>
* method of interface <code>DataInput</code>,
* which will then return a <code>boolean</code>
* equal to <code>v</code>.
* be read by the {@code readBoolean}
* method of interface {@code DataInput},
* which will then return a {@code boolean}
* equal to {@code v}.
*
* @param v the boolean to be written.
* @throws IOException if an I/O error occurs.
@ -115,15 +115,15 @@ interface DataOutput {
/**
* Writes to the output stream the eight low-
* order bits of the argument <code>v</code>.
* The 24 high-order bits of <code>v</code>
* are ignored. (This means that <code>writeByte</code>
* does exactly the same thing as <code>write</code>
* order bits of the argument {@code v}.
* The 24 high-order bits of {@code v}
* are ignored. (This means that {@code writeByte}
* does exactly the same thing as {@code write}
* for an integer argument.) The byte written
* by this method may be read by the <code>readByte</code>
* method of interface <code>DataInput</code>,
* which will then return a <code>byte</code>
* equal to <code>(byte)v</code>.
* by this method may be read by the {@code readByte}
* method of interface {@code DataInput},
* which will then return a {@code byte}
* equal to {@code (byte)v}.
*
* @param v the byte value to be written.
* @throws IOException if an I/O error occurs.
@ -140,18 +140,18 @@ interface DataOutput {
* (byte)(0xff & v)
* }</pre> <p>
* The bytes written by this method may be
* read by the <code>readShort</code> method
* of interface <code>DataInput</code> , which
* will then return a <code>short</code> equal
* to <code>(short)v</code>.
* read by the {@code readShort} method
* of interface {@code DataInput} , which
* will then return a {@code short} equal
* to {@code (short)v}.
*
* @param v the <code>short</code> value to be written.
* @param v the {@code short} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeShort(int v) throws IOException;
/**
* Writes a <code>char</code> value, which
* Writes a {@code char} value, which
* is comprised of two bytes, to the
* output stream.
* The byte values to be written, in the order
@ -161,18 +161,18 @@ interface DataOutput {
* (byte)(0xff & v)
* }</pre><p>
* The bytes written by this method may be
* read by the <code>readChar</code> method
* of interface <code>DataInput</code> , which
* will then return a <code>char</code> equal
* to <code>(char)v</code>.
* read by the {@code readChar} method
* of interface {@code DataInput} , which
* will then return a {@code char} equal
* to {@code (char)v}.
*
* @param v the <code>char</code> value to be written.
* @param v the {@code char} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeChar(int v) throws IOException;
/**
* Writes an <code>int</code> value, which is
* Writes an {@code int} value, which is
* comprised of four bytes, to the output stream.
* The byte values to be written, in the order
* shown, are:
@ -183,17 +183,17 @@ interface DataOutput {
* (byte)(0xff & v)
* }</pre><p>
* The bytes written by this method may be read
* by the <code>readInt</code> method of interface
* <code>DataInput</code> , which will then
* return an <code>int</code> equal to <code>v</code>.
* by the {@code readInt} method of interface
* {@code DataInput} , which will then
* return an {@code int} equal to {@code v}.
*
* @param v the <code>int</code> value to be written.
* @param v the {@code int} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeInt(int v) throws IOException;
/**
* Writes a <code>long</code> value, which is
* Writes a {@code long} value, which is
* comprised of eight bytes, to the output stream.
* The byte values to be written, in the order
* shown, are:
@ -208,50 +208,50 @@ interface DataOutput {
* (byte)(0xff & v)
* }</pre><p>
* The bytes written by this method may be
* read by the <code>readLong</code> method
* of interface <code>DataInput</code> , which
* will then return a <code>long</code> equal
* to <code>v</code>.
* read by the {@code readLong} method
* of interface {@code DataInput} , which
* will then return a {@code long} equal
* to {@code v}.
*
* @param v the <code>long</code> value to be written.
* @param v the {@code long} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeLong(long v) throws IOException;
/**
* Writes a <code>float</code> value,
* Writes a {@code float} value,
* which is comprised of four bytes, to the output stream.
* It does this as if it first converts this
* <code>float</code> value to an <code>int</code>
* in exactly the manner of the <code>Float.floatToIntBits</code>
* method and then writes the <code>int</code>
* value in exactly the manner of the <code>writeInt</code>
* {@code float} value to an {@code int}
* in exactly the manner of the {@code Float.floatToIntBits}
* method and then writes the {@code int}
* value in exactly the manner of the {@code writeInt}
* method. The bytes written by this method
* may be read by the <code>readFloat</code>
* method of interface <code>DataInput</code>,
* which will then return a <code>float</code>
* equal to <code>v</code>.
* may be read by the {@code readFloat}
* method of interface {@code DataInput},
* which will then return a {@code float}
* equal to {@code v}.
*
* @param v the <code>float</code> value to be written.
* @param v the {@code float} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeFloat(float v) throws IOException;
/**
* Writes a <code>double</code> value,
* Writes a {@code double} value,
* which is comprised of eight bytes, to the output stream.
* It does this as if it first converts this
* <code>double</code> value to a <code>long</code>
* in exactly the manner of the <code>Double.doubleToLongBits</code>
* method and then writes the <code>long</code>
* value in exactly the manner of the <code>writeLong</code>
* {@code double} value to a {@code long}
* in exactly the manner of the {@code Double.doubleToLongBits}
* method and then writes the {@code long}
* value in exactly the manner of the {@code writeLong}
* method. The bytes written by this method
* may be read by the <code>readDouble</code>
* method of interface <code>DataInput</code>,
* which will then return a <code>double</code>
* equal to <code>v</code>.
* may be read by the {@code readDouble}
* method of interface {@code DataInput},
* which will then return a {@code double}
* equal to {@code v}.
*
* @param v the <code>double</code> value to be written.
* @param v the {@code double} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeDouble(double v) throws IOException;
@ -259,17 +259,17 @@ interface DataOutput {
/**
* Writes a string to the output stream.
* For every character in the string
* <code>s</code>, taken in order, one byte
* {@code s}, taken in order, one byte
* is written to the output stream. If
* <code>s</code> is <code>null</code>, a <code>NullPointerException</code>
* is thrown.<p> If <code>s.length</code>
* {@code s} is {@code null}, a {@code NullPointerException}
* is thrown.<p> If {@code s.length}
* is zero, then no bytes are written. Otherwise,
* the character <code>s[0]</code> is written
* first, then <code>s[1]</code>, and so on;
* the last character written is <code>s[s.length-1]</code>.
* the character {@code s[0]} is written
* first, then {@code s[1]}, and so on;
* the last character written is {@code s[s.length-1]}.
* For each character, one byte is written,
* the low-order byte, in exactly the manner
* of the <code>writeByte</code> method . The
* of the {@code writeByte} method . The
* high-order eight bits of each character
* in the string are ignored.
*
@ -279,19 +279,19 @@ interface DataOutput {
void writeBytes(String s) throws IOException;
/**
* Writes every character in the string <code>s</code>,
* Writes every character in the string {@code s},
* to the output stream, in order,
* two bytes per character. If <code>s</code>
* is <code>null</code>, a <code>NullPointerException</code>
* is thrown. If <code>s.length</code>
* two bytes per character. If {@code s}
* is {@code null}, a {@code NullPointerException}
* is thrown. If {@code s.length}
* is zero, then no characters are written.
* Otherwise, the character <code>s[0]</code>
* is written first, then <code>s[1]</code>,
* Otherwise, the character {@code s[0]}
* is written first, then {@code s[1]},
* and so on; the last character written is
* <code>s[s.length-1]</code>. For each character,
* {@code s[s.length-1]}. For each character,
* two bytes are actually written, high-order
* byte first, in exactly the manner of the
* <code>writeChar</code> method.
* {@code writeChar} method.
*
* @param s the string value to be written.
* @throws IOException if an I/O error occurs.
@ -304,19 +304,19 @@ interface DataOutput {
* by the
* <a href="DataInput.html#modified-utf-8">modified UTF-8</a>
* representation
* of every character in the string <code>s</code>.
* If <code>s</code> is <code>null</code>,
* a <code>NullPointerException</code> is thrown.
* Each character in the string <code>s</code>
* of every character in the string {@code s}.
* If {@code s} is {@code null},
* a {@code NullPointerException} is thrown.
* Each character in the string {@code s}
* is converted to a group of one, two, or
* three bytes, depending on the value of the
* character.<p>
* If a character <code>c</code>
* If a character {@code c}
* is in the range <code>&#92;u0001</code> through
* <code>&#92;u007f</code>, it is represented
* by one byte:
* <pre>(byte)c </pre> <p>
* If a character <code>c</code> is <code>&#92;u0000</code>
* If a character {@code c} is <code>&#92;u0000</code>
* or is in the range <code>&#92;u0080</code>
* through <code>&#92;u07ff</code>, then it is
* represented by two bytes, to be written
@ -324,8 +324,8 @@ interface DataOutput {
* (byte)(0xc0 | (0x1f & (c >> 6)))
* (byte)(0x80 | (0x3f & c))
* }</pre> <p> If a character
* <code>c</code> is in the range <code>&#92;u0800</code>
* through <code>uffff</code>, then it is
* {@code c} is in the range <code>&#92;u0800</code>
* through {@code uffff}, then it is
* represented by three bytes, to be written
* in the order shown: <pre>{@code
* (byte)(0xe0 | (0x0f & (c >> 12)))
@ -333,19 +333,19 @@ interface DataOutput {
* (byte)(0x80 | (0x3f & c))
* }</pre> <p> First,
* the total number of bytes needed to represent
* all the characters of <code>s</code> is
* all the characters of {@code s} is
* calculated. If this number is larger than
* <code>65535</code>, then a <code>UTFDataFormatException</code>
* {@code 65535}, then a {@code UTFDataFormatException}
* is thrown. Otherwise, this length is written
* to the output stream in exactly the manner
* of the <code>writeShort</code> method;
* of the {@code writeShort} method;
* after this, the one-, two-, or three-byte
* representation of each character in the
* string <code>s</code> is written.<p> The
* string {@code s} is written.<p> The
* bytes written by this method may be read
* by the <code>readUTF</code> method of interface
* <code>DataInput</code> , which will then
* return a <code>String</code> equal to <code>s</code>.
* by the {@code readUTF} method of interface
* {@code DataInput} , which will then
* return a {@code String} equal to {@code s}.
*
* @param s the string value to be written.
* @throws IOException if an I/O error occurs.

View file

@ -49,7 +49,7 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
/**
* Creates a new data output stream to write data to the specified
* underlying output stream. The counter <code>written</code> is
* underlying output stream. The counter {@code written} is
* set to zero.
*
* @param out the underlying output stream, to be saved for later
@ -74,13 +74,13 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
/**
* Writes the specified byte (the low eight bits of the argument
* <code>b</code>) to the underlying output stream. If no exception
* is thrown, the counter <code>written</code> is incremented by
* <code>1</code>.
* {@code b}) to the underlying output stream. If no exception
* is thrown, the counter {@code written} is incremented by
* {@code 1}.
* <p>
* Implements the <code>write</code> method of <code>OutputStream</code>.
* Implements the {@code write} method of {@code OutputStream}.
*
* @param b the <code>byte</code> to be written.
* @param b the {@code byte} to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@ -90,10 +90,10 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Writes <code>len</code> bytes from the specified byte array
* starting at offset <code>off</code> to the underlying output stream.
* If no exception is thrown, the counter <code>written</code> is
* incremented by <code>len</code>.
* Writes {@code len} bytes from the specified byte array
* starting at offset {@code off} to the underlying output stream.
* If no exception is thrown, the counter {@code written} is
* incremented by {@code len}.
*
* @param b the data.
* @param off the start offset in the data.
@ -112,8 +112,8 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* Flushes this data output stream. This forces any buffered output
* bytes to be written out to the stream.
* <p>
* The <code>flush</code> method of <code>DataOutputStream</code>
* calls the <code>flush</code> method of its underlying output stream.
* The {@code flush} method of {@code DataOutputStream}
* calls the {@code flush} method of its underlying output stream.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
@ -124,14 +124,14 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Writes a <code>boolean</code> to the underlying output stream as
* a 1-byte value. The value <code>true</code> is written out as the
* value <code>(byte)1</code>; the value <code>false</code> is
* written out as the value <code>(byte)0</code>. If no exception is
* thrown, the counter <code>written</code> is incremented by
* <code>1</code>.
* Writes a {@code boolean} to the underlying output stream as
* a 1-byte value. The value {@code true} is written out as the
* value {@code (byte)1}; the value {@code false} is
* written out as the value {@code (byte)0}. If no exception is
* thrown, the counter {@code written} is incremented by
* {@code 1}.
*
* @param v a <code>boolean</code> value to be written.
* @param v a {@code boolean} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@ -141,11 +141,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Writes out a <code>byte</code> to the underlying output stream as
* Writes out a {@code byte} to the underlying output stream as
* a 1-byte value. If no exception is thrown, the counter
* <code>written</code> is incremented by <code>1</code>.
* {@code written} is incremented by {@code 1}.
*
* @param v a <code>byte</code> value to be written.
* @param v a {@code byte} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@ -155,11 +155,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Writes a <code>short</code> to the underlying output stream as two
* Writes a {@code short} to the underlying output stream as two
* bytes, high byte first. If no exception is thrown, the counter
* <code>written</code> is incremented by <code>2</code>.
* {@code written} is incremented by {@code 2}.
*
* @param v a <code>short</code> to be written.
* @param v a {@code short} to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@ -170,11 +170,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Writes a <code>char</code> to the underlying output stream as a
* Writes a {@code char} to the underlying output stream as a
* 2-byte value, high byte first. If no exception is thrown, the
* counter <code>written</code> is incremented by <code>2</code>.
* counter {@code written} is incremented by {@code 2}.
*
* @param v a <code>char</code> value to be written.
* @param v a {@code char} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@ -185,11 +185,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Writes an <code>int</code> to the underlying output stream as four
* Writes an {@code int} to the underlying output stream as four
* bytes, high byte first. If no exception is thrown, the counter
* <code>written</code> is incremented by <code>4</code>.
* {@code written} is incremented by {@code 4}.
*
* @param v an <code>int</code> to be written.
* @param v an {@code int} to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@ -204,11 +204,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
private byte writeBuffer[] = new byte[8];
/**
* Writes a <code>long</code> to the underlying output stream as eight
* Writes a {@code long} to the underlying output stream as eight
* bytes, high byte first. In no exception is thrown, the counter
* <code>written</code> is incremented by <code>8</code>.
* {@code written} is incremented by {@code 8}.
*
* @param v a <code>long</code> to be written.
* @param v a {@code long} to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@ -226,14 +226,14 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Converts the float argument to an <code>int</code> using the
* <code>floatToIntBits</code> method in class <code>Float</code>,
* and then writes that <code>int</code> value to the underlying
* Converts the float argument to an {@code int} using the
* {@code floatToIntBits} method in class {@code Float},
* and then writes that {@code int} value to the underlying
* output stream as a 4-byte quantity, high byte first. If no
* exception is thrown, the counter <code>written</code> is
* incremented by <code>4</code>.
* exception is thrown, the counter {@code written} is
* incremented by {@code 4}.
*
* @param v a <code>float</code> value to be written.
* @param v a {@code float} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
* @see java.lang.Float#floatToIntBits(float)
@ -243,14 +243,14 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Converts the double argument to a <code>long</code> using the
* <code>doubleToLongBits</code> method in class <code>Double</code>,
* and then writes that <code>long</code> value to the underlying
* Converts the double argument to a {@code long} using the
* {@code doubleToLongBits} method in class {@code Double},
* and then writes that {@code long} value to the underlying
* output stream as an 8-byte quantity, high byte first. If no
* exception is thrown, the counter <code>written</code> is
* incremented by <code>8</code>.
* exception is thrown, the counter {@code written} is
* incremented by {@code 8}.
*
* @param v a <code>double</code> value to be written.
* @param v a {@code double} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
* @see java.lang.Double#doubleToLongBits(double)
@ -263,8 +263,8 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* Writes out the string to the underlying output stream as a
* sequence of bytes. Each character in the string is written out, in
* sequence, by discarding its high eight bits. If no exception is
* thrown, the counter <code>written</code> is incremented by the
* length of <code>s</code>.
* thrown, the counter {@code written} is incremented by the
* length of {@code s}.
*
* @param s a string of bytes to be written.
* @throws IOException if an I/O error occurs.
@ -281,11 +281,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
/**
* Writes a string to the underlying output stream as a sequence of
* characters. Each character is written to the data output stream as
* if by the <code>writeChar</code> method. If no exception is
* thrown, the counter <code>written</code> is incremented by twice
* the length of <code>s</code>.
* if by the {@code writeChar} method. If no exception is
* thrown, the counter {@code written} is incremented by twice
* the length of {@code s}.
*
* @param s a <code>String</code> value to be written.
* @param s a {@code String} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.DataOutputStream#writeChar(int)
* @see java.io.FilterOutputStream#out
@ -306,15 +306,15 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* encoding in a machine-independent manner.
* <p>
* First, two bytes are written to the output stream as if by the
* <code>writeShort</code> method giving the number of bytes to
* {@code writeShort} method giving the number of bytes to
* follow. This value is the number of bytes actually written out,
* not the length of the string. Following the length, each character
* of the string is output, in sequence, using the modified UTF-8 encoding
* for the character. If no exception is thrown, the counter
* <code>written</code> is incremented by the total number of
* {@code written} is incremented by the total number of
* bytes written to the output stream. This will be at least two
* plus the length of <code>str</code>, and at most two plus
* thrice the length of <code>str</code>.
* plus the length of {@code str}, and at most two plus
* thrice the length of {@code str}.
*
* @param str a string to be written.
* @throws UTFDataFormatException if the modified UTF-8 encoding of
@ -331,15 +331,15 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* <a href="DataInput.html#modified-utf-8">modified UTF-8</a>
* encoding in a machine-independent manner.
* <p>
* First, two bytes are written to out as if by the <code>writeShort</code>
* First, two bytes are written to out as if by the {@code writeShort}
* method giving the number of bytes to follow. This value is the number of
* bytes actually written out, not the length of the string. Following the
* length, each character of the string is output, in sequence, using the
* modified UTF-8 encoding for the character. If no exception is thrown, the
* counter <code>written</code> is incremented by the total number of
* counter {@code written} is incremented by the total number of
* bytes written to the output stream. This will be at least two
* plus the length of <code>str</code>, and at most two plus
* thrice the length of <code>str</code>.
* plus the length of {@code str}, and at most two plus
* thrice the length of {@code str}.
*
* @param str a string to be written.
* @param out destination to write to
@ -410,11 +410,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
}
/**
* Returns the current value of the counter <code>written</code>,
* Returns the current value of the counter {@code written},
* the number of bytes written to this data output stream so far.
* If the counter overflows, it will be wrapped to Integer.MAX_VALUE.
*
* @return the value of the <code>written</code> field.
* @return the value of the {@code written} field.
* @see java.io.DataOutputStream#written
*/
public final int size() {

View file

@ -44,7 +44,7 @@ class EOFException extends IOException {
private static final long serialVersionUID = 6433858223774886977L;
/**
* Constructs an <code>EOFException</code> with <code>null</code>
* Constructs an {@code EOFException} with {@code null}
* as its error detail message.
*/
public EOFException() {
@ -52,10 +52,10 @@ class EOFException extends IOException {
}
/**
* Constructs an <code>EOFException</code> with the specified detail
* message. The string <code>s</code> may later be retrieved by the
* Constructs an {@code EOFException} with the specified detail
* message. The string {@code s} may later be retrieved by the
* <code>{@link java.lang.Throwable#getMessage}</code> method of class
* <code>java.lang.Throwable</code>.
* {@code java.lang.Throwable}.
*
* @param s the detail message.
*/

View file

@ -46,8 +46,8 @@ import sun.security.action.GetPropertyAction;
*
* <ol>
* <li> An optional system-dependent <em>prefix</em> string,
* such as a disk-drive specifier, <code>"/"</code>&nbsp;for the UNIX root
* directory, or <code>"\\\\"</code>&nbsp;for a Microsoft Windows UNC pathname, and
* such as a disk-drive specifier, {@code "/"}&nbsp;for the UNIX root
* directory, or {@code "\\\\"}&nbsp;for a Microsoft Windows UNC pathname, and
* <li> A sequence of zero or more string <em>names</em>.
* </ol>
*
@ -61,7 +61,7 @@ import sun.security.action.GetPropertyAction;
* inherently system-dependent. When an abstract pathname is converted into a
* pathname string, each name is separated from the next by a single copy of
* 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}, and
* is made available in the public static fields {@link
* #separator} and {@link #separatorChar} of this class.
* When a pathname string is converted into an abstract pathname, the names
@ -73,9 +73,9 @@ import sun.security.action.GetPropertyAction;
* that no other information is required in order to locate the file that it
* denotes. A relative pathname, in contrast, must be interpreted in terms of
* information taken from some other pathname. By default the classes in the
* <code>java.io</code> package always resolve relative pathnames against the
* {@code java.io} package always resolve relative pathnames against the
* current user directory. This directory is named by the system property
* <code>user.dir</code>, and is typically the directory in which the Java
* {@code user.dir}, and is typically the directory in which the Java
* virtual machine was invoked.
*
* <p> The <em>parent</em> of an abstract pathname may be obtained by invoking
@ -94,14 +94,14 @@ import sun.security.action.GetPropertyAction;
* <ul>
*
* <li> For UNIX platforms, the prefix of an absolute pathname is always
* <code>"/"</code>. Relative pathnames have no prefix. The abstract pathname
* denoting the root directory has the prefix <code>"/"</code> and an empty
* {@code "/"}. Relative pathnames have no prefix. The abstract pathname
* denoting the root directory has the prefix {@code "/"} and an empty
* name sequence.
*
* <li> For Microsoft Windows platforms, the prefix of a pathname that contains a drive
* specifier consists of the drive letter followed by <code>":"</code> and
* possibly followed by <code>"\\"</code> if the pathname is absolute. The
* prefix of a UNC pathname is <code>"\\\\"</code>; the hostname and the share
* specifier consists of the drive letter followed by {@code ":"} and
* possibly followed by {@code "\\"} if the pathname is absolute. The
* prefix of a UNC pathname is {@code "\\\\"}; the hostname and the share
* name are the first two names in the name sequence. A relative pathname that
* does not specify a drive has no prefix.
*
@ -124,8 +124,8 @@ import sun.security.action.GetPropertyAction;
* may apply to all other users. The access permissions on an object may
* cause some methods in this class to fail.
*
* <p> Instances of the <code>File</code> class are immutable; that is, once
* created, the abstract pathname represented by a <code>File</code> object
* <p> Instances of the {@code File} class are immutable; that is, once
* created, the abstract pathname represented by a {@code File} object
* will never change.
*
* <h2>Interoperability with {@code java.nio.file} package</h2>
@ -208,8 +208,8 @@ public class File
/**
* The system-dependent default name-separator character. This field is
* initialized to contain the first character of the value of the system
* property <code>file.separator</code>. On UNIX systems the value of this
* field is <code>'/'</code>; on Microsoft Windows systems it is <code>'\\'</code>.
* property {@code file.separator}. On UNIX systems the value of this
* field is {@code '/'}; on Microsoft Windows systems it is {@code '\\'}.
*
* @see java.lang.System#getProperty(java.lang.String)
*/
@ -225,10 +225,10 @@ public class File
/**
* The system-dependent path-separator character. This field is
* initialized to contain the first character of the value of the system
* property <code>path.separator</code>. This character is used to
* property {@code path.separator}. This character is used to
* separate filenames in a sequence of files given as a <em>path list</em>.
* On UNIX systems, this character is <code>':'</code>; on Microsoft Windows systems it
* is <code>';'</code>.
* On UNIX systems, this character is {@code ':'}; on Microsoft Windows systems it
* is {@code ';'}.
*
* @see java.lang.System#getProperty(java.lang.String)
*/
@ -265,13 +265,13 @@ public class File
}
/**
* Creates a new <code>File</code> instance by converting the given
* Creates a new {@code File} instance by converting the given
* pathname string into an abstract pathname. If the given string is
* the empty string, then the result is the empty abstract pathname.
*
* @param pathname A pathname string
* @throws NullPointerException
* If the <code>pathname</code> argument is <code>null</code>
* If the {@code pathname} argument is {@code null}
*/
public File(String pathname) {
if (pathname == null) {
@ -289,21 +289,21 @@ public class File
compatibility with the original behavior of this class. */
/**
* Creates a new <code>File</code> instance from a parent pathname string
* Creates a new {@code File} instance from a parent pathname string
* and a child pathname string.
*
* <p> If <code>parent</code> is <code>null</code> then the new
* <code>File</code> instance is created as if by invoking the
* single-argument <code>File</code> constructor on the given
* <code>child</code> pathname string.
* <p> If {@code parent} is {@code null} then the new
* {@code File} instance is created as if by invoking the
* single-argument {@code File} constructor on the given
* {@code child} pathname string.
*
* <p> Otherwise the <code>parent</code> pathname string is taken to denote
* a directory, and the <code>child</code> pathname string is taken to
* denote either a directory or a file. If the <code>child</code> pathname
* <p> Otherwise the {@code parent} pathname string is taken to denote
* a directory, and the {@code child} pathname string is taken to
* denote either a directory or a file. If the {@code child} pathname
* string is absolute then it is converted into a relative pathname in a
* system-dependent way. If <code>parent</code> is the empty string then
* the new <code>File</code> instance is created by converting
* <code>child</code> into an abstract pathname and resolving the result
* system-dependent way. If {@code parent} is the empty string then
* the new {@code File} instance is created by converting
* {@code child} into an abstract pathname and resolving the result
* against a system-dependent default directory. Otherwise each pathname
* string is converted into an abstract pathname and the child abstract
* pathname is resolved against the parent.
@ -311,7 +311,7 @@ public class File
* @param parent The parent pathname string
* @param child The child pathname string
* @throws NullPointerException
* If <code>child</code> is <code>null</code>
* If {@code child} is {@code null}
*/
public File(String parent, String child) {
if (child == null) {
@ -332,21 +332,21 @@ public class File
}
/**
* Creates a new <code>File</code> instance from a parent abstract
* Creates a new {@code File} instance from a parent abstract
* pathname and a child pathname string.
*
* <p> If <code>parent</code> is <code>null</code> then the new
* <code>File</code> instance is created as if by invoking the
* single-argument <code>File</code> constructor on the given
* <code>child</code> pathname string.
* <p> If {@code parent} is {@code null} then the new
* {@code File} instance is created as if by invoking the
* single-argument {@code File} constructor on the given
* {@code child} pathname string.
*
* <p> Otherwise the <code>parent</code> abstract pathname is taken to
* denote a directory, and the <code>child</code> pathname string is taken
* to denote either a directory or a file. If the <code>child</code>
* <p> Otherwise the {@code parent} abstract pathname is taken to
* denote a directory, and the {@code child} pathname string is taken
* to denote either a directory or a file. If the {@code child}
* pathname string is absolute then it is converted into a relative
* pathname in a system-dependent way. If <code>parent</code> is the empty
* abstract pathname then the new <code>File</code> instance is created by
* converting <code>child</code> into an abstract pathname and resolving
* pathname in a system-dependent way. If {@code parent} is the empty
* abstract pathname then the new {@code File} instance is created by
* converting {@code child} into an abstract pathname and resolving
* the result against a system-dependent default directory. Otherwise each
* pathname string is converted into an abstract pathname and the child
* abstract pathname is resolved against the parent.
@ -354,7 +354,7 @@ public class File
* @param parent The parent abstract pathname
* @param child The child pathname string
* @throws NullPointerException
* If <code>child</code> is <code>null</code>
* If {@code child} is {@code null}
*/
public File(File parent, String child) {
if (child == null) {
@ -460,7 +460,7 @@ public class File
/**
* Returns the pathname string of this abstract pathname's parent, or
* <code>null</code> if this pathname does not name a parent directory.
* {@code null} if this pathname does not name a parent directory.
*
* <p> The <em>parent</em> of an abstract pathname consists of the
* pathname's prefix, if any, and each name in the pathname's name
@ -468,7 +468,7 @@ public class File
* the pathname does not name a parent directory.
*
* @return The pathname string of the parent directory named by this
* abstract pathname, or <code>null</code> if this pathname
* abstract pathname, or {@code null} if this pathname
* does not name a parent
*/
public String getParent() {
@ -483,7 +483,7 @@ public class File
/**
* Returns the abstract pathname of this abstract pathname's parent,
* or <code>null</code> if this pathname does not name a parent
* or {@code null} if this pathname does not name a parent
* directory.
*
* <p> The <em>parent</em> of an abstract pathname consists of the
@ -492,7 +492,7 @@ public class File
* the pathname does not name a parent directory.
*
* @return The abstract pathname of the parent directory named by this
* abstract pathname, or <code>null</code> if this pathname
* abstract pathname, or {@code null} if this pathname
* does not name a parent
*
* @since 1.2
@ -520,12 +520,12 @@ public class File
/**
* Tests whether this abstract pathname is absolute. The definition of
* absolute pathname is system dependent. On UNIX systems, a pathname is
* absolute if its prefix is <code>"/"</code>. On Microsoft Windows systems, a
* absolute if its prefix is {@code "/"}. On Microsoft Windows systems, a
* pathname is absolute if its prefix is a drive specifier followed by
* <code>"\\"</code>, or if its prefix is <code>"\\\\"</code>.
* {@code "\\"}, or if its prefix is {@code "\\\\"}.
*
* @return <code>true</code> if this abstract pathname is absolute,
* <code>false</code> otherwise
* @return {@code true} if this abstract pathname is absolute,
* {@code false} otherwise
*/
public boolean isAbsolute() {
return fs.isAbsolute(this);
@ -538,7 +538,7 @@ public class File
* string is simply returned as if by the {@link #getPath}
* method. If this abstract pathname is the empty abstract pathname then
* 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}, is returned. Otherwise this
* pathname is resolved in a system-dependent way. On UNIX systems, a
* relative pathname is made absolute by resolving it against the current
* user directory. On Microsoft Windows systems, a relative pathname is made absolute
@ -658,7 +658,7 @@ public class File
}
/**
* Converts this abstract pathname into a <code>file:</code> URL. The
* Converts this abstract pathname into a {@code file:} URL. The
* exact form of the URL is system-dependent. If it can be determined that
* the file denoted by this abstract pathname is a directory, then the
* resulting URL will end with a slash.
@ -751,9 +751,9 @@ public class File
* files that are marked as unreadable. Consequently this method may return
* {@code true} even though the file does not have read permissions.
*
* @return <code>true</code> if and only if the file specified by this
* @return {@code true} if and only if the file specified by this
* abstract pathname exists <em>and</em> can be read by the
* application; <code>false</code> otherwise
* application; {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -778,10 +778,10 @@ public class File
* files that are marked read-only. Consequently this method may return
* {@code true} even though the file is marked read-only.
*
* @return <code>true</code> if and only if the file system actually
* @return {@code true} if and only if the file system actually
* contains a file denoted by this abstract pathname <em>and</em>
* the application is allowed to write to the file;
* <code>false</code> otherwise.
* {@code false} otherwise.
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -803,8 +803,8 @@ public class File
* Tests whether the file or directory denoted by this abstract pathname
* exists.
*
* @return <code>true</code> if and only if the file or directory denoted
* by this abstract pathname exists; <code>false</code> otherwise
* @return {@code true} if and only if the file or directory denoted
* by this abstract pathname exists; {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -832,9 +832,9 @@ public class File
* java.nio.file.Files#readAttributes(Path,Class,LinkOption[])
* Files.readAttributes} method may be used.
*
* @return <code>true</code> if and only if the file denoted by this
* @return {@code true} if and only if the file denoted by this
* abstract pathname exists <em>and</em> is a directory;
* <code>false</code> otherwise
* {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -865,9 +865,9 @@ public class File
* java.nio.file.Files#readAttributes(Path,Class,LinkOption[])
* Files.readAttributes} method may be used.
*
* @return <code>true</code> if and only if the file denoted by this
* @return {@code true} if and only if the file denoted by this
* abstract pathname exists <em>and</em> is a normal file;
* <code>false</code> otherwise
* {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -889,10 +889,10 @@ public class File
* Tests whether the file named by this abstract pathname is a hidden
* file. The exact definition of <em>hidden</em> is system-dependent. On
* UNIX systems, a file is considered to be hidden if its name begins with
* a period character (<code>'.'</code>). On Microsoft Windows systems, a file is
* a period character ({@code '.'}). On Microsoft Windows systems, a file is
* considered to be hidden if it has been marked as such in the filesystem.
*
* @return <code>true</code> if and only if the file denoted by this
* @return {@code true} if and only if the file denoted by this
* abstract pathname is hidden according to the conventions of the
* underlying platform
*
@ -934,9 +934,9 @@ public class File
* {@link java.nio.file.Files#getLastModifiedTime(Path,LinkOption[])
* Files.getLastModifiedTime} method may be used instead.
*
* @return A <code>long</code> value representing the time the file was
* @return A {@code long} value representing the time the file was
* last modified, measured in milliseconds since the epoch
* (00:00:00 GMT, January 1, 1970), or <code>0L</code> if the
* (00:00:00 GMT, January 1, 1970), or {@code 0L} if the
* file does not exist or if an I/O error occurs. The value may
* be negative indicating the number of milliseconds before the
* epoch
@ -968,8 +968,8 @@ public class File
* Files.readAttributes} method may be used.
*
* @return The length, in bytes, of the file denoted by this abstract
* pathname, or <code>0L</code> if the file does not exist. Some
* operating systems may return <code>0L</code> for pathnames
* pathname, or {@code 0L} if the file does not exist. Some
* operating systems may return {@code 0L} for pathnames
* denoting system-dependent entities such as devices or pipes.
*
* @throws SecurityException
@ -1003,8 +1003,8 @@ public class File
* {@link java.nio.channels.FileLock FileLock}
* facility should be used instead.
*
* @return <code>true</code> if the named file does not exist and was
* successfully created; <code>false</code> if the named file
* @return {@code true} if the named file does not exist and was
* successfully created; {@code false} if the named file
* already exists
*
* @throws IOException
@ -1036,8 +1036,8 @@ public class File
* when a file cannot be deleted. This is useful for error reporting and to
* diagnose why a file cannot be deleted.
*
* @return <code>true</code> if and only if the file or directory is
* successfully deleted; <code>false</code> otherwise
* @return {@code true} if and only if the file or directory is
* successfully deleted; {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -1311,8 +1311,8 @@ public class File
/**
* Creates the directory named by this abstract pathname.
*
* @return <code>true</code> if and only if the directory was
* created; <code>false</code> otherwise
* @return {@code true} if and only if the directory was
* created; {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -1336,8 +1336,8 @@ public class File
* operation fails it may have succeeded in creating some of the necessary
* parent directories.
*
* @return <code>true</code> if and only if the directory was created,
* along with all necessary parent directories; <code>false</code>
* @return {@code true} if and only if the directory was created,
* along with all necessary parent directories; {@code false}
* otherwise
*
* @throws SecurityException
@ -1385,8 +1385,8 @@ public class File
*
* @param dest The new abstract pathname for the named file
*
* @return <code>true</code> if and only if the renaming succeeded;
* <code>false</code> otherwise
* @return {@code true} if and only if the renaming succeeded;
* {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -1394,7 +1394,7 @@ public class File
* method denies write access to either the old or new pathnames
*
* @throws NullPointerException
* If parameter <code>dest</code> is <code>null</code>
* If parameter {@code dest} is {@code null}
*/
public boolean renameTo(File dest) {
if (dest == null) {
@ -1420,13 +1420,13 @@ public class File
* the supported precision. If the operation succeeds and no intervening
* operations on the file take place, then the next invocation of the
* {@link #lastModified} method will return the (possibly
* truncated) <code>time</code> argument that was passed to this method.
* truncated) {@code time} argument that was passed to this method.
*
* @param time The new last-modified time, measured in milliseconds since
* the epoch (00:00:00 GMT, January 1, 1970)
*
* @return <code>true</code> if and only if the operation succeeded;
* <code>false</code> otherwise
* @return {@code true} if and only if the operation succeeded;
* {@code false} otherwise
*
* @throws IllegalArgumentException If the argument is negative
*
@ -1458,8 +1458,8 @@ public class File
* files that are marked read-only. Whether or not a read-only file or
* directory may be deleted depends upon the underlying system.
*
* @return <code>true</code> if and only if the operation succeeded;
* <code>false</code> otherwise
* @return {@code true} if and only if the operation succeeded;
* {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@ -1490,17 +1490,17 @@ public class File
* manipulation of file permissions is required.
*
* @param writable
* If <code>true</code>, sets the access permission to allow write
* operations; if <code>false</code> to disallow write operations
* If {@code true}, sets the access permission to allow write
* operations; if {@code false} to disallow write operations
*
* @param ownerOnly
* If <code>true</code>, the write permission applies only to the
* If {@code true}, the write permission applies only to the
* owner's write permission; otherwise, it applies to everybody. If
* the underlying file system can not distinguish the owner's write
* permission from that of others, then the permission will apply to
* everybody, regardless of this value.
*
* @return <code>true</code> if and only if the operation succeeded. The
* @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to change
* the access permissions of this abstract pathname.
*
@ -1536,10 +1536,10 @@ public class File
* }</pre>
*
* @param writable
* If <code>true</code>, sets the access permission to allow write
* operations; if <code>false</code> to disallow write operations
* If {@code true}, sets the access permission to allow write
* operations; if {@code false} to disallow write operations
*
* @return <code>true</code> if and only if the operation succeeded. The
* @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname.
*
@ -1565,20 +1565,20 @@ public class File
* manipulation of file permissions is required.
*
* @param readable
* If <code>true</code>, sets the access permission to allow read
* operations; if <code>false</code> to disallow read operations
* If {@code true}, sets the access permission to allow read
* operations; if {@code false} to disallow read operations
*
* @param ownerOnly
* If <code>true</code>, the read permission applies only to the
* If {@code true}, the read permission applies only to the
* owner's read permission; otherwise, it applies to everybody. If
* the underlying file system can not distinguish the owner's read
* permission from that of others, then the permission will apply to
* everybody, regardless of this value.
*
* @return <code>true</code> if and only if the operation succeeded. The
* @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname. If
* <code>readable</code> is <code>false</code> and the underlying
* {@code readable} is {@code false} and the underlying
* file system does not implement a read permission, then the
* operation will fail.
*
@ -1614,13 +1614,13 @@ public class File
* }</pre>
*
* @param readable
* If <code>true</code>, sets the access permission to allow read
* operations; if <code>false</code> to disallow read operations
* If {@code true}, sets the access permission to allow read
* operations; if {@code false} to disallow read operations
*
* @return <code>true</code> if and only if the operation succeeded. The
* @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname. If
* <code>readable</code> is <code>false</code> and the underlying
* {@code readable} is {@code false} and the underlying
* file system does not implement a read permission, then the
* operation will fail.
*
@ -1646,20 +1646,20 @@ public class File
* manipulation of file permissions is required.
*
* @param executable
* If <code>true</code>, sets the access permission to allow execute
* operations; if <code>false</code> to disallow execute operations
* If {@code true}, sets the access permission to allow execute
* operations; if {@code false} to disallow execute operations
*
* @param ownerOnly
* If <code>true</code>, the execute permission applies only to the
* If {@code true}, the execute permission applies only to the
* owner's execute permission; otherwise, it applies to everybody.
* If the underlying file system can not distinguish the owner's
* execute permission from that of others, then the permission will
* apply to everybody, regardless of this value.
*
* @return <code>true</code> if and only if the operation succeeded. The
* @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname. If
* <code>executable</code> is <code>false</code> and the underlying
* {@code executable} is {@code false} and the underlying
* file system does not implement an execute permission, then the
* operation will fail.
*
@ -1695,13 +1695,13 @@ public class File
* }</pre>
*
* @param executable
* If <code>true</code>, sets the access permission to allow execute
* operations; if <code>false</code> to disallow execute operations
* If {@code true}, sets the access permission to allow execute
* operations; if {@code false} to disallow execute operations
*
* @return <code>true</code> if and only if the operation succeeded. The
* @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname. If
* <code>executable</code> is <code>false</code> and the underlying
* {@code executable} is {@code false} and the underlying
* file system does not implement an execute permission, then the
* operation will fail.
*
@ -1723,7 +1723,7 @@ public class File
* files that are not marked executable. Consequently this method may return
* {@code true} even though the file does not have execute permissions.
*
* @return <code>true</code> if and only if the abstract pathname exists
* @return {@code true} if and only if the abstract pathname exists
* <em>and</em> the application is allowed to execute the file
*
* @throws SecurityException
@ -2007,28 +2007,28 @@ public class File
* for a file created by this method to be deleted automatically, use the
* {@link #deleteOnExit} method.
*
* <p> The <code>prefix</code> argument must be at least three characters
* <p> The {@code prefix} argument must be at least three characters
* long. It is recommended that the prefix be a short, meaningful string
* such as <code>"hjb"</code> or <code>"mail"</code>. The
* <code>suffix</code> argument may be <code>null</code>, in which case the
* suffix <code>".tmp"</code> will be used.
* such as {@code "hjb"} or {@code "mail"}. The
* {@code suffix} argument may be {@code null}, in which case the
* suffix {@code ".tmp"} will be used.
*
* <p> To create the new file, the prefix and the suffix may first be
* adjusted to fit the limitations of the underlying platform. If the
* prefix is too long then it will be truncated, but its first three
* characters will always be preserved. If the suffix is too long then it
* too will be truncated, but if it begins with a period character
* (<code>'.'</code>) then the period and the first three characters
* ({@code '.'}) then the period and the first three characters
* following it will always be preserved. Once these adjustments have been
* made the name of the new file will be generated by concatenating the
* prefix, five or more internally-generated characters, and the suffix.
*
* <p> If the <code>directory</code> argument is <code>null</code> then the
* <p> If the {@code directory} argument is {@code null} then the
* system-dependent default temporary-file directory will be used. The
* default temporary-file directory is specified by the system property
* <code>java.io.tmpdir</code>. On UNIX systems the default value of this
* property is typically <code>"/tmp"</code> or <code>"/var/tmp"</code>; on
* Microsoft Windows systems it is typically <code>"C:\\WINNT\\TEMP"</code>. A different
* {@code java.io.tmpdir}. On UNIX systems the default value of this
* property is typically {@code "/tmp"} or {@code "/var/tmp"}; on
* Microsoft Windows systems it is typically {@code "C:\\WINNT\\TEMP"}. A different
* value may be given to this system property when the Java virtual machine
* is invoked, but programmatic changes to this property are not guaranteed
* to have any effect upon the temporary directory used by this method.
@ -2037,17 +2037,17 @@ public class File
* name; must be at least three characters long
*
* @param suffix The suffix string to be used in generating the file's
* name; may be <code>null</code>, in which case the
* suffix <code>".tmp"</code> will be used
* name; may be {@code null}, in which case the
* suffix {@code ".tmp"} will be used
*
* @param directory The directory in which the file is to be created, or
* <code>null</code> if the default temporary-file
* {@code null} if the default temporary-file
* directory is to be used
*
* @return An abstract pathname denoting a newly-created empty file
*
* @throws IllegalArgumentException
* If the <code>prefix</code> argument contains fewer than three
* If the {@code prefix} argument contains fewer than three
* characters
*
* @throws IOException If a file could not be created
@ -2113,13 +2113,13 @@ public class File
* name; must be at least three characters long
*
* @param suffix The suffix string to be used in generating the file's
* name; may be <code>null</code>, in which case the
* suffix <code>".tmp"</code> will be used
* name; may be {@code null}, in which case the
* suffix {@code ".tmp"} will be used
*
* @return An abstract pathname denoting a newly-created empty file
*
* @throws IllegalArgumentException
* If the <code>prefix</code> argument contains fewer than three
* If the {@code prefix} argument contains fewer than three
* characters
*
* @throws IOException If a file could not be created
@ -2163,8 +2163,8 @@ public class File
/**
* Tests this abstract pathname for equality with the given object.
* Returns <code>true</code> if and only if the argument is not
* <code>null</code> and is an abstract pathname that denotes the same file
* Returns {@code true} if and only if the argument is not
* {@code null} and is an abstract pathname that denotes the same file
* or directory as this abstract pathname. Whether or not two abstract
* pathnames are equal depends upon the underlying system. On UNIX
* systems, alphabetic case is significant in comparing pathnames; on Microsoft Windows
@ -2172,8 +2172,8 @@ public class File
*
* @param obj The object to be compared with this abstract pathname
*
* @return <code>true</code> if and only if the objects are the same;
* <code>false</code> otherwise
* @return {@code true} if and only if the objects are the same;
* {@code false} otherwise
*/
public boolean equals(Object obj) {
if ((obj != null) && (obj instanceof File)) {
@ -2188,10 +2188,10 @@ public class File
* of their hash codes. On UNIX systems, the hash code of an abstract
* pathname is equal to the exclusive <em>or</em> of the hash code
* of its pathname string and the decimal value
* <code>1234321</code>. On Microsoft Windows systems, the hash
* {@code 1234321}. On Microsoft Windows systems, the hash
* code is equal to the exclusive <em>or</em> of the hash code of
* its pathname string converted to lower case and the decimal
* value <code>1234321</code>. Locale is not taken into account on
* value {@code 1234321}. Locale is not taken into account on
* lowercasing the pathname string.
*
* @return A hash code for this abstract pathname

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,7 +43,7 @@ public interface FileFilter {
* included in a pathname list.
*
* @param pathname The abstract pathname to be tested
* @return <code>true</code> if and only if <code>pathname</code>
* @return {@code true} if and only if {@code pathname}
* should be included
*/
boolean accept(File pathname);

View file

@ -30,13 +30,13 @@ import sun.nio.ch.FileChannelImpl;
/**
* A <code>FileInputStream</code> obtains input bytes
* A {@code FileInputStream} obtains input bytes
* from a file in a file system. What files
* are available depends on the host environment.
*
* <p><code>FileInputStream</code> is meant for reading streams of raw bytes
* <p>{@code FileInputStream} is meant for reading streams of raw bytes
* such as image data. For reading streams of characters, consider using
* <code>FileReader</code>.
* {@code FileReader}.
*
* @apiNote
* To release resources used by this stream {@link #close} should be called
@ -80,21 +80,21 @@ class FileInputStream extends InputStream
private volatile boolean closed;
/**
* Creates a <code>FileInputStream</code> by
* Creates a {@code FileInputStream} by
* opening a connection to an actual file,
* the file named by the path name <code>name</code>
* in the file system. A new <code>FileDescriptor</code>
* the file named by the path name {@code name}
* in the file system. A new {@code FileDescriptor}
* object is created to represent this file
* connection.
* <p>
* First, if there is a security
* manager, its <code>checkRead</code> method
* is called with the <code>name</code> argument
* manager, its {@code checkRead} method
* is called with the {@code name} argument
* as its argument.
* <p>
* If the named file does not exist, is a directory rather than a regular
* file, or for some other reason cannot be opened for reading then a
* <code>FileNotFoundException</code> is thrown.
* {@code FileNotFoundException} is thrown.
*
* @param name the system-dependent file name.
* @throws FileNotFoundException if the file does not exist,
@ -102,7 +102,7 @@ class FileInputStream extends InputStream
* or for some other reason cannot be opened for
* reading.
* @throws SecurityException if a security manager exists and its
* <code>checkRead</code> method denies read access
* {@code checkRead} method denies read access
* to the file.
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@ -111,21 +111,21 @@ class FileInputStream extends InputStream
}
/**
* Creates a <code>FileInputStream</code> by
* Creates a {@code FileInputStream} by
* opening a connection to an actual file,
* the file named by the <code>File</code>
* object <code>file</code> in the file system.
* A new <code>FileDescriptor</code> object
* the file named by the {@code File}
* object {@code file} in the file system.
* A new {@code FileDescriptor} object
* is created to represent this file connection.
* <p>
* First, if there is a security manager,
* its <code>checkRead</code> method is called
* with the path represented by the <code>file</code>
* its {@code checkRead} method is called
* with the path represented by the {@code file}
* argument as its argument.
* <p>
* If the named file does not exist, is a directory rather than a regular
* file, or for some other reason cannot be opened for reading then a
* <code>FileNotFoundException</code> is thrown.
* {@code FileNotFoundException} is thrown.
*
* @param file the file to be opened for reading.
* @throws FileNotFoundException if the file does not exist,
@ -133,7 +133,7 @@ class FileInputStream extends InputStream
* or for some other reason cannot be opened for
* reading.
* @throws SecurityException if a security manager exists and its
* <code>checkRead</code> method denies read access to the file.
* {@code checkRead} method denies read access to the file.
* @see java.io.File#getPath()
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@ -157,26 +157,26 @@ class FileInputStream extends InputStream
}
/**
* Creates a <code>FileInputStream</code> by using the file descriptor
* <code>fdObj</code>, which represents an existing connection to an
* Creates a {@code FileInputStream} by using the file descriptor
* {@code fdObj}, which represents an existing connection to an
* actual file in the file system.
* <p>
* If there is a security manager, its <code>checkRead</code> method is
* called with the file descriptor <code>fdObj</code> as its argument to
* If there is a security manager, its {@code checkRead} method is
* called with the file descriptor {@code fdObj} as its argument to
* see if it's ok to read the file descriptor. If read access is denied
* to the file descriptor a <code>SecurityException</code> is thrown.
* to the file descriptor a {@code SecurityException} is thrown.
* <p>
* If <code>fdObj</code> is null then a <code>NullPointerException</code>
* If {@code fdObj} is null then a {@code NullPointerException}
* is thrown.
* <p>
* This constructor does not throw an exception if <code>fdObj</code>
* This constructor does not throw an exception if {@code fdObj}
* is {@link java.io.FileDescriptor#valid() invalid}.
* However, if the methods are invoked on the resulting stream to attempt
* I/O on the stream, an <code>IOException</code> is thrown.
* I/O on the stream, an {@code IOException} is thrown.
*
* @param fdObj the file descriptor to be opened for reading.
* @throws SecurityException if a security manager exists and its
* <code>checkRead</code> method denies read access to the
* {@code checkRead} method denies read access to the
* file descriptor.
* @see SecurityManager#checkRead(java.io.FileDescriptor)
*/
@ -217,7 +217,7 @@ class FileInputStream extends InputStream
* Reads a byte of data from this input stream. This method blocks
* if no input is yet available.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* @return the next byte of data, or {@code -1} if the end of the
* file is reached.
* @throws IOException if an I/O error occurs.
*/
@ -237,13 +237,13 @@ class FileInputStream extends InputStream
private native int readBytes(byte b[], int off, int len) throws IOException;
/**
* Reads up to <code>b.length</code> bytes of data from this input
* Reads up to {@code b.length} bytes of data from this input
* stream into an array of bytes. This method blocks until some input
* is available.
*
* @param b the buffer into which the data is read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the file has been reached.
* @throws IOException if an I/O error occurs.
*/
@ -252,21 +252,21 @@ class FileInputStream extends InputStream
}
/**
* Reads up to <code>len</code> bytes of data from this input stream
* into an array of bytes. If <code>len</code> is not zero, the method
* Reads up to {@code len} bytes of data from this input stream
* into an array of bytes. If {@code len} is not zero, the method
* blocks until some input is available; otherwise, no
* bytes are read and <code>0</code> is returned.
* bytes are read and {@code 0} is returned.
*
* @param b the buffer into which the data is read.
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the file has been reached.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[], int off, int len) throws IOException {
@ -274,14 +274,14 @@ class FileInputStream extends InputStream
}
/**
* Skips over and discards <code>n</code> bytes of data from the
* Skips over and discards {@code n} bytes of data from the
* input stream.
*
* <p>The <code>skip</code> method may, for a variety of
* <p>The {@code skip} method may, for a variety of
* reasons, end up skipping over some smaller number of bytes,
* possibly <code>0</code>. If <code>n</code> is negative, the method
* possibly {@code 0}. If {@code n} is negative, the method
* will try to skip backwards. In case the backing file does not support
* backward skip at its current position, an <code>IOException</code> is
* backward skip at its current position, an {@code IOException} is
* thrown. The actual number of bytes skipped is returned. If it skips
* forwards, it returns a positive value. If it skips backwards, it
* returns a negative value.
@ -372,10 +372,10 @@ class FileInputStream extends InputStream
}
/**
* Returns the <code>FileDescriptor</code>
* Returns the {@code FileDescriptor}
* object that represents the connection to
* the actual file in the file system being
* used by this <code>FileInputStream</code>.
* used by this {@code FileInputStream}.
*
* @return the file descriptor object associated with this stream.
* @throws IOException if an I/O error occurs.

View file

@ -45,19 +45,19 @@ public class FileNotFoundException extends IOException {
private static final long serialVersionUID = -897856973823710492L;
/**
* Constructs a <code>FileNotFoundException</code> with
* <code>null</code> as its error detail message.
* Constructs a {@code FileNotFoundException} with
* {@code null} as its error detail message.
*/
public FileNotFoundException() {
super();
}
/**
* Constructs a <code>FileNotFoundException</code> with the
* specified detail message. The string <code>s</code> can be
* Constructs a {@code FileNotFoundException} with the
* specified detail message. The string {@code s} can be
* retrieved later by the
* <code>{@link java.lang.Throwable#getMessage}</code>
* method of class <code>java.lang.Throwable</code>.
* method of class {@code java.lang.Throwable}.
*
* @param s the detail message.
*/
@ -66,9 +66,9 @@ public class FileNotFoundException extends IOException {
}
/**
* Constructs a <code>FileNotFoundException</code> with a detail message
* Constructs a {@code FileNotFoundException} with a detail message
* consisting of the given pathname string followed by the given reason
* string. If the <code>reason</code> argument is <code>null</code> then
* string. If the {@code reason} argument is {@code null} then
* it will be omitted. This private constructor is invoked only by native
* I/O methods.
*

View file

@ -33,16 +33,16 @@ import sun.nio.ch.FileChannelImpl;
/**
* A file output stream is an output stream for writing data to a
* <code>File</code> or to a <code>FileDescriptor</code>. Whether or not
* {@code File} or to a {@code FileDescriptor}. 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 opened
* for writing by only one {@code FileOutputStream} (or other
* file-writing object) at a time. In such situations the constructors in
* this class will fail if the file involved is already open.
*
* <p><code>FileOutputStream</code> is meant for writing streams of raw bytes
* <p>{@code FileOutputStream} is meant for writing streams of raw bytes
* such as image data. For writing streams of characters, consider using
* <code>FileWriter</code>.
* {@code FileWriter}.
*
* @apiNote
* To release resources used by this stream {@link #close} should be called
@ -97,15 +97,15 @@ class FileOutputStream extends OutputStream
/**
* Creates a file output stream to write to the file with the
* specified name. A new <code>FileDescriptor</code> object is
* specified name. A new {@code FileDescriptor} object is
* created to represent this file connection.
* <p>
* First, if there is a security manager, its <code>checkWrite</code>
* method is called with <code>name</code> as its argument.
* First, if there is a security manager, its {@code checkWrite}
* method is called with {@code name} as its argument.
* <p>
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
* reason then a <code>FileNotFoundException</code> is thrown.
* reason then a {@code FileNotFoundException} is thrown.
*
* @implSpec Invoking this constructor with the parameter {@code name} is
* equivalent to invoking {@link #FileOutputStream(String,boolean)
@ -116,7 +116,7 @@ class FileOutputStream extends OutputStream
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies write access
* {@code checkWrite} method denies write access
* to the file.
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
*/
@ -126,26 +126,26 @@ class FileOutputStream extends OutputStream
/**
* Creates a file output stream to write to the file with the specified
* name. If the second argument is <code>true</code>, then
* name. If the second argument is {@code true}, then
* bytes will be written to the end of the file rather than the beginning.
* A new <code>FileDescriptor</code> object is created to represent this
* A new {@code FileDescriptor} object is created to represent this
* file connection.
* <p>
* First, if there is a security manager, its <code>checkWrite</code>
* method is called with <code>name</code> as its argument.
* First, if there is a security manager, its {@code checkWrite}
* method is called with {@code name} as its argument.
* <p>
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
* reason then a <code>FileNotFoundException</code> is thrown.
* reason then a {@code FileNotFoundException} is thrown.
*
* @param name the system-dependent file name
* @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
* @throws FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason.
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies write access
* {@code checkWrite} method denies write access
* to the file.
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
* @since 1.1
@ -158,24 +158,24 @@ class FileOutputStream extends OutputStream
/**
* Creates a file output stream to write to the file represented by
* the specified <code>File</code> object. A new
* <code>FileDescriptor</code> object is created to represent this
* the specified {@code File} object. A new
* {@code FileDescriptor} object is created to represent this
* file connection.
* <p>
* First, if there is a security manager, its <code>checkWrite</code>
* method is called with the path represented by the <code>file</code>
* First, if there is a security manager, its {@code checkWrite}
* method is called with the path represented by the {@code file}
* argument as its argument.
* <p>
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
* reason then a <code>FileNotFoundException</code> is thrown.
* reason then a {@code FileNotFoundException} is thrown.
*
* @param file the file to be opened for writing.
* @throws FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies write access
* {@code checkWrite} method denies write access
* to the file.
* @see java.io.File#getPath()
* @see java.lang.SecurityException
@ -187,27 +187,27 @@ class FileOutputStream extends OutputStream
/**
* Creates a file output stream to write to the file represented by
* the specified <code>File</code> object. If the second argument is
* <code>true</code>, then bytes will be written to the end of the file
* rather than the beginning. A new <code>FileDescriptor</code> object is
* the specified {@code File} object. If the second argument is
* {@code true}, then bytes will be written to the end of the file
* rather than the beginning. A new {@code FileDescriptor} object is
* created to represent this file connection.
* <p>
* First, if there is a security manager, its <code>checkWrite</code>
* method is called with the path represented by the <code>file</code>
* First, if there is a security manager, its {@code checkWrite}
* method is called with the path represented by the {@code file}
* argument as its argument.
* <p>
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
* reason then a <code>FileNotFoundException</code> is thrown.
* reason then a {@code FileNotFoundException} is thrown.
*
* @param file the file to be opened for writing.
* @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
* @throws FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies write access
* {@code checkWrite} method denies write access
* to the file.
* @see java.io.File#getPath()
* @see java.lang.SecurityException
@ -241,21 +241,21 @@ class FileOutputStream extends OutputStream
* descriptor, which represents an existing connection to an actual
* file in the file system.
* <p>
* First, if there is a security manager, its <code>checkWrite</code>
* method is called with the file descriptor <code>fdObj</code>
* First, if there is a security manager, its {@code checkWrite}
* method is called with the file descriptor {@code fdObj}
* argument as its argument.
* <p>
* If <code>fdObj</code> is null then a <code>NullPointerException</code>
* If {@code fdObj} is null then a {@code NullPointerException}
* is thrown.
* <p>
* This constructor does not throw an exception if <code>fdObj</code>
* This constructor does not throw an exception if {@code fdObj}
* is {@link java.io.FileDescriptor#valid() invalid}.
* However, if the methods are invoked on the resulting stream to attempt
* I/O on the stream, an <code>IOException</code> is thrown.
* I/O on the stream, an {@code IOException} is thrown.
*
* @param fdObj the file descriptor to be opened for writing
* @throws SecurityException if a security manager exists and its
* <code>checkWrite</code> method denies
* {@code checkWrite} method denies
* write access to the file descriptor
* @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
*/
@ -303,7 +303,7 @@ class FileOutputStream extends OutputStream
/**
* Writes the specified byte to this file output stream. Implements
* the <code>write</code> method of <code>OutputStream</code>.
* the {@code write} method of {@code OutputStream}.
*
* @param b the byte to be written.
* @throws IOException if an I/O error occurs.
@ -325,7 +325,7 @@ class FileOutputStream extends OutputStream
throws IOException;
/**
* Writes <code>b.length</code> bytes from the specified byte array
* Writes {@code b.length} bytes from the specified byte array
* to this file output stream.
*
* @param b the data.
@ -336,8 +336,8 @@ class FileOutputStream extends OutputStream
}
/**
* Writes <code>len</code> bytes from the specified byte array
* starting at offset <code>off</code> to this file output stream.
* Writes {@code len} bytes from the specified byte array
* starting at offset {@code off} to this file output stream.
*
* @param b the data.
* @param off the start offset in the data.
@ -397,9 +397,9 @@ class FileOutputStream extends OutputStream
/**
* Returns the file descriptor associated with this stream.
*
* @return the <code>FileDescriptor</code> object that represents
* @return the {@code FileDescriptor} object that represents
* the connection to the file in the file system being used
* by this <code>FileOutputStream</code> object.
* by this {@code FileOutputStream} object.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FileDescriptor

View file

@ -46,7 +46,7 @@ import sun.security.util.SecurityConstants;
* <P>
* Pathname is the pathname of the file or directory granted the specified
* actions. A pathname that ends in "/*" (where "/" is
* the file separator character, <code>File.separatorChar</code>) indicates
* the file separator character, {@code File.separatorChar}) indicates
* all the files and directories contained in that directory. A pathname
* that ends with "/-" indicates (recursively) all files
* and subdirectories contained in that directory. Such a pathname is called
@ -70,11 +70,11 @@ import sun.security.util.SecurityConstants;
* <DT> read <DD> read permission
* <DT> write <DD> write permission
* <DT> execute
* <DD> execute permission. Allows <code>Runtime.exec</code> to
* be called. Corresponds to <code>SecurityManager.checkExec</code>.
* <DD> execute permission. Allows {@code Runtime.exec} to
* be called. Corresponds to {@code SecurityManager.checkExec}.
* <DT> delete
* <DD> delete permission. Allows <code>File.delete</code> to
* be called. Corresponds to <code>SecurityManager.checkDelete</code>.
* <DD> delete permission. Allows {@code File.delete} to
* be called. Corresponds to {@code SecurityManager.checkDelete}.
* <DT> readlink
* <DD> read link permission. Allows the target of a
* <a href="../nio/file/package-summary.html#links">symbolic link</a>
@ -426,7 +426,7 @@ public final class FilePermission extends Permission implements Serializable {
* "read", "write", "execute", "delete", and "readlink".
*
* <p>A pathname that ends in "/*" (where "/" is
* the file separator character, <code>File.separatorChar</code>)
* the file separator character, {@code File.separatorChar})
* indicates all the files and directories contained in that directory.
* A pathname that ends with "/-" indicates (recursively) all files and
* subdirectories contained in that directory. The special pathname
@ -468,7 +468,7 @@ public final class FilePermission extends Permission implements Serializable {
* @param actions the action string.
*
* @throws IllegalArgumentException
* If actions is <code>null</code>, empty or contains an action
* If actions is {@code null}, empty or contains an action
* other than the specified possible actions.
*/
public FilePermission(String path, String actions) {
@ -481,7 +481,7 @@ public final class FilePermission extends Permission implements Serializable {
* More efficient than the FilePermission(String, String) constructor.
* Can be used from within
* code that needs to create a FilePermission object to pass into the
* <code>implies</code> method.
* {@code implies} method.
*
* @param path the pathname of the file/directory.
* @param mask the action mask to use.
@ -547,9 +547,9 @@ public final class FilePermission extends Permission implements Serializable {
*
* @param p the permission to check against.
*
* @return <code>true</code> if the specified permission is not
* <code>null</code> and is implied by this object,
* <code>false</code> otherwise.
* @return {@code true} if the specified permission is not
* {@code null} and is implied by this object,
* {@code false} otherwise.
*/
@Override
public boolean implies(Permission p) {
@ -769,9 +769,9 @@ public final class FilePermission extends Permission implements Serializable {
* for itself, even if they are created using the same invalid path.
*
* @param obj the object we are testing for equality with this object.
* @return <code>true</code> if obj is a FilePermission, and has the same
* @return {@code true} if obj is a FilePermission, and has the same
* pathname and actions as this FilePermission object,
* <code>false</code> otherwise.
* {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
@ -987,7 +987,7 @@ public final class FilePermission extends Permission implements Serializable {
* Returns the "canonical string representation" of the actions.
* That is, this method always returns present actions in the following order:
* read, write, execute, delete, readlink. For example, if this FilePermission
* object allows both write and read actions, a call to <code>getActions</code>
* object allows both write and read actions, a call to {@code getActions}
* will return the string "read,write".
*
* @return the canonical string representation of the actions.
@ -1006,27 +1006,27 @@ public final class FilePermission extends Permission implements Serializable {
* <p>
* FilePermission objects must be stored in a manner that allows them
* to be inserted into the collection in any order, but that also enables the
* PermissionCollection <code>implies</code>
* PermissionCollection {@code implies}
* method to be implemented in an efficient (and consistent) manner.
*
* <p>For example, if you have two FilePermissions:
* <OL>
* <LI> <code>"/tmp/-", "read"</code>
* <LI> <code>"/tmp/scratch/foo", "write"</code>
* <LI> {@code "/tmp/-", "read"}
* <LI> {@code "/tmp/scratch/foo", "write"}
* </OL>
*
* <p>and you are calling the <code>implies</code> method with the FilePermission:
* <p>and you are calling the {@code implies} method with the FilePermission:
*
* <pre>
* "/tmp/scratch/foo", "read,write",
* </pre>
*
* then the <code>implies</code> function must
* then the {@code implies} function must
* take into account both the "/tmp/-" and "/tmp/scratch/foo"
* permissions, so the effective permission is "read,write",
* and <code>implies</code> returns true. The "implies" semantics for
* and {@code implies} returns true. The "implies" semantics for
* FilePermissions are handled properly by the PermissionCollection object
* returned by this <code>newPermissionCollection</code> method.
* returned by this {@code newPermissionCollection} method.
*
* @return a new PermissionCollection object suitable for storing
* FilePermissions.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -148,7 +148,7 @@ abstract class FileSystem {
/**
* Create a new empty file with the given pathname. Return
* <code>true</code> if the file was created and <code>false</code> if a
* {@code true} if the file was created and {@code false} if a
* file or directory with the given pathname already exists. Throw an
* IOException if an I/O error occurs.
*/
@ -157,40 +157,40 @@ abstract class FileSystem {
/**
* Delete the file or directory denoted by the given abstract pathname,
* returning <code>true</code> if and only if the operation succeeds.
* returning {@code true} if and only if the operation succeeds.
*/
public abstract boolean delete(File f);
/**
* List the elements of the directory denoted by the given abstract
* pathname. Return an array of strings naming the elements of the
* directory if successful; otherwise, return <code>null</code>.
* directory if successful; otherwise, return {@code null}.
*/
public abstract String[] list(File f);
/**
* Create a new directory denoted by the given abstract pathname,
* returning <code>true</code> if and only if the operation succeeds.
* returning {@code true} if and only if the operation succeeds.
*/
public abstract boolean createDirectory(File f);
/**
* Rename the file or directory denoted by the first abstract pathname to
* the second abstract pathname, returning <code>true</code> if and only if
* the second abstract pathname, returning {@code true} if and only if
* the operation succeeds.
*/
public abstract boolean rename(File f1, File f2);
/**
* Set the last-modified time of the file or directory denoted by the
* given abstract pathname, returning <code>true</code> if and only if the
* given abstract pathname, returning {@code true} if and only if the
* operation succeeds.
*/
public abstract boolean setLastModifiedTime(File f, long time);
/**
* Mark the file or directory denoted by the given abstract pathname as
* read-only, returning <code>true</code> if and only if the operation
* read-only, returning {@code true} if and only if the operation
* succeeds.
*/
public abstract boolean setReadOnly(File f);

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,8 +28,8 @@ package java.io;
/**
* Instances of classes that implement this interface are used to
* filter filenames. These instances are used to filter directory
* listings in the <code>list</code> method of class
* <code>File</code>, and by the Abstract Window Toolkit's file
* listings in the {@code list} method of class
* {@code File}, and by the Abstract Window Toolkit's file
* dialog component.
*
* @author Arthur van Hoff
@ -46,8 +46,8 @@ public interface FilenameFilter {
*
* @param dir the directory in which the file was found.
* @param name the name of the file.
* @return <code>true</code> if and only if the name should be
* included in the file list; <code>false</code> otherwise.
* @return {@code true} if and only if the name should be
* included in the file list; {@code false} otherwise.
*/
boolean accept(File dir, String name);
}

View file

@ -26,15 +26,15 @@
package java.io;
/**
* A <code>FilterInputStream</code> contains
* A {@code FilterInputStream} contains
* some other input stream, which it uses as
* its basic source of data, possibly transforming
* the data along the way or providing additional
* functionality. The class <code>FilterInputStream</code>
* functionality. The class {@code FilterInputStream}
* itself simply overrides all methods of
* <code>InputStream</code> with versions that
* {@code InputStream} with versions that
* pass all requests to the contained input
* stream. Subclasses of <code>FilterInputStream</code>
* stream. Subclasses of {@code FilterInputStream}
* may further override some of these methods
* and may also provide additional methods
* and fields.
@ -50,12 +50,12 @@ class FilterInputStream extends InputStream {
protected volatile InputStream in;
/**
* Creates a <code>FilterInputStream</code>
* by assigning the argument <code>in</code>
* to the field <code>this.in</code> so as
* Creates a {@code FilterInputStream}
* by assigning the argument {@code in}
* to the field {@code this.in} so as
* to remember it for later use.
*
* @param in the underlying input stream, or <code>null</code> if
* @param in the underlying input stream, or {@code null} if
* this instance is to be created without an underlying stream.
*/
protected FilterInputStream(InputStream in) {
@ -64,17 +64,17 @@ class FilterInputStream extends InputStream {
/**
* Reads the next byte of data from this input stream. The value
* byte is returned as an <code>int</code> in the range
* <code>0</code> to <code>255</code>. If no byte is available
* byte is returned as an {@code int} in the range
* {@code 0} to {@code 255}. If no byte is available
* because the end of the stream has been reached, the value
* <code>-1</code> is returned. This method blocks until input data
* {@code -1} is returned. This method blocks until input data
* is available, the end of the stream is detected, or an exception
* is thrown.
* <p>
* This method
* simply performs <code>in.read()</code> and returns the result.
* simply performs {@code in.read()} and returns the result.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
@ -84,21 +84,21 @@ class FilterInputStream extends InputStream {
}
/**
* Reads up to <code>b.length</code> bytes of data from this
* Reads up to {@code b.length} bytes of data from this
* input stream into an array of bytes. This method blocks until some
* input is available.
* <p>
* This method simply performs the call
* <code>read(b, 0, b.length)</code> and returns
* {@code read(b, 0, b.length)} and returns
* the result. It is important that it does
* <i>not</i> do <code>in.read(b)</code> instead;
* certain subclasses of <code>FilterInputStream</code>
* <i>not</i> do {@code in.read(b)} instead;
* certain subclasses of {@code FilterInputStream}
* depend on the implementation strategy actually
* used.
*
* @param b the buffer into which the data is read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#read(byte[], int, int)
@ -108,24 +108,24 @@ class FilterInputStream extends InputStream {
}
/**
* Reads up to <code>len</code> bytes of data from this input stream
* into an array of bytes. If <code>len</code> is not zero, the method
* Reads up to {@code len} bytes of data from this input stream
* into an array of bytes. If {@code len} is not zero, the method
* blocks until some input is available; otherwise, no
* bytes are read and <code>0</code> is returned.
* bytes are read and {@code 0} is returned.
* <p>
* This method simply performs <code>in.read(b, off, len)</code>
* This method simply performs {@code in.read(b, off, len)}
* and returns the result.
*
* @param b the buffer into which the data is read.
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
@ -134,13 +134,13 @@ class FilterInputStream extends InputStream {
}
/**
* Skips over and discards <code>n</code> bytes of data from the
* input stream. The <code>skip</code> method may, for a variety of
* Skips over and discards {@code n} bytes of data from the
* input stream. The {@code skip} method may, for a variety of
* reasons, end up skipping over some smaller number of bytes,
* possibly <code>0</code>. The actual number of bytes skipped is
* possibly {@code 0}. The actual number of bytes skipped is
* returned.
* <p>
* This method simply performs <code>in.skip(n)</code>.
* This method simply performs {@code in.skip(n)}.
*
* @param n the number of bytes to be skipped.
* @return the actual number of bytes skipped.
@ -171,7 +171,7 @@ class FilterInputStream extends InputStream {
* Closes this input stream and releases any system resources
* associated with the stream.
* This
* method simply performs <code>in.close()</code>.
* method simply performs {@code in.close()}.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
@ -182,14 +182,14 @@ class FilterInputStream extends InputStream {
/**
* Marks the current position in this input stream. A subsequent
* call to the <code>reset</code> method repositions this stream at
* call to the {@code reset} method repositions this stream at
* the last marked position so that subsequent reads re-read the same bytes.
* <p>
* The <code>readlimit</code> argument tells this input stream to
* The {@code readlimit} argument tells this input stream to
* allow that many bytes to be read before the mark position gets
* invalidated.
* <p>
* This method simply performs <code>in.mark(readlimit)</code>.
* This method simply performs {@code in.mark(readlimit)}.
*
* @param readlimit the maximum limit of bytes that can be read before
* the mark position becomes invalid.
@ -202,10 +202,10 @@ class FilterInputStream extends InputStream {
/**
* Repositions this stream to the position at the time the
* <code>mark</code> method was last called on this input stream.
* {@code mark} method was last called on this input stream.
* <p>
* This method
* simply performs <code>in.reset()</code>.
* simply performs {@code in.reset()}.
* <p>
* Stream marks are intended to be used in
* situations where you need to read ahead a little to see what's in
@ -226,14 +226,14 @@ class FilterInputStream extends InputStream {
}
/**
* Tests if this input stream supports the <code>mark</code>
* and <code>reset</code> methods.
* Tests if this input stream supports the {@code mark}
* and {@code reset} methods.
* This method
* simply performs <code>in.markSupported()</code>.
* simply performs {@code in.markSupported()}.
*
* @return <code>true</code> if this stream type supports the
* <code>mark</code> and <code>reset</code> method;
* <code>false</code> otherwise.
* @return {@code true} if this stream type supports the
* {@code mark} and {@code reset} method;
* {@code false} otherwise.
* @see java.io.FilterInputStream#in
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()

View file

@ -32,10 +32,10 @@ package java.io;
* basic sink of data, but possibly transforming the data along the
* way or providing additional functionality.
* <p>
* The class <code>FilterOutputStream</code> itself simply overrides
* all methods of <code>OutputStream</code> with versions that pass
* The class {@code FilterOutputStream} itself simply overrides
* all methods of {@code OutputStream} with versions that pass
* all requests to the underlying output stream. Subclasses of
* <code>FilterOutputStream</code> may further override some of these
* {@code FilterOutputStream} may further override some of these
* methods as well as provide additional methods and fields.
*
* @author Jonathan Payne
@ -63,7 +63,7 @@ public class FilterOutputStream extends OutputStream {
*
* @param out the underlying output stream to be assigned to
* the field {@code this.out} for later use, or
* <code>null</code> if this instance is to be
* {@code null} if this instance is to be
* created without an underlying stream.
*/
public FilterOutputStream(OutputStream out) {
@ -71,15 +71,15 @@ public class FilterOutputStream extends OutputStream {
}
/**
* Writes the specified <code>byte</code> to this output stream.
* Writes the specified {@code byte} to this output stream.
* <p>
* The <code>write</code> method of <code>FilterOutputStream</code>
* calls the <code>write</code> method of its underlying output stream,
* The {@code write} method of {@code FilterOutputStream}
* calls the {@code write} method of its underlying output stream,
* that is, it performs {@code out.write(b)}.
* <p>
* Implements the abstract {@code write} method of {@code OutputStream}.
*
* @param b the <code>byte</code>.
* @param b the {@code byte}.
* @throws IOException if an I/O error occurs.
*/
@Override
@ -88,16 +88,16 @@ public class FilterOutputStream extends OutputStream {
}
/**
* Writes <code>b.length</code> bytes to this output stream.
* Writes {@code b.length} bytes to this output stream.
* <p>
* The <code>write</code> method of <code>FilterOutputStream</code>
* calls its <code>write</code> method of three arguments with the
* arguments <code>b</code>, <code>0</code>, and
* <code>b.length</code>.
* The {@code write} method of {@code FilterOutputStream}
* calls its {@code write} method of three arguments with the
* arguments {@code b}, {@code 0}, and
* {@code b.length}.
* <p>
* Note that this method does not call the one-argument
* <code>write</code> method of its underlying output stream with
* the single argument <code>b</code>.
* {@code write} method of its underlying output stream with
* the single argument {@code b}.
*
* @param b the data to be written.
* @throws IOException if an I/O error occurs.
@ -109,17 +109,17 @@ public class FilterOutputStream extends OutputStream {
}
/**
* Writes <code>len</code> bytes from the specified
* <code>byte</code> array starting at offset <code>off</code> to
* Writes {@code len} bytes from the specified
* {@code byte} array starting at offset {@code off} to
* this output stream.
* <p>
* The <code>write</code> method of <code>FilterOutputStream</code>
* calls the <code>write</code> method of one argument on each
* <code>byte</code> to output.
* The {@code write} method of {@code FilterOutputStream}
* calls the {@code write} method of one argument on each
* {@code byte} to output.
* <p>
* Note that this method does not call the <code>write</code> method
* Note that this method does not call the {@code write} method
* of its underlying output stream with the same arguments. Subclasses
* of <code>FilterOutputStream</code> should provide a more efficient
* of {@code FilterOutputStream} should provide a more efficient
* implementation of this method.
*
* @param b the data.
@ -142,8 +142,8 @@ public class FilterOutputStream extends OutputStream {
* Flushes this output stream and forces any buffered output bytes
* to be written out to the stream.
* <p>
* The <code>flush</code> method of <code>FilterOutputStream</code>
* calls the <code>flush</code> method of its underlying output stream.
* The {@code flush} method of {@code FilterOutputStream}
* calls the {@code flush} method of its underlying output stream.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out

View file

@ -28,9 +28,9 @@ package java.io;
/**
* Abstract class for reading filtered character streams.
* The abstract class <code>FilterReader</code> itself
* The abstract class {@code FilterReader} itself
* provides default methods that pass all requests to
* the contained stream. Subclasses of <code>FilterReader</code>
* the contained stream. Subclasses of {@code FilterReader}
* should override some of these methods and may also provide
* additional methods and fields.
*
@ -49,7 +49,7 @@ public abstract class FilterReader extends Reader {
* Creates a new filtered reader.
*
* @param in a Reader object providing the underlying stream.
* @throws NullPointerException if <code>in</code> is <code>null</code>
* @throws NullPointerException if {@code in} is {@code null}
*/
protected FilterReader(Reader in) {
super(in);

View file

@ -28,9 +28,9 @@ package java.io;
/**
* Abstract class for writing filtered character streams.
* The abstract class <code>FilterWriter</code> itself
* The abstract class {@code FilterWriter} itself
* provides default methods that pass all requests to the
* contained stream. Subclasses of <code>FilterWriter</code>
* contained stream. Subclasses of {@code FilterWriter}
* should override some of these methods and may also
* provide additional methods and fields.
*
@ -49,7 +49,7 @@ public abstract class FilterWriter extends Writer {
* Create a new filtered writer.
*
* @param out a Writer object to provide the underlying stream.
* @throws NullPointerException if <code>out</code> is <code>null</code>
* @throws NullPointerException if {@code out} is {@code null}
*/
protected FilterWriter(Writer out) {
super(out);

View file

@ -34,7 +34,7 @@ import java.util.Objects;
* This abstract class is the superclass of all classes representing
* an input stream of bytes.
*
* <p> Applications that need to define a subclass of <code>InputStream</code>
* <p> Applications that need to define a subclass of {@code InputStream}
* must always provide a method that returns the next byte of input.
*
* @author Arthur van Hoff
@ -167,15 +167,15 @@ public abstract class InputStream implements Closeable {
/**
* Reads the next byte of data from the input stream. The value byte is
* returned as an <code>int</code> in the range <code>0</code> to
* <code>255</code>. If no byte is available because the end of the stream
* has been reached, the value <code>-1</code> is returned. This method
* returned as an {@code int} in the range {@code 0} to
* {@code 255}. If no byte is available because the end of the stream
* has been reached, the value {@code -1} is returned. This method
* blocks until input data is available, the end of the stream is detected,
* or an exception is thrown.
*
* <p> A subclass must provide an implementation of this method.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if an I/O error occurs.
*/
@ -183,35 +183,35 @@ public abstract class InputStream implements Closeable {
/**
* Reads some number of bytes from the input stream and stores them into
* the buffer array <code>b</code>. The number of bytes actually read is
* the buffer array {@code b}. The number of bytes actually read is
* returned as an integer. This method blocks until input data is
* available, end of file is detected, or an exception is thrown.
*
* <p> If the length of <code>b</code> is zero, then no bytes are read and
* <code>0</code> is returned; otherwise, there is an attempt to read at
* <p> If the length of {@code b} is zero, then no bytes are read and
* {@code 0} is returned; otherwise, there is an attempt to read at
* least one byte. If no byte is available because the stream is at the
* end of the file, the value <code>-1</code> is returned; otherwise, at
* least one byte is read and stored into <code>b</code>.
* end of the file, the value {@code -1} is returned; otherwise, at
* least one byte is read and stored into {@code b}.
*
* <p> The first byte read is stored into element <code>b[0]</code>, the
* next one into <code>b[1]</code>, and so on. The number of bytes read is,
* at most, equal to the length of <code>b</code>. Let <i>k</i> be the
* <p> The first byte read is stored into element {@code b[0]}, the
* next one into {@code b[1]}, and so on. The number of bytes read is,
* at most, equal to the length of {@code b}. Let <i>k</i> be the
* number of bytes actually read; these bytes will be stored in elements
* <code>b[0]</code> through <code>b[</code><i>k</i><code>-1]</code>,
* leaving elements <code>b[</code><i>k</i><code>]</code> through
* <code>b[b.length-1]</code> unaffected.
* {@code b[0]} through {@code b[}<i>k</i>{@code -1]},
* leaving elements {@code b[}<i>k</i>{@code ]} through
* {@code b[b.length-1]} unaffected.
*
* <p> The <code>read(b)</code> method for class <code>InputStream</code>
* has the same effect as: <pre><code> read(b, 0, b.length) </code></pre>
* <p> The {@code read(b)} method for class {@code InputStream}
* has the same effect as: <pre>{@code read(b, 0, b.length) }</pre>
*
* @param b the buffer into which the data is read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws IOException If the first byte cannot be read for any reason
* other than the end of the file, if the input stream has been
* closed, or if some other I/O error occurs.
* @throws NullPointerException if <code>b</code> is <code>null</code>.
* @throws NullPointerException if {@code b} is {@code null}.
* @see java.io.InputStream#read(byte[], int, int)
*/
public int read(byte b[]) throws IOException {
@ -219,60 +219,60 @@ public abstract class InputStream implements Closeable {
}
/**
* Reads up to <code>len</code> bytes of data from the input stream into
* Reads up to {@code len} bytes of data from the input stream into
* an array of bytes. An attempt is made to read as many as
* <code>len</code> bytes, but a smaller number may be read.
* {@code len} bytes, but a smaller number may be read.
* The number of bytes actually read is returned as an integer.
*
* <p> This method blocks until input data is available, end of file is
* detected, or an exception is thrown.
*
* <p> If <code>len</code> is zero, then no bytes are read and
* <code>0</code> is returned; otherwise, there is an attempt to read at
* <p> If {@code len} is zero, then no bytes are read and
* {@code 0} is returned; otherwise, there is an attempt to read at
* least one byte. If no byte is available because the stream is at end of
* file, the value <code>-1</code> is returned; otherwise, at least one
* byte is read and stored into <code>b</code>.
* file, the value {@code -1} is returned; otherwise, at least one
* byte is read and stored into {@code b}.
*
* <p> The first byte read is stored into element <code>b[off]</code>, the
* next one into <code>b[off+1]</code>, and so on. The number of bytes read
* is, at most, equal to <code>len</code>. Let <i>k</i> be the number of
* <p> The first byte read is stored into element {@code b[off]}, the
* next one into {@code b[off+1]}, and so on. The number of bytes read
* is, at most, equal to {@code len}. Let <i>k</i> be the number of
* bytes actually read; these bytes will be stored in elements
* <code>b[off]</code> through <code>b[off+</code><i>k</i><code>-1]</code>,
* leaving elements <code>b[off+</code><i>k</i><code>]</code> through
* <code>b[off+len-1]</code> unaffected.
* {@code b[off]} through {@code b[off+}<i>k</i>{@code -1]},
* leaving elements {@code b[off+}<i>k</i>{@code ]} through
* {@code b[off+len-1]} unaffected.
*
* <p> In every case, elements <code>b[0]</code> through
* <code>b[off-1]</code> and elements <code>b[off+len]</code> through
* <code>b[b.length-1]</code> are unaffected.
* <p> In every case, elements {@code b[0]} through
* {@code b[off-1]} and elements {@code b[off+len]} through
* {@code b[b.length-1]} are unaffected.
*
* <p> The <code>read(b,</code> <code>off,</code> <code>len)</code> method
* for class <code>InputStream</code> simply calls the method
* <code>read()</code> repeatedly. If the first such call results in an
* <code>IOException</code>, that exception is returned from the call to
* the <code>read(b,</code> <code>off,</code> <code>len)</code> method. If
* any subsequent call to <code>read()</code> results in a
* <code>IOException</code>, the exception is caught and treated as if it
* <p> The {@code read(b, off, len)} method
* for class {@code InputStream} simply calls the method
* {@code read()} repeatedly. If the first such call results in an
* {@code IOException}, that exception is returned from the call to
* the {@code read(b,} {@code off,} {@code len)} method. If
* any subsequent call to {@code read()} results in a
* {@code IOException}, the exception is caught and treated as if it
* were end of file; the bytes read up to that point are stored into
* <code>b</code> and the number of bytes read before the exception
* {@code b} and the number of bytes read before the exception
* occurred is returned. The default implementation of this method blocks
* until the requested amount of input data <code>len</code> has been read,
* until the requested amount of input data {@code len} has been read,
* end of file is detected, or an exception is thrown. Subclasses are
* encouraged to provide a more efficient implementation of this method.
*
* @param b the buffer into which the data is read.
* @param off the start offset in array <code>b</code>
* @param off the start offset in array {@code b}
* at which the data is written.
* @param len the maximum number of bytes to read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws IOException If the first byte cannot be read for any reason
* other than end of file, or if the input stream has been closed,
* or if some other I/O error occurs.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @see java.io.InputStream#read()
*/
public int read(byte b[], int off, int len) throws IOException {
@ -509,18 +509,18 @@ public abstract class InputStream implements Closeable {
}
/**
* Skips over and discards <code>n</code> bytes of data from this input
* stream. The <code>skip</code> method may, for a variety of reasons, end
* up skipping over some smaller number of bytes, possibly <code>0</code>.
* Skips over and discards {@code n} bytes of data from this input
* stream. The {@code skip} method may, for a variety of reasons, end
* up skipping over some smaller number of bytes, possibly {@code 0}.
* This may result from any of a number of conditions; reaching end of file
* before <code>n</code> bytes have been skipped is only one possibility.
* before {@code n} bytes have been skipped is only one possibility.
* The actual number of bytes skipped is returned. If {@code n} is
* negative, the {@code skip} method for class {@code InputStream} always
* returns 0, and no bytes are skipped. Subclasses may handle the negative
* value differently.
*
* <p> The <code>skip</code> method implementation of this class creates a
* byte array and then repeatedly reads into it until <code>n</code> bytes
* <p> The {@code skip} method implementation of this class creates a
* byte array and then repeatedly reads into it until {@code n} bytes
* have been read or the end of the stream has been reached. Subclasses are
* encouraged to provide a more efficient implementation of this method.
* For instance, the implementation may depend on the ability to seek.
@ -644,7 +644,7 @@ public abstract class InputStream implements Closeable {
* Closes this input stream and releases any system resources associated
* with the stream.
*
* <p> The <code>close</code> method of <code>InputStream</code> does
* <p> The {@code close} method of {@code InputStream} does
* nothing.
*
* @throws IOException if an I/O error occurs.
@ -653,24 +653,24 @@ public abstract class InputStream implements Closeable {
/**
* Marks the current position in this input stream. A subsequent call to
* the <code>reset</code> method repositions this stream at the last marked
* the {@code reset} method repositions this stream at the last marked
* position so that subsequent reads re-read the same bytes.
*
* <p> The <code>readlimit</code> arguments tells this input stream to
* <p> The {@code readlimit} arguments tells this input stream to
* allow that many bytes to be read before the mark position gets
* invalidated.
*
* <p> The general contract of <code>mark</code> is that, if the method
* <code>markSupported</code> returns <code>true</code>, the stream somehow
* remembers all the bytes read after the call to <code>mark</code> and
* <p> The general contract of {@code mark} is that, if the method
* {@code markSupported} returns {@code true}, the stream somehow
* remembers all the bytes read after the call to {@code mark} and
* stands ready to supply those same bytes again if and whenever the method
* <code>reset</code> is called. However, the stream is not required to
* remember any data at all if more than <code>readlimit</code> bytes are
* read from the stream before <code>reset</code> is called.
* {@code reset} is called. However, the stream is not required to
* remember any data at all if more than {@code readlimit} bytes are
* read from the stream before {@code reset} is called.
*
* <p> Marking a closed stream should not have any effect on the stream.
*
* <p> The <code>mark</code> method of <code>InputStream</code> does
* <p> The {@code mark} method of {@code InputStream} does
* nothing.
*
* @param readlimit the maximum limit of bytes that can be read before
@ -681,42 +681,42 @@ public abstract class InputStream implements Closeable {
/**
* Repositions this stream to the position at the time the
* <code>mark</code> method was last called on this input stream.
* {@code mark} method was last called on this input stream.
*
* <p> The general contract of <code>reset</code> is:
* <p> The general contract of {@code reset} is:
*
* <ul>
* <li> If the method <code>markSupported</code> returns
* <code>true</code>, then:
* <li> If the method {@code markSupported} returns
* {@code true}, then:
*
* <ul><li> If the method <code>mark</code> has not been called since
* <ul><li> If the method {@code mark} has not been called since
* the stream was created, or the number of bytes read from the stream
* since <code>mark</code> was last called is larger than the argument
* to <code>mark</code> at that last call, then an
* <code>IOException</code> might be thrown.
* since {@code mark} was last called is larger than the argument
* to {@code mark} at that last call, then an
* {@code IOException} might be thrown.
*
* <li> If such an <code>IOException</code> is not thrown, then the
* <li> If such an {@code IOException} is not thrown, then the
* stream is reset to a state such that all the bytes read since the
* most recent call to <code>mark</code> (or since the start of the
* file, if <code>mark</code> has not been called) will be resupplied
* to subsequent callers of the <code>read</code> method, followed by
* most recent call to {@code mark} (or since the start of the
* file, if {@code mark} has not been called) will be resupplied
* to subsequent callers of the {@code read} method, followed by
* any bytes that otherwise would have been the next input data as of
* the time of the call to <code>reset</code>. </ul>
* the time of the call to {@code reset}. </ul>
*
* <li> If the method <code>markSupported</code> returns
* <code>false</code>, then:
* <li> If the method {@code markSupported} returns
* {@code false}, then:
*
* <ul><li> The call to <code>reset</code> may throw an
* <code>IOException</code>.
* <ul><li> The call to {@code reset} may throw an
* {@code IOException}.
*
* <li> If an <code>IOException</code> is not thrown, then the stream
* <li> If an {@code IOException} is not thrown, then the stream
* is reset to a fixed state that depends on the particular type of the
* input stream and how it was created. The bytes that will be supplied
* to subsequent callers of the <code>read</code> method depend on the
* to subsequent callers of the {@code read} method depend on the
* particular type of the input stream. </ul></ul>
*
* <p>The method <code>reset</code> for class <code>InputStream</code>
* does nothing except throw an <code>IOException</code>.
* <p>The method {@code reset} for class {@code InputStream}
* does nothing except throw an {@code IOException}.
*
* @throws IOException if this stream has not been marked or if the
* mark has been invalidated.
@ -728,14 +728,14 @@ public abstract class InputStream implements Closeable {
}
/**
* Tests if this input stream supports the <code>mark</code> and
* <code>reset</code> methods. Whether or not <code>mark</code> and
* <code>reset</code> are supported is an invariant property of a
* particular input stream instance. The <code>markSupported</code> method
* of <code>InputStream</code> returns <code>false</code>.
* Tests if this input stream supports the {@code mark} and
* {@code reset} methods. Whether or not {@code mark} and
* {@code reset} are supported is an invariant property of a
* particular input stream instance. The {@code markSupported} method
* of {@code InputStream} returns {@code false}.
*
* @return <code>true</code> if this stream instance supports the mark
* and reset methods; <code>false</code> otherwise.
* @return {@code true} if this stream instance supports the mark
* and reset methods; {@code false} otherwise.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
*/

View file

@ -141,11 +141,11 @@ public class InputStreamReader extends Reader {
* <p> If this instance was created with the {@link
* #InputStreamReader(InputStream, String)} constructor then the returned
* name, being unique for the encoding, may differ from the name passed to
* the constructor. This method will return <code>null</code> if the
* the constructor. This method will return {@code null} if the
* stream has been closed.
* </p>
* @return The historical name of this encoding, or
* <code>null</code> if the stream has been closed
* {@code null} if the stream has been closed
*
* @see java.nio.charset.Charset
*

View file

@ -27,7 +27,7 @@ package java.io;
/**
* Signals that an I/O operation has been interrupted. An
* <code>InterruptedIOException</code> is thrown to indicate that an
* {@code InterruptedIOException} is thrown to indicate that an
* input or output transfer has been terminated because the thread
* performing it was interrupted. The field {@link #bytesTransferred}
* indicates how many bytes were successfully transferred before
@ -45,19 +45,19 @@ class InterruptedIOException extends IOException {
private static final long serialVersionUID = 4020568460727500567L;
/**
* Constructs an <code>InterruptedIOException</code> with
* <code>null</code> as its error detail message.
* Constructs an {@code InterruptedIOException} with
* {@code null} as its error detail message.
*/
public InterruptedIOException() {
super();
}
/**
* Constructs an <code>InterruptedIOException</code> with the
* specified detail message. The string <code>s</code> can be
* Constructs an {@code InterruptedIOException} with the
* specified detail message. The string {@code s} can be
* retrieved later by the
* <code>{@link java.lang.Throwable#getMessage}</code>
* method of class <code>java.lang.Throwable</code>.
* method of class {@code java.lang.Throwable}.
*
* @param s the detail message.
*/

View file

@ -41,7 +41,7 @@ public class InvalidObjectException extends ObjectStreamException {
private static final long serialVersionUID = 3233174318281839583L;
/**
* Constructs an <code>InvalidObjectException</code>.
* Constructs an {@code InvalidObjectException}.
* @param reason Detailed message explaining the reason for the failure.
*
* @see ObjectInputValidation

View file

@ -74,7 +74,7 @@ import sun.reflect.misc.ReflectUtil;
* <p>Only objects that support the java.io.Serializable or
* java.io.Externalizable interface can be read from streams.
*
* <p>The method <code>readObject</code> is used to read an object from the
* <p>The method {@code readObject} is used to read an object from the
* stream. Java's safe casting should be used to get the desired type. In
* Java, strings and arrays are objects and are treated as objects during
* serialization. When read they need to be cast to the expected type.
@ -157,7 +157,7 @@ import sun.reflect.misc.ReflectUtil;
* throw OptionalDataExceptions with eof set to true, bytewise reads will
* return -1, and primitive reads will throw EOFExceptions. Note that this
* behavior does not hold for streams written with the old
* <code>ObjectStreamConstants.PROTOCOL_VERSION_1</code> protocol, in which the
* {@code ObjectStreamConstants.PROTOCOL_VERSION_1} protocol, in which the
* end of data written by writeExternal methods is not demarcated, and hence
* cannot be detected.
*
@ -208,7 +208,7 @@ import sun.reflect.misc.ReflectUtil;
* solely of its name; field values of the constant are not transmitted. To
* deserialize an enum constant, ObjectInputStream reads the constant name from
* the stream; the deserialized constant is then obtained by calling the static
* method <code>Enum.valueOf(Class, String)</code> with the enum constant's
* method {@code Enum.valueOf(Class, String)} with the enum constant's
* base type and the received constant name as arguments. Like other
* serializable or externalizable objects, enum constants can function as the
* targets of back references appearing subsequently in the serialization
@ -335,7 +335,7 @@ public class ObjectInputStream
* @throws IOException if an I/O error occurs while reading stream header
* @throws SecurityException if untrusted subclass illegally overrides
* security-sensitive methods
* @throws NullPointerException if <code>in</code> is <code>null</code>
* @throws NullPointerException if {@code in} is {@code null}
* @see ObjectInputStream#ObjectInputStream()
* @see ObjectInputStream#readFields()
* @see ObjectOutputStream#ObjectOutputStream(OutputStream)
@ -360,12 +360,12 @@ public class ObjectInputStream
* {@linkplain ObjectInputFilter.Config#getSerialFilter() the system-wide filter}.
*
* <p>If there is a security manager installed, this method first calls the
* security manager's <code>checkPermission</code> method with the
* <code>SerializablePermission("enableSubclassImplementation")</code>
* security manager's {@code checkPermission} method with the
* {@code SerializablePermission("enableSubclassImplementation")}
* permission to ensure it's ok to enable subclassing.
*
* @throws SecurityException if a security manager exists and its
* <code>checkPermission</code> method denies enabling
* {@code checkPermission} method denies enabling
* subclassing.
* @throws IOException if an I/O error occurs while creating this stream
* @see SecurityManager#checkPermission
@ -587,7 +587,7 @@ public class ObjectInputStream
* Reads the persistent fields from the stream and makes them available by
* name.
*
* @return the <code>GetField</code> object representing the persistent
* @return the {@code GetField} object representing the persistent
* fields of the object being deserialized
* @throws ClassNotFoundException if the class of a serialized object
* could not be found.
@ -651,36 +651,36 @@ public class ObjectInputStream
* description. Subclasses may implement this method to allow classes to
* be fetched from an alternate source.
*
* <p>The corresponding method in <code>ObjectOutputStream</code> is
* <code>annotateClass</code>. This method will be invoked only once for
* <p>The corresponding method in {@code ObjectOutputStream} is
* {@code annotateClass}. This method will be invoked only once for
* each unique class in the stream. This method can be implemented by
* subclasses to use an alternate loading mechanism but must return a
* <code>Class</code> object. Once returned, if the class is not an array
* {@code Class} object. Once returned, if the class is not an array
* class, its serialVersionUID is compared to the serialVersionUID of the
* serialized class, and if there is a mismatch, the deserialization fails
* and an {@link InvalidClassException} is thrown.
*
* <p>The default implementation of this method in
* <code>ObjectInputStream</code> returns the result of calling
* {@code ObjectInputStream} returns the result of calling
* <pre>
* Class.forName(desc.getName(), false, loader)
* </pre>
* where <code>loader</code> is the first class loader on the current
* where {@code loader} is the first class loader on the current
* thread's stack (starting from the currently executing method) that is
* neither the {@linkplain ClassLoader#getPlatformClassLoader() platform
* class loader} nor its ancestor; otherwise, <code>loader</code> is the
* class loader} nor its ancestor; otherwise, {@code loader} is the
* <em>platform class loader</em>. If this call results in a
* <code>ClassNotFoundException</code> and the name of the passed
* <code>ObjectStreamClass</code> instance is the Java language keyword
* for a primitive type or void, then the <code>Class</code> object
* {@code ClassNotFoundException} and the name of the passed
* {@code ObjectStreamClass} instance is the Java language keyword
* for a primitive type or void, then the {@code Class} object
* representing that primitive type or void will be returned
* (e.g., an <code>ObjectStreamClass</code> with the name
* <code>"int"</code> will be resolved to <code>Integer.TYPE</code>).
* Otherwise, the <code>ClassNotFoundException</code> will be thrown to
* (e.g., an {@code ObjectStreamClass} with the name
* {@code "int"} will be resolved to {@code Integer.TYPE}).
* Otherwise, the {@code ClassNotFoundException} will be thrown to
* the caller of this method.
*
* @param desc an instance of class <code>ObjectStreamClass</code>
* @return a <code>Class</code> object corresponding to <code>desc</code>
* @param desc an instance of class {@code ObjectStreamClass}
* @return a {@code Class} object corresponding to {@code desc}
* @throws IOException any of the usual Input/Output exceptions.
* @throws ClassNotFoundException if class of a serialized object cannot
* be found.
@ -711,43 +711,43 @@ public class ObjectInputStream
* <p>This method is called exactly once for each unique proxy class
* descriptor in the stream.
*
* <p>The corresponding method in <code>ObjectOutputStream</code> is
* <code>annotateProxyClass</code>. For a given subclass of
* <code>ObjectInputStream</code> that overrides this method, the
* <code>annotateProxyClass</code> method in the corresponding subclass of
* <code>ObjectOutputStream</code> must write any data or objects read by
* <p>The corresponding method in {@code ObjectOutputStream} is
* {@code annotateProxyClass}. For a given subclass of
* {@code ObjectInputStream} that overrides this method, the
* {@code annotateProxyClass} method in the corresponding subclass of
* {@code ObjectOutputStream} must write any data or objects read by
* this method.
*
* <p>The default implementation of this method in
* <code>ObjectInputStream</code> returns the result of calling
* <code>Proxy.getProxyClass</code> with the list of <code>Class</code>
* objects for the interfaces that are named in the <code>interfaces</code>
* parameter. The <code>Class</code> object for each interface name
* <code>i</code> is the value returned by calling
* {@code ObjectInputStream} returns the result of calling
* {@code Proxy.getProxyClass} with the list of {@code Class}
* objects for the interfaces that are named in the {@code interfaces}
* parameter. The {@code Class} object for each interface name
* {@code i} is the value returned by calling
* <pre>
* Class.forName(i, false, loader)
* </pre>
* where <code>loader</code> is the first class loader on the current
* where {@code loader} is the first class loader on the current
* thread's stack (starting from the currently executing method) that is
* neither the {@linkplain ClassLoader#getPlatformClassLoader() platform
* class loader} nor its ancestor; otherwise, <code>loader</code> is the
* class loader} nor its ancestor; otherwise, {@code loader} is the
* <em>platform class loader</em>.
* Unless any of the resolved interfaces are non-public, this same value
* of <code>loader</code> is also the class loader passed to
* <code>Proxy.getProxyClass</code>; if non-public interfaces are present,
* of {@code loader} is also the class loader passed to
* {@code Proxy.getProxyClass}; if non-public interfaces are present,
* their class loader is passed instead (if more than one non-public
* interface class loader is encountered, an
* <code>IllegalAccessError</code> is thrown).
* If <code>Proxy.getProxyClass</code> throws an
* <code>IllegalArgumentException</code>, <code>resolveProxyClass</code>
* will throw a <code>ClassNotFoundException</code> containing the
* <code>IllegalArgumentException</code>.
* {@code IllegalAccessError} is thrown).
* If {@code Proxy.getProxyClass} throws an
* {@code IllegalArgumentException}, {@code resolveProxyClass}
* will throw a {@code ClassNotFoundException} containing the
* {@code IllegalArgumentException}.
*
* @param interfaces the list of interface names that were
* deserialized in the proxy class descriptor
* @return a proxy class for the specified interfaces
* @throws IOException any exception thrown by the underlying
* <code>InputStream</code>
* {@code InputStream}
* @throws ClassNotFoundException if the proxy class or any of the
* named interfaces could not be found
* @see ObjectOutputStream#annotateProxyClass(Class)
@ -863,7 +863,7 @@ public class ObjectInputStream
* and version number.
*
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* underlying {@code InputStream}
* @throws StreamCorruptedException if control information in the stream
* is inconsistent
*/
@ -884,7 +884,7 @@ public class ObjectInputStream
* item in the serialization stream. Subclasses of ObjectInputStream may
* override this method to read in class descriptors that have been written
* in non-standard formats (by subclasses of ObjectOutputStream which have
* overridden the <code>writeClassDescriptor</code> method). By default,
* overridden the {@code writeClassDescriptor} method). By default,
* this method reads class descriptors according to the format defined in
* the Object Serialization specification.
*
@ -946,7 +946,7 @@ public class ObjectInputStream
*
* @return the number of available bytes.
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* underlying {@code InputStream}
*/
public int available() throws IOException {
return bin.available();
@ -1129,7 +1129,7 @@ public class ObjectInputStream
*
* @return a String copy of the line.
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* underlying {@code InputStream}
* @deprecated This method does not properly convert bytes to characters.
* see DataInputStream for the details and alternatives.
*/
@ -1145,7 +1145,7 @@ public class ObjectInputStream
*
* @return the String.
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* underlying {@code InputStream}
* @throws UTFDataFormatException if read bytes do not represent a valid
* modified UTF-8 encoding of a string
*/
@ -1340,8 +1340,8 @@ public class ObjectInputStream
* @param name the name of the field
* @return true, if and only if the named field is defaulted
* @throws IOException if there are I/O errors while reading from
* the underlying <code>InputStream</code>
* @throws IllegalArgumentException if <code>name</code> does not
* the underlying {@code InputStream}
* @throws IllegalArgumentException if {@code name} does not
* correspond to a serializable field
*/
public abstract boolean defaulted(String name) throws IOException;
@ -1350,12 +1350,12 @@ public class ObjectInputStream
* Get the value of the named boolean field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>boolean</code> field
* @return the value of the named {@code boolean} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract boolean get(String name, boolean val)
@ -1365,12 +1365,12 @@ public class ObjectInputStream
* Get the value of the named byte field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>byte</code> field
* @return the value of the named {@code byte} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract byte get(String name, byte val) throws IOException;
@ -1379,12 +1379,12 @@ public class ObjectInputStream
* Get the value of the named char field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>char</code> field
* @return the value of the named {@code char} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract char get(String name, char val) throws IOException;
@ -1393,12 +1393,12 @@ public class ObjectInputStream
* Get the value of the named short field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>short</code> field
* @return the value of the named {@code short} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract short get(String name, short val) throws IOException;
@ -1407,12 +1407,12 @@ public class ObjectInputStream
* Get the value of the named int field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>int</code> field
* @return the value of the named {@code int} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract int get(String name, int val) throws IOException;
@ -1421,12 +1421,12 @@ public class ObjectInputStream
* Get the value of the named long field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>long</code> field
* @return the value of the named {@code long} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract long get(String name, long val) throws IOException;
@ -1435,12 +1435,12 @@ public class ObjectInputStream
* Get the value of the named float field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>float</code> field
* @return the value of the named {@code float} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract float get(String name, float val) throws IOException;
@ -1449,12 +1449,12 @@ public class ObjectInputStream
* Get the value of the named double field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>double</code> field
* @return the value of the named {@code double} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract double get(String name, double val) throws IOException;
@ -1463,12 +1463,12 @@ public class ObjectInputStream
* Get the value of the named Object field from the persistent field.
*
* @param name the name of the field
* @param val the default value to use if <code>name</code> does not
* @param val the default value to use if {@code name} does not
* have a value
* @return the value of the named <code>Object</code> field
* @return the value of the named {@code Object} field
* @throws IOException if there are I/O errors while reading from the
* underlying <code>InputStream</code>
* @throws IllegalArgumentException if type of <code>name</code> is
* underlying {@code InputStream}
* @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract Object get(String name, Object val) throws IOException;

View file

@ -232,7 +232,7 @@ public class ObjectOutputStream
* @throws IOException if an I/O error occurs while writing stream header
* @throws SecurityException if untrusted subclass illegally overrides
* security-sensitive methods
* @throws NullPointerException if <code>out</code> is <code>null</code>
* @throws NullPointerException if {@code out} is {@code null}
* @since 1.4
* @see ObjectOutputStream#ObjectOutputStream()
* @see ObjectOutputStream#putFields()
@ -259,12 +259,12 @@ public class ObjectOutputStream
* this implementation of ObjectOutputStream.
*
* <p>If there is a security manager installed, this method first calls the
* security manager's <code>checkPermission</code> method with a
* <code>SerializablePermission("enableSubclassImplementation")</code>
* security manager's {@code checkPermission} method with a
* {@code SerializablePermission("enableSubclassImplementation")}
* permission to ensure it's ok to enable subclassing.
*
* @throws SecurityException if a security manager exists and its
* <code>checkPermission</code> method denies enabling
* {@code checkPermission} method denies enabling
* subclassing.
* @throws IOException if an I/O error occurs while creating this stream
* @see SecurityManager#checkPermission
@ -429,7 +429,7 @@ public class ObjectOutputStream
* called otherwise.
*
* @throws IOException if I/O errors occur while writing to the underlying
* <code>OutputStream</code>
* {@code OutputStream}
*/
public void defaultWriteObject() throws IOException {
SerialCallbackContext ctx = curContext;
@ -529,18 +529,18 @@ public class ObjectOutputStream
*
* <p>This method is called exactly once for each unique proxy class
* descriptor in the stream. The default implementation of this method in
* <code>ObjectOutputStream</code> does nothing.
* {@code ObjectOutputStream} does nothing.
*
* <p>The corresponding method in <code>ObjectInputStream</code> is
* <code>resolveProxyClass</code>. For a given subclass of
* <code>ObjectOutputStream</code> that overrides this method, the
* <code>resolveProxyClass</code> method in the corresponding subclass of
* <code>ObjectInputStream</code> must read any data or objects written by
* <code>annotateProxyClass</code>.
* <p>The corresponding method in {@code ObjectInputStream} is
* {@code resolveProxyClass}. For a given subclass of
* {@code ObjectOutputStream} that overrides this method, the
* {@code resolveProxyClass} method in the corresponding subclass of
* {@code ObjectInputStream} must read any data or objects written by
* {@code annotateProxyClass}.
*
* @param cl the proxy class to annotate custom data for
* @throws IOException any exception thrown by the underlying
* <code>OutputStream</code>
* {@code OutputStream}
* @see ObjectInputStream#resolveProxyClass(String[])
* @since 1.3
*/
@ -646,16 +646,16 @@ public class ObjectOutputStream
* stream. Subclasses of ObjectOutputStream may override this method to
* customize the way in which class descriptors are written to the
* serialization stream. The corresponding method in ObjectInputStream,
* <code>readClassDescriptor</code>, should then be overridden to
* {@code readClassDescriptor}, should then be overridden to
* reconstitute the class descriptor from its custom stream representation.
* By default, this method writes class descriptors according to the format
* defined in the Object Serialization specification.
*
* <p>Note that this method will only be called if the ObjectOutputStream
* is not using the old serialization stream format (set by calling
* ObjectOutputStream's <code>useProtocolVersion</code> method). If this
* ObjectOutputStream's {@code useProtocolVersion} method). If this
* serialization stream is using the old format
* (<code>PROTOCOL_VERSION_1</code>), the class descriptor will be written
* ({@code PROTOCOL_VERSION_1}), the class descriptor will be written
* internally in a manner that cannot be overridden or customized.
*
* @param desc class descriptor to write to the stream
@ -889,10 +889,10 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* @throws IllegalArgumentException if <code>name</code> does not
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
* <code>boolean</code>
* {@code boolean}
*/
public abstract void put(String name, boolean val);
@ -901,10 +901,10 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* @throws IllegalArgumentException if <code>name</code> does not
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
* <code>byte</code>
* {@code byte}
*/
public abstract void put(String name, byte val);
@ -913,10 +913,10 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* @throws IllegalArgumentException if <code>name</code> does not
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
* <code>char</code>
* {@code char}
*/
public abstract void put(String name, char val);
@ -925,10 +925,10 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* @throws IllegalArgumentException if <code>name</code> does not
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
* <code>short</code>
* {@code short}
*/
public abstract void put(String name, short val);
@ -937,10 +937,10 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* @throws IllegalArgumentException if <code>name</code> does not
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
* <code>int</code>
* {@code int}
*/
public abstract void put(String name, int val);
@ -949,10 +949,10 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* @throws IllegalArgumentException if <code>name</code> does not
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
* <code>long</code>
* {@code long}
*/
public abstract void put(String name, long val);
@ -961,10 +961,10 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* @throws IllegalArgumentException if <code>name</code> does not
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
* <code>float</code>
* {@code float}
*/
public abstract void put(String name, float val);
@ -973,10 +973,10 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* @throws IllegalArgumentException if <code>name</code> does not
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
* <code>double</code>
* {@code double}
*/
public abstract void put(String name, double val);
@ -985,8 +985,8 @@ public class ObjectOutputStream
*
* @param name the name of the serializable field
* @param val the value to assign to the field
* (which may be <code>null</code>)
* @throws IllegalArgumentException if <code>name</code> does not
* (which may be {@code null})
* @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not a
* reference type
@ -996,18 +996,18 @@ public class ObjectOutputStream
/**
* Write the data and fields to the specified ObjectOutput stream,
* which must be the same stream that produced this
* <code>PutField</code> object.
* {@code PutField} object.
*
* @param out the stream to write the data and fields to
* @throws IOException if I/O errors occur while writing to the
* underlying stream
* @throws IllegalArgumentException if the specified stream is not
* the same stream that produced this <code>PutField</code>
* the same stream that produced this {@code PutField}
* object
* @deprecated This method does not write the values contained by this
* <code>PutField</code> object in a proper format, and may
* {@code PutField} object in a proper format, and may
* result in corruption of the serialization stream. The
* correct way to write <code>PutField</code> data is by
* correct way to write {@code PutField} data is by
* calling the {@link java.io.ObjectOutputStream#writeFields()}
* method.
*/

View file

@ -276,7 +276,7 @@ public class ObjectStreamClass implements Serializable {
* Return the class in the local VM that this version is mapped to. Null
* is returned if there is no corresponding local class.
*
* @return the <code>Class</code> instance that this descriptor represents
* @return the {@code Class} instance that this descriptor represents
*/
@CallerSensitive
public Class<?> forClass() {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -60,10 +60,10 @@ public class ObjectStreamField
/**
* Create a Serializable field with the specified type. This field should
* be documented with a <code>serialField</code> tag.
* be documented with a {@code serialField} tag.
*
* @param name the name of the serializable field
* @param type the <code>Class</code> object of the serializable field
* @param type the {@code Class} object of the serializable field
*/
public ObjectStreamField(String name, Class<?> type) {
this(name, type, false);
@ -197,7 +197,7 @@ public class ObjectStreamField
/**
* Get the name of this field.
*
* @return a <code>String</code> representing the name of the serializable
* @return a {@code String} representing the name of the serializable
* field
*/
public String getName() {
@ -206,12 +206,12 @@ public class ObjectStreamField
/**
* Get the type of the field. If the type is non-primitive and this
* <code>ObjectStreamField</code> was obtained from a deserialized {@link
* ObjectStreamClass} instance, then <code>Object.class</code> is returned.
* Otherwise, the <code>Class</code> object for the type of the field is
* {@code ObjectStreamField} was obtained from a deserialized {@link
* ObjectStreamClass} instance, then {@code Object.class} is returned.
* Otherwise, the {@code Class} object for the type of the field is
* returned.
*
* @return a <code>Class</code> object representing the type of the
* @return a {@code Class} object representing the type of the
* serializable field
*/
@CallerSensitive
@ -303,7 +303,7 @@ public class ObjectStreamField
}
/**
* Compare this field with another <code>ObjectStreamField</code>. Return
* Compare this field with another {@code ObjectStreamField}. Return
* -1 if this is smaller, 0 if equal, 1 if greater. Types that are
* primitives are "smaller" than object types. If equal, the field names
* are compared.

View file

@ -51,7 +51,7 @@ public class OptionalDataException extends ObjectStreamException {
private static final long serialVersionUID = -8011121865681257820L;
/*
* Create an <code>OptionalDataException</code> with a length.
* Create an {@code OptionalDataException} with a length.
*/
OptionalDataException(int len) {
eof = false;
@ -59,7 +59,7 @@ public class OptionalDataException extends ObjectStreamException {
}
/*
* Create an <code>OptionalDataException</code> signifying no
* Create an {@code OptionalDataException} signifying no
* more primitive data is available.
*/
OptionalDataException(boolean end) {

View file

@ -33,7 +33,7 @@ import java.util.Objects;
* and sends them to some sink.
* <p>
* Applications that need to define a subclass of
* <code>OutputStream</code> must always provide at least a method
* {@code OutputStream} must always provide at least a method
* that writes one byte of output.
*
* @author Arthur van Hoff
@ -98,26 +98,26 @@ public abstract class OutputStream implements Closeable, Flushable {
/**
* Writes the specified byte to this output stream. The general
* contract for <code>write</code> is that one byte is written
* contract for {@code write} is that one byte is written
* to the output stream. The byte to be written is the eight
* low-order bits of the argument <code>b</code>. The 24
* high-order bits of <code>b</code> are ignored.
* low-order bits of the argument {@code b}. The 24
* high-order bits of {@code b} are ignored.
* <p>
* Subclasses of <code>OutputStream</code> must provide an
* Subclasses of {@code OutputStream} must provide an
* implementation for this method.
*
* @param b the <code>byte</code>.
* @param b the {@code byte}.
* @throws IOException if an I/O error occurs. In particular,
* an <code>IOException</code> may be thrown if the
* an {@code IOException} may be thrown if the
* output stream has been closed.
*/
public abstract void write(int b) throws IOException;
/**
* Writes <code>b.length</code> bytes from the specified byte array
* to this output stream. The general contract for <code>write(b)</code>
* Writes {@code b.length} bytes from the specified byte array
* to this output stream. The general contract for {@code write(b)}
* is that it should have exactly the same effect as the call
* <code>write(b, 0, b.length)</code>.
* {@code write(b, 0, b.length)}.
*
* @param b the data.
* @throws IOException if an I/O error occurs.
@ -128,31 +128,31 @@ public abstract class OutputStream implements Closeable, Flushable {
}
/**
* Writes <code>len</code> bytes from the specified byte array
* starting at offset <code>off</code> to this output stream.
* The general contract for <code>write(b, off, len)</code> is that
* some of the bytes in the array <code>b</code> are written to the
* output stream in order; element <code>b[off]</code> is the first
* byte written and <code>b[off+len-1]</code> is the last byte written
* Writes {@code len} bytes from the specified byte array
* starting at offset {@code off} to this output stream.
* The general contract for {@code write(b, off, len)} is that
* some of the bytes in the array {@code b} are written to the
* output stream in order; element {@code b[off]} is the first
* byte written and {@code b[off+len-1]} is the last byte written
* by this operation.
* <p>
* The <code>write</code> method of <code>OutputStream</code> calls
* The {@code write} method of {@code OutputStream} calls
* the write method of one argument on each of the bytes to be
* written out. Subclasses are encouraged to override this method and
* provide a more efficient implementation.
* <p>
* If <code>b</code> is <code>null</code>, a
* <code>NullPointerException</code> is thrown.
* If {@code b} is {@code null}, a
* {@code NullPointerException} is thrown.
* <p>
* 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
* If {@code off} is negative, or {@code len} is negative, or
* {@code off+len} is greater than the length of the array
* {@code b}, then an {@code IndexOutOfBoundsException} is thrown.
*
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @throws IOException if an I/O error occurs. In particular,
* an <code>IOException</code> is thrown if the output
* an {@code IOException} is thrown if the output
* stream is closed.
*/
public void write(byte b[], int off, int len) throws IOException {
@ -165,7 +165,7 @@ public abstract class OutputStream implements Closeable, Flushable {
/**
* Flushes this output stream and forces any buffered output bytes
* to be written out. The general contract of <code>flush</code> is
* to be written out. The general contract of {@code flush} is
* that calling it is an indication that, if any bytes previously
* written have been buffered by the implementation of the output
* stream, such bytes should immediately be written to their
@ -177,7 +177,7 @@ public abstract class OutputStream implements Closeable, Flushable {
* passed to the operating system for writing; it does not guarantee that
* they are actually written to a physical device such as a disk drive.
* <p>
* The <code>flush</code> method of <code>OutputStream</code> does nothing.
* The {@code flush} method of {@code OutputStream} does nothing.
*
* @throws IOException if an I/O error occurs.
*/
@ -186,11 +186,11 @@ public abstract class OutputStream implements Closeable, Flushable {
/**
* Closes this output stream and releases any system resources
* associated with this stream. The general contract of <code>close</code>
* associated with this stream. The general contract of {@code close}
* is that it closes the output stream. A closed stream cannot perform
* output operations and cannot be reopened.
* <p>
* The <code>close</code> method of <code>OutputStream</code> does nothing.
* The {@code close} method of {@code OutputStream} does nothing.
*
* @throws IOException if an I/O error occurs.
*/

View file

@ -164,7 +164,7 @@ public class OutputStreamWriter extends Writer {
* been closed. </p>
*
* @return The historical name of this encoding, or possibly
* <code>null</code> if the stream has been closed
* {@code null} if the stream has been closed
*
* @see java.nio.charset.Charset
*

View file

@ -30,9 +30,9 @@ package java.io;
* to a piped output stream; the piped input
* stream then provides whatever data bytes
* are written to the piped output stream.
* Typically, data is read from a <code>PipedInputStream</code>
* Typically, data is read from a {@code PipedInputStream}
* object by one thread and data is written
* to the corresponding <code>PipedOutputStream</code>
* to the corresponding {@code PipedOutputStream}
* by some other thread. Attempting to use
* both objects from a single thread is not
* recommended, as it may deadlock the thread.
@ -80,7 +80,7 @@ public class PipedInputStream extends InputStream {
* The index of the position in the circular buffer at which the
* next byte of data will be stored when received from the connected
* piped output stream. <code>in&lt;0</code> implies the buffer is empty,
* <code>in==out</code> implies the buffer is full
* {@code in==out} implies the buffer is full
* @since 1.1
*/
protected int in = -1;
@ -93,10 +93,10 @@ public class PipedInputStream extends InputStream {
protected int out = 0;
/**
* Creates a <code>PipedInputStream</code> so
* Creates a {@code PipedInputStream} so
* that it is connected to the piped output
* stream <code>src</code>. Data bytes written
* to <code>src</code> will then be available
* stream {@code src}. Data bytes written
* to {@code src} will then be available
* as input from this stream.
*
* @param src the stream to connect to.
@ -107,11 +107,11 @@ public class PipedInputStream extends InputStream {
}
/**
* Creates a <code>PipedInputStream</code> so that it is
* Creates a {@code PipedInputStream} so that it is
* connected to the piped output stream
* <code>src</code> and uses the specified pipe size for
* {@code src} and uses the specified pipe size for
* the pipe's buffer.
* Data bytes written to <code>src</code> will then
* Data bytes written to {@code src} will then
* be available as input from this stream.
*
* @param src the stream to connect to.
@ -127,24 +127,24 @@ public class PipedInputStream extends InputStream {
}
/**
* Creates a <code>PipedInputStream</code> so
* Creates a {@code PipedInputStream} so
* that it is not yet {@linkplain #connect(java.io.PipedOutputStream)
* connected}.
* It must be {@linkplain java.io.PipedOutputStream#connect(
* java.io.PipedInputStream) connected} to a
* <code>PipedOutputStream</code> before being used.
* {@code PipedOutputStream} before being used.
*/
public PipedInputStream() {
initPipe(DEFAULT_PIPE_SIZE);
}
/**
* Creates a <code>PipedInputStream</code> so that it is not yet
* Creates a {@code PipedInputStream} so that it is not yet
* {@linkplain #connect(java.io.PipedOutputStream) connected} and
* uses the specified pipe size for the pipe's buffer.
* It must be {@linkplain java.io.PipedOutputStream#connect(
* java.io.PipedInputStream)
* connected} to a <code>PipedOutputStream</code> before being used.
* connected} to a {@code PipedOutputStream} before being used.
*
* @param pipeSize the size of the pipe's buffer.
* @throws IllegalArgumentException if {@code pipeSize <= 0}.
@ -163,21 +163,21 @@ public class PipedInputStream extends InputStream {
/**
* Causes this piped input stream to be connected
* to the piped output stream <code>src</code>.
* to the piped output stream {@code src}.
* If this object is already connected to some
* other piped output stream, an <code>IOException</code>
* other piped output stream, an {@code IOException}
* is thrown.
* <p>
* If <code>src</code> is an
* unconnected piped output stream and <code>snk</code>
* If {@code src} is an
* unconnected piped output stream and {@code snk}
* is an unconnected piped input stream, they
* may be connected by either the call:
*
* <pre><code>snk.connect(src)</code> </pre>
* <pre>{@code snk.connect(src)} </pre>
* <p>
* or the call:
*
* <pre><code>src.connect(snk)</code> </pre>
* <pre>{@code src.connect(snk)} </pre>
* <p>
* The two calls have the same effect.
*
@ -192,7 +192,7 @@ public class PipedInputStream extends InputStream {
* Receives a byte of data. This method will block if no input is
* available.
* @param b the byte being received
* @throws IOException If the pipe is <a href="#BROKEN"> <code>broken</code></a>,
* @throws IOException If the pipe is <a href="#BROKEN"> {@code broken}</a>,
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed, or if an I/O error occurs.
* @since 1.1
@ -288,16 +288,16 @@ public class PipedInputStream extends InputStream {
/**
* Reads the next byte of data from this piped input stream. The
* value byte is returned as an <code>int</code> in the range
* <code>0</code> to <code>255</code>.
* value byte is returned as an {@code int} in the range
* {@code 0} to {@code 255}.
* This method blocks until input data is available, the end of the
* stream is detected, or an exception is thrown.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if the pipe is
* {@link #connect(java.io.PipedOutputStream) unconnected},
* <a href="#BROKEN"> <code>broken</code></a>, closed,
* <a href="#BROKEN"> {@code broken}</a>, closed,
* or if an I/O error occurs.
*/
public synchronized int read() throws IOException {
@ -341,26 +341,26 @@ public class PipedInputStream extends InputStream {
}
/**
* Reads up to <code>len</code> bytes of data from this piped input
* stream into an array of bytes. Less than <code>len</code> bytes
* Reads up to {@code len} bytes of data from this piped input
* stream into an array of bytes. Less than {@code len} bytes
* will be read if the end of the data stream is reached or if
* <code>len</code> exceeds the pipe's buffer size.
* If <code>len </code> is zero, then no bytes are read and 0 is returned;
* {@code len} exceeds the pipe's buffer size.
* If {@code len } is zero, then no bytes are read and 0 is returned;
* otherwise, the method blocks until at least 1 byte of input is
* available, end of the stream has been detected, or an exception is
* thrown.
*
* @param b the buffer into which the data is read.
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws IOException if the pipe is <a href="#BROKEN"> <code>broken</code></a>,
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws IOException if the pipe is <a href="#BROKEN"> {@code broken}</a>,
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed, or if an I/O error occurs.
*/
@ -418,7 +418,7 @@ public class PipedInputStream extends InputStream {
* without blocking, or {@code 0} if this input stream has been
* closed by invoking its {@link #close()} method, or if the pipe
* is {@link #connect(java.io.PipedOutputStream) unconnected}, or
* <a href="#BROKEN"> <code>broken</code></a>.
* <a href="#BROKEN"> {@code broken}</a>.
*
* @throws IOException if an I/O error occurs.
* @since 1.0.2

View file

@ -31,8 +31,8 @@ import java.io.*;
* A piped output stream can be connected to a piped input stream
* to create a communications pipe. The piped output stream is the
* sending end of the pipe. Typically, data is written to a
* <code>PipedOutputStream</code> object by one thread and data is
* read from the connected <code>PipedInputStream</code> by some
* {@code PipedOutputStream} object by one thread and data is
* read from the connected {@code PipedInputStream} by some
* other thread. Attempting to use both objects from a single thread
* is not recommended as it may deadlock the thread.
* The pipe is said to be <a id=BROKEN> <i>broken</i> </a> if a
@ -55,7 +55,7 @@ class PipedOutputStream extends OutputStream {
/**
* Creates a piped output stream connected to the specified piped
* input stream. Data bytes written to this stream will then be
* available as input from <code>snk</code>.
* available as input from {@code snk}.
*
* @param snk The piped input stream to connect to.
* @throws IOException if an I/O error occurs.
@ -78,10 +78,10 @@ class PipedOutputStream extends OutputStream {
/**
* Connects this piped output stream to a receiver. If this object
* is already connected to some other piped input stream, an
* <code>IOException</code> is thrown.
* {@code IOException} is thrown.
* <p>
* If <code>snk</code> is an unconnected piped input stream and
* <code>src</code> is an unconnected piped output stream, they may
* If {@code snk} is an unconnected piped input stream and
* {@code src} is an unconnected piped output stream, they may
* be connected by either the call:
* <blockquote><pre>
* src.connect(snk)</pre></blockquote>
@ -106,11 +106,11 @@ class PipedOutputStream extends OutputStream {
}
/**
* Writes the specified <code>byte</code> to the piped output stream.
* Writes the specified {@code byte} to the piped output stream.
* <p>
* Implements the <code>write</code> method of <code>OutputStream</code>.
* Implements the {@code write} method of {@code OutputStream}.
*
* @param b the <code>byte</code> to be written.
* @param b the {@code byte} to be written.
* @throws IOException if the pipe is <a href=#BROKEN> broken</a>,
* {@link #connect(java.io.PipedInputStream) unconnected},
* closed, or if an I/O error occurs.
@ -123,8 +123,8 @@ class PipedOutputStream extends OutputStream {
}
/**
* Writes <code>len</code> bytes from the specified byte array
* starting at offset <code>off</code> to this piped output stream.
* Writes {@code len} bytes from the specified byte array
* starting at offset {@code off} to this piped output stream.
* This method blocks until all the bytes are written to the output
* stream.
*

View file

@ -59,7 +59,7 @@ public class PipedReader extends Reader {
* The index of the position in the circular buffer at which the
* next character of data will be stored when received from the connected
* piped writer. <code>in&lt;0</code> implies the buffer is empty,
* <code>in==out</code> implies the buffer is full
* {@code in==out} implies the buffer is full
*/
int in = -1;
@ -70,9 +70,9 @@ public class PipedReader extends Reader {
int out = 0;
/**
* Creates a <code>PipedReader</code> so
* Creates a {@code PipedReader} so
* that it is connected to the piped writer
* <code>src</code>. Data written to <code>src</code>
* {@code src}. Data written to {@code src}
* will then be available as input from this stream.
*
* @param src the stream to connect to.
@ -83,9 +83,9 @@ public class PipedReader extends Reader {
}
/**
* Creates a <code>PipedReader</code> so that it is connected
* to the piped writer <code>src</code> and uses the specified
* pipe size for the pipe's buffer. Data written to <code>src</code>
* Creates a {@code PipedReader} so that it is connected
* to the piped writer {@code src} and uses the specified
* pipe size for the pipe's buffer. Data written to {@code src}
* will then be available as input from this stream.
* @param src the stream to connect to.
@ -101,10 +101,10 @@ public class PipedReader extends Reader {
/**
* Creates a <code>PipedReader</code> so
* Creates a {@code PipedReader} so
* that it is not yet {@linkplain #connect(java.io.PipedWriter)
* connected}. It must be {@linkplain java.io.PipedWriter#connect(
* java.io.PipedReader) connected} to a <code>PipedWriter</code>
* java.io.PipedReader) connected} to a {@code PipedWriter}
* before being used.
*/
public PipedReader() {
@ -112,11 +112,11 @@ public class PipedReader extends Reader {
}
/**
* Creates a <code>PipedReader</code> so that it is not yet
* Creates a {@code PipedReader} so that it is not yet
* {@link #connect(java.io.PipedWriter) connected} and uses
* the specified pipe size for the pipe's buffer.
* It must be {@linkplain java.io.PipedWriter#connect(
* java.io.PipedReader) connected} to a <code>PipedWriter</code>
* java.io.PipedReader) connected} to a {@code PipedWriter}
* before being used.
*
* @param pipeSize the size of the pipe's buffer.
@ -136,21 +136,21 @@ public class PipedReader extends Reader {
/**
* Causes this piped reader to be connected
* to the piped writer <code>src</code>.
* to the piped writer {@code src}.
* If this object is already connected to some
* other piped writer, an <code>IOException</code>
* other piped writer, an {@code IOException}
* is thrown.
* <p>
* If <code>src</code> is an
* unconnected piped writer and <code>snk</code>
* If {@code src} is an
* unconnected piped writer and {@code snk}
* is an unconnected piped reader, they
* may be connected by either the call:
*
* <pre><code>snk.connect(src)</code> </pre>
* <pre>{@code snk.connect(src)} </pre>
* <p>
* or the call:
*
* <pre><code>src.connect(snk)</code> </pre>
* <pre>{@code src.connect(snk)} </pre>
* <p>
* The two calls have the same effect.
*
@ -219,14 +219,14 @@ public class PipedReader extends Reader {
/**
* Reads the next character of data from this piped stream.
* If no character is available because the end of the stream
* has been reached, the value <code>-1</code> is returned.
* has been reached, the value {@code -1} is returned.
* This method blocks until input data is available, the end of
* the stream is detected, or an exception is thrown.
*
* @return the next character of data, or <code>-1</code> if the end of the
* @return the next character of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if the pipe is
* <a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
* <a href=PipedInputStream.html#BROKEN> {@code broken}</a>,
* {@link #connect(java.io.PipedWriter) unconnected}, closed,
* or an I/O error occurs.
*/
@ -270,20 +270,20 @@ public class PipedReader extends Reader {
}
/**
* Reads up to <code>len</code> characters of data from this piped
* stream into an array of characters. Less than <code>len</code> characters
* Reads up to {@code len} characters of data from this piped
* stream into an array of characters. Less than {@code len} characters
* will be read if the end of the data stream is reached or if
* <code>len</code> exceeds the pipe's buffer size. This method
* {@code len} exceeds the pipe's buffer size. This method
* blocks until at least one character of input is available.
*
* @param cbuf the buffer into which the data is read.
* @param off the start offset of the data.
* @param len the maximum number of characters read.
* @return the total number of characters read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws IOException if the pipe is
* <a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
* <a href=PipedInputStream.html#BROKEN> {@code broken}</a>,
* {@link #connect(java.io.PipedWriter) unconnected}, closed,
* or an I/O error occurs.
* @throws IndexOutOfBoundsException {@inheritDoc}
@ -331,7 +331,7 @@ public class PipedReader extends Reader {
* stream is ready if the circular buffer is not empty.
*
* @throws IOException if the pipe is
* <a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
* <a href=PipedInputStream.html#BROKEN> {@code broken}</a>,
* {@link #connect(java.io.PipedWriter) unconnected}, or closed.
*/
public synchronized boolean ready() throws IOException {

View file

@ -50,7 +50,7 @@ public class PipedWriter extends Writer {
/**
* Creates a piped writer connected to the specified piped
* reader. Data characters written to this stream will then be
* available as input from <code>snk</code>.
* available as input from {@code snk}.
*
* @param snk The piped reader to connect to.
* @throws IOException if an I/O error occurs.
@ -73,10 +73,10 @@ public class PipedWriter extends Writer {
/**
* Connects this piped writer to a receiver. If this object
* is already connected to some other piped reader, an
* <code>IOException</code> is thrown.
* {@code IOException} is thrown.
* <p>
* If <code>snk</code> is an unconnected piped reader and
* <code>src</code> is an unconnected piped writer, they may
* If {@code snk} is an unconnected piped reader and
* {@code src} is an unconnected piped writer, they may
* be connected by either the call:
* <blockquote><pre>
* src.connect(snk)</pre></blockquote>
@ -104,16 +104,16 @@ public class PipedWriter extends Writer {
}
/**
* Writes the specified <code>char</code> to the piped output stream.
* Writes the specified {@code char} to the piped output stream.
* If a thread was reading data characters from the connected piped input
* stream, but the thread is no longer alive, then an
* <code>IOException</code> is thrown.
* {@code IOException} is thrown.
* <p>
* Implements the <code>write</code> method of <code>Writer</code>.
* Implements the {@code write} method of {@code Writer}.
*
* @param c the <code>char</code> to be written.
* @param c the {@code char} to be written.
* @throw IOException if the pipe is
* <a href=PipedOutputStream.html#BROKEN> <code>broken</code></a>,
* <a href=PipedOutputStream.html#BROKEN> {@code broken}</a>,
* {@link #connect(java.io.PipedReader) unconnected}, closed
* or an I/O error occurs.
*/
@ -143,7 +143,7 @@ public class PipedWriter extends Writer {
* of the given array
*
* @throws IOException if the pipe is
* <a href=PipedOutputStream.html#BROKEN><code>broken</code></a>,
* <a href=PipedOutputStream.html#BROKEN>{@code broken}</a>,
* {@link #connect(java.io.PipedReader) unconnected}, closed
* or an I/O error occurs.
*/

View file

@ -26,7 +26,7 @@
package java.io;
/**
* A <code>PushbackInputStream</code> adds
* A {@code PushbackInputStream} adds
* functionality to another input stream, namely
* the ability to "push back" or "unread" bytes,
* by storing pushed-back bytes in an internal buffer.
@ -59,8 +59,8 @@ class PushbackInputStream extends FilterInputStream {
/**
* The position within the pushback buffer from which the next byte will
* be read. When the buffer is empty, <code>pos</code> is equal to
* <code>buf.length</code>; when the buffer is full, <code>pos</code> is
* be read. When the buffer is empty, {@code pos} is equal to
* {@code buf.length}; when the buffer is full, {@code pos} is
* equal to zero.
*
* @since 1.1
@ -76,10 +76,10 @@ class PushbackInputStream extends FilterInputStream {
}
/**
* Creates a <code>PushbackInputStream</code>
* with a pushback buffer of the specified <code>size</code>,
* Creates a {@code PushbackInputStream}
* with a pushback buffer of the specified {@code size},
* and saves its argument, the input stream
* <code>in</code>, for later use. Initially,
* {@code in}, for later use. Initially,
* the pushback buffer is empty.
*
* @param in the input stream from which bytes will be read.
@ -97,9 +97,9 @@ class PushbackInputStream extends FilterInputStream {
}
/**
* Creates a <code>PushbackInputStream</code>
* Creates a {@code PushbackInputStream}
* with a 1-byte pushback buffer, and saves its argument, the input stream
* <code>in</code>, for later use. Initially,
* {@code in}, for later use. Initially,
* the pushback buffer is empty.
*
* @param in the input stream from which bytes will be read.
@ -110,18 +110,18 @@ class PushbackInputStream extends FilterInputStream {
/**
* Reads the next byte of data from this input stream. The value
* byte is returned as an <code>int</code> in the range
* <code>0</code> to <code>255</code>. If no byte is available
* byte is returned as an {@code int} in the range
* {@code 0} to {@code 255}. If no byte is available
* because the end of the stream has been reached, the value
* <code>-1</code> is returned. This method blocks until input data
* {@code -1} is returned. This method blocks until input data
* is available, the end of the stream is detected, or an exception
* is thrown.
*
* <p> This method returns the most recently pushed-back byte, if there is
* one, and otherwise calls the <code>read</code> method of its underlying
* one, and otherwise calls the {@code read} method of its underlying
* input stream and returns whatever value that method returns.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* @return the next byte of data, or {@code -1} if the end of the
* stream has been reached.
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
@ -137,23 +137,23 @@ class PushbackInputStream extends FilterInputStream {
}
/**
* Reads up to <code>len</code> bytes of data from this input stream into
* Reads up to {@code len} bytes of data from this input stream into
* an array of bytes. This method first reads any pushed-back bytes; after
* that, if fewer than <code>len</code> bytes have been read then it
* reads from the underlying input stream. If <code>len</code> is not zero, the method
* that, if fewer than {@code len} bytes have been read then it
* reads from the underlying input stream. If {@code len} is not zero, the method
* blocks until at least 1 byte of input is available; otherwise, no
* bytes are read and <code>0</code> is returned.
* bytes are read and {@code 0} is returned.
*
* @param b the buffer into which the data is read.
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
* or an I/O error occurs.
@ -192,9 +192,9 @@ class PushbackInputStream extends FilterInputStream {
/**
* Pushes back a byte by copying it to the front of the pushback buffer.
* After this method returns, the next byte to be read will have the value
* <code>(byte)b</code>.
* {@code (byte)b}.
*
* @param b the <code>int</code> value whose low-order
* @param b the {@code int} value whose low-order
* byte is to be pushed back.
* @throws IOException If there is not enough room in the pushback
* buffer for the byte, or this input stream has been closed by
@ -211,13 +211,13 @@ class PushbackInputStream extends FilterInputStream {
/**
* Pushes back a portion of an array of bytes by copying it to the front
* of the pushback buffer. After this method returns, the next byte to be
* read will have the value <code>b[off]</code>, the byte after that will
* have the value <code>b[off+1]</code>, and so forth.
* read will have the value {@code b[off]}, the byte after that will
* have the value {@code b[off+1]}, and so forth.
*
* @param b the byte array to push back.
* @param off the start offset of the data.
* @param len the number of bytes to push back.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IOException If there is not enough room in the pushback
* buffer for the specified number of bytes,
* or this input stream has been closed by
@ -236,11 +236,11 @@ class PushbackInputStream extends FilterInputStream {
/**
* Pushes back an array of bytes by copying it to the front of the
* pushback buffer. After this method returns, the next byte to be read
* will have the value <code>b[0]</code>, the byte after that will have the
* value <code>b[1]</code>, and so forth.
* will have the value {@code b[0]}, the byte after that will have the
* value {@code b[1]}, and so forth.
*
* @param b the byte array to push back
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IOException If there is not enough room in the pushback
* buffer for the specified number of bytes,
* or this input stream has been closed by
@ -280,14 +280,14 @@ class PushbackInputStream extends FilterInputStream {
}
/**
* Skips over and discards <code>n</code> bytes of data from this
* input stream. The <code>skip</code> method may, for a variety of
* Skips over and discards {@code n} bytes of data from this
* input stream. The {@code skip} method may, for a variety of
* reasons, end up skipping over some smaller number of bytes,
* possibly zero. If <code>n</code> is negative, no bytes are skipped.
* possibly zero. If {@code n} is negative, no bytes are skipped.
*
* <p> The <code>skip</code> method of <code>PushbackInputStream</code>
* <p> The {@code skip} method of {@code PushbackInputStream}
* first skips over the bytes in the pushback buffer, if any. It then
* calls the <code>skip</code> method of the underlying input stream if
* calls the {@code skip} method of the underlying input stream if
* more bytes need to be skipped. The actual number of bytes skipped
* is returned.
*
@ -322,11 +322,11 @@ class PushbackInputStream extends FilterInputStream {
}
/**
* Tests if this input stream supports the <code>mark</code> and
* <code>reset</code> methods, which it does not.
* Tests if this input stream supports the {@code mark} and
* {@code reset} methods, which it does not.
*
* @return <code>false</code>, since this class does not support the
* <code>mark</code> and <code>reset</code> methods.
* @return {@code false}, since this class does not support the
* {@code mark} and {@code reset} methods.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
*/
@ -337,7 +337,7 @@ class PushbackInputStream extends FilterInputStream {
/**
* Marks the current position in this input stream.
*
* <p> The <code>mark</code> method of <code>PushbackInputStream</code>
* <p> The {@code mark} method of {@code PushbackInputStream}
* does nothing.
*
* @param readlimit the maximum limit of bytes that can be read before
@ -349,11 +349,11 @@ class PushbackInputStream extends FilterInputStream {
/**
* Repositions this stream to the position at the time the
* <code>mark</code> method was last called on this input stream.
* {@code mark} method was last called on this input stream.
*
* <p> The method <code>reset</code> for class
* <code>PushbackInputStream</code> does nothing except throw an
* <code>IOException</code>.
* <p> The method {@code reset} for class
* {@code PushbackInputStream} does nothing except throw an
* {@code IOException}.
*
* @throws IOException if this method is invoked.
* @see java.io.InputStream#mark(int)

View file

@ -142,7 +142,7 @@ public class PushbackReader extends FilterReader {
/**
* Pushes back a single character by copying it to the front of the
* pushback buffer. After this method returns, the next character to be read
* will have the value <code>(char)c</code>.
* will have the value {@code (char)c}.
*
* @param c The int value representing a character to be pushed back
*
@ -161,8 +161,8 @@ public class PushbackReader extends FilterReader {
/**
* Pushes back a portion of an array of characters by copying it to the
* front of the pushback buffer. After this method returns, the next
* character to be read will have the value <code>cbuf[off]</code>, the
* character after that will have the value <code>cbuf[off+1]</code>, and
* character to be read will have the value {@code cbuf[off]}, the
* character after that will have the value {@code cbuf[off+1]}, and
* so forth.
*
* @param cbuf Character array
@ -185,8 +185,8 @@ public class PushbackReader extends FilterReader {
/**
* Pushes back an array of characters by copying it to the front of the
* pushback buffer. After this method returns, the next character to be
* read will have the value <code>cbuf[0]</code>, the character after that
* will have the value <code>cbuf[1]</code>, and so forth.
* read will have the value {@code cbuf[0]}, the character after that
* will have the value {@code cbuf[1]}, and so forth.
*
* @param cbuf Character array to push back
*
@ -210,8 +210,8 @@ public class PushbackReader extends FilterReader {
}
/**
* Marks the present position in the stream. The <code>mark</code>
* for class <code>PushbackReader</code> always throws an exception.
* Marks the present position in the stream. The {@code mark}
* for class {@code PushbackReader} always throws an exception.
*
* @throws IOException Always, since mark is not supported
*/
@ -220,8 +220,8 @@ public class PushbackReader extends FilterReader {
}
/**
* Resets the stream. The <code>reset</code> method of
* <code>PushbackReader</code> always throws an exception.
* Resets the stream. The {@code reset} method of
* {@code PushbackReader} always throws an exception.
*
* @throws IOException Always, since reset is not supported
*/
@ -261,7 +261,7 @@ public class PushbackReader extends FilterReader {
*
* @return The number of characters actually skipped
*
* @throws IllegalArgumentException If <code>n</code> is negative.
* @throws IllegalArgumentException If {@code n} is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {

View file

@ -262,7 +262,7 @@ public abstract class Reader implements Readable, Closeable {
*
* @return The number of characters actually skipped
*
* @throws IllegalArgumentException If <code>n</code> is negative.
* @throws IllegalArgumentException If {@code n} is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {

View file

@ -30,7 +30,7 @@ import java.util.Enumeration;
import java.util.Vector;
/**
* A <code>SequenceInputStream</code> represents
* A {@code SequenceInputStream} represents
* the logical concatenation of other input
* streams. It starts out with an ordered
* collection of input streams and reads from
@ -48,17 +48,17 @@ class SequenceInputStream extends InputStream {
InputStream in;
/**
* Initializes a newly created <code>SequenceInputStream</code>
* Initializes a newly created {@code SequenceInputStream}
* by remembering the argument, which must
* be an <code>Enumeration</code> that produces
* objects whose run-time type is <code>InputStream</code>.
* be an {@code Enumeration} that produces
* objects whose run-time type is {@code InputStream}.
* The input streams that are produced by
* the enumeration will be read, in order,
* to provide the bytes to be read from this
* <code>SequenceInputStream</code>. After
* {@code SequenceInputStream}. After
* each input stream from the enumeration
* is exhausted, it is closed by calling its
* <code>close</code> method.
* {@code close} method.
*
* @param e an enumeration of input streams.
* @see java.util.Enumeration
@ -70,11 +70,11 @@ class SequenceInputStream extends InputStream {
/**
* Initializes a newly
* created <code>SequenceInputStream</code>
* created {@code SequenceInputStream}
* by remembering the two arguments, which
* will be read in order, first <code>s1</code>
* and then <code>s2</code>, to provide the
* bytes to be read from this <code>SequenceInputStream</code>.
* will be read in order, first {@code s1}
* and then {@code s2}, to provide the
* bytes to be read from this {@code SequenceInputStream}.
*
* @param s1 the first input stream to read.
* @param s2 the second input stream to read.
@ -135,19 +135,19 @@ class SequenceInputStream extends InputStream {
/**
* Reads the next byte of data from this input stream. The byte is
* returned as an <code>int</code> in the range <code>0</code> to
* <code>255</code>. If no byte is available because the end of the
* stream has been reached, the value <code>-1</code> is returned.
* returned as an {@code int} in the range {@code 0} to
* {@code 255}. If no byte is available because the end of the
* stream has been reached, the value {@code -1} is returned.
* This method blocks until input data is available, the end of the
* stream is detected, or an exception is thrown.
* <p>
* This method
* tries to read one character from the current substream. If it
* reaches the end of the stream, it calls the <code>close</code>
* reaches the end of the stream, it calls the {@code close}
* method of the current substream and begins reading from the next
* substream.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if an I/O error occurs.
*/
@ -163,26 +163,26 @@ class SequenceInputStream extends InputStream {
}
/**
* Reads up to <code>len</code> bytes of data from this input stream
* into an array of bytes. If <code>len</code> is not zero, the method
* Reads up to {@code len} bytes of data from this input stream
* into an array of bytes. If {@code len} is not zero, the method
* blocks until at least 1 byte of input is available; otherwise, no
* bytes are read and <code>0</code> is returned.
* bytes are read and {@code 0} is returned.
* <p>
* The <code>read</code> method of <code>SequenceInputStream</code>
* The {@code read} method of {@code SequenceInputStream}
* tries to read the data from the current substream. If it fails to
* read any characters because the substream has reached the end of
* the stream, it calls the <code>close</code> method of the current
* the stream, it calls the {@code close} method of the current
* substream and begins reading from the next substream.
*
* @param b the buffer into which the data is read.
* @param off the start offset in array <code>b</code>
* @param off the start offset in array {@code b}
* at which the data is written.
* @param len the maximum number of bytes read.
* @return int the number of bytes read.
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is
* greater than <code>b.length - off</code>
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is
* greater than {@code b.length - off}
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[], int off, int len) throws IOException {
@ -208,14 +208,14 @@ class SequenceInputStream extends InputStream {
/**
* Closes this input stream and releases any system resources
* associated with the stream.
* A closed <code>SequenceInputStream</code>
* A closed {@code SequenceInputStream}
* cannot perform input operations and cannot
* be reopened.
* <p>
* If this stream was created
* from an enumeration, all remaining elements
* are requested from the enumeration and closed
* before the <code>close</code> method returns.
* before the {@code close} method returns.
*
* @throws IOException if an I/O error occurs.
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -142,8 +142,8 @@ package java.io;
* serialVersionUID than that of the corresponding sender's class, then
* deserialization will result in an {@link InvalidClassException}. A
* serializable class can declare its own serialVersionUID explicitly by
* declaring a field named <code>"serialVersionUID"</code> that must be static,
* final, and of type <code>long</code>:
* declaring a field named {@code "serialVersionUID"} that must be static,
* final, and of type {@code long}:
*
* <PRE>
* ANY-ACCESS-MODIFIER static final long serialVersionUID = 42L;
@ -157,11 +157,11 @@ package java.io;
* serialVersionUID values, since the default serialVersionUID computation is
* highly sensitive to class details that may vary depending on compiler
* implementations, and can thus result in unexpected
* <code>InvalidClassException</code>s during deserialization. Therefore, to
* {@code InvalidClassException}s during deserialization. Therefore, to
* guarantee a consistent serialVersionUID value across different java compiler
* implementations, a serializable class must declare an explicit
* serialVersionUID value. It is also strongly advised that explicit
* serialVersionUID declarations use the <code>private</code> modifier where
* serialVersionUID declarations use the {@code private} modifier where
* possible, since such declarations apply only to the immediately declaring
* class--serialVersionUID fields are not useful as inherited members. Array
* classes cannot declare an explicit serialVersionUID, so they always have

View file

@ -116,8 +116,8 @@ public final class SerializablePermission extends BasicPermission {
*
* @param name the name of the SerializablePermission.
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
public SerializablePermission(String name)
{
@ -132,8 +132,8 @@ public final class SerializablePermission extends BasicPermission {
* @param name the name of the SerializablePermission.
* @param actions currently unused and must be set to null
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
public SerializablePermission(String name, String actions)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,7 @@ package java.io;
* This class allows an application to create an input stream in
* which the bytes read are supplied by the contents of a string.
* Applications can also read bytes from a byte array by using a
* <code>ByteArrayInputStream</code>.
* {@code ByteArrayInputStream}.
* <p>
* Only the low eight bits of each character in the string are used by
* this class.
@ -40,7 +40,7 @@ package java.io;
* @since 1.0
* @deprecated This class does not properly convert characters into bytes. As
* of JDK&nbsp;1.1, the preferred way to create a stream from a
* string is via the <code>StringReader</code> class.
* string is via the {@code StringReader} class.
*/
@Deprecated
public
@ -76,16 +76,16 @@ class StringBufferInputStream extends InputStream {
/**
* Reads the next byte of data from this input stream. The value
* byte is returned as an <code>int</code> in the range
* <code>0</code> to <code>255</code>. If no byte is available
* byte is returned as an {@code int} in the range
* {@code 0} to {@code 255}. If no byte is available
* because the end of the stream has been reached, the value
* <code>-1</code> is returned.
* {@code -1} is returned.
* <p>
* The <code>read</code> method of
* <code>StringBufferInputStream</code> cannot block. It returns the
* The {@code read} method of
* {@code StringBufferInputStream} cannot block. It returns the
* low eight bits of the next character in this input stream's buffer.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
*/
public synchronized int read() {
@ -93,11 +93,11 @@ class StringBufferInputStream extends InputStream {
}
/**
* Reads up to <code>len</code> bytes of data from this input stream
* Reads up to {@code len} bytes of data from this input stream
* into an array of bytes.
* <p>
* The <code>read</code> method of
* <code>StringBufferInputStream</code> cannot block. It copies the
* The {@code read} method of
* {@code StringBufferInputStream} cannot block. It copies the
* low eight bits from the characters in this input stream's buffer into
* the byte array argument.
*
@ -105,7 +105,7 @@ class StringBufferInputStream extends InputStream {
* @param off the start offset of the data.
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
* <code>-1</code> if there is no more data because the end of
* {@code -1} if there is no more data because the end of
* the stream has been reached.
*/
@SuppressWarnings("deprecation")
@ -133,7 +133,7 @@ class StringBufferInputStream extends InputStream {
}
/**
* Skips <code>n</code> bytes of input from this input stream. Fewer
* Skips {@code n} bytes of input from this input stream. Fewer
* bytes might be skipped if the end of the input stream is reached.
*
* @param n the number of bytes to be skipped.

View file

@ -108,9 +108,9 @@ public class StringReader extends Reader {
* Skips the specified number of characters in the stream. Returns
* the number of characters that were skipped.
*
* <p>The <code>ns</code> parameter may be negative, even though the
* <code>skip</code> method of the {@link Reader} superclass throws
* an exception in this case. Negative values of <code>ns</code> cause the
* <p>The {@code ns} parameter may be negative, even though the
* {@code skip} method of the {@link Reader} superclass throws
* an exception in this case. Negative values of {@code ns} cause the
* stream to skip backwards. Negative return values indicate a skip
* backwards. It is not possible to skip backwards past the beginning of
* the string.

View file

@ -32,7 +32,7 @@ package java.io;
* input stream or by any class that implements the data input
* interface.
* See the
* <a href="DataInput.html#modified-utf-8"><code>DataInput</code></a>
* <a href="DataInput.html#modified-utf-8">{@code DataInput}</a>
* class description for the format in
* which modified UTF-8 strings are read and written.
*
@ -48,19 +48,19 @@ class UTFDataFormatException extends IOException {
private static final long serialVersionUID = 420743449228280612L;
/**
* Constructs a <code>UTFDataFormatException</code> with
* <code>null</code> as its error detail message.
* Constructs a {@code UTFDataFormatException} with
* {@code null} as its error detail message.
*/
public UTFDataFormatException() {
super();
}
/**
* Constructs a <code>UTFDataFormatException</code> with the
* specified detail message. The string <code>s</code> can be
* Constructs a {@code UTFDataFormatException} with the
* specified detail message. The string {@code s} can be
* retrieved later by the
* <code>{@link java.lang.Throwable#getMessage}</code>
* method of class <code>java.lang.Throwable</code>.
* method of class {@code java.lang.Throwable}.
*
* @param s the detail message.
*/

View file

@ -41,14 +41,14 @@ class AbstractMethodError extends IncompatibleClassChangeError {
private static final long serialVersionUID = -1654391082989018462L;
/**
* Constructs an <code>AbstractMethodError</code> with no detail message.
* Constructs an {@code AbstractMethodError} with no detail message.
*/
public AbstractMethodError() {
super();
}
/**
* Constructs an <code>AbstractMethodError</code> with the specified
* Constructs an {@code AbstractMethodError} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -28,7 +28,7 @@ package java.lang;
/**
* Thrown to indicate that an attempt has been made to store the
* wrong type of object into an array of objects. For example, the
* following code generates an <code>ArrayStoreException</code>:
* following code generates an {@code ArrayStoreException}:
* <blockquote><pre>
* Object x[] = new String[3];
* x[0] = new Integer(0);
@ -43,14 +43,14 @@ class ArrayStoreException extends RuntimeException {
private static final long serialVersionUID = -4522193890499838241L;
/**
* Constructs an <code>ArrayStoreException</code> with no detail message.
* Constructs an {@code ArrayStoreException} with no detail message.
*/
public ArrayStoreException() {
super();
}
/**
* Constructs an <code>ArrayStoreException</code> with the specified
* Constructs an {@code ArrayStoreException} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -79,7 +79,7 @@ public class AssertionError extends Error {
/**
* Constructs an AssertionError with its detail message derived
* from the specified <code>boolean</code>, which is converted to
* from the specified {@code boolean}, which is converted to
* a string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
*
@ -91,7 +91,7 @@ public class AssertionError extends Error {
/**
* Constructs an AssertionError with its detail message derived
* from the specified <code>char</code>, which is converted to a
* from the specified {@code char}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
*
@ -103,7 +103,7 @@ public class AssertionError extends Error {
/**
* Constructs an AssertionError with its detail message derived
* from the specified <code>int</code>, which is converted to a
* from the specified {@code int}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
*
@ -115,7 +115,7 @@ public class AssertionError extends Error {
/**
* Constructs an AssertionError with its detail message derived
* from the specified <code>long</code>, which is converted to a
* from the specified {@code long}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
*
@ -127,7 +127,7 @@ public class AssertionError extends Error {
/**
* Constructs an AssertionError with its detail message derived
* from the specified <code>float</code>, which is converted to a
* from the specified {@code float}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
*
@ -139,7 +139,7 @@ public class AssertionError extends Error {
/**
* Constructs an AssertionError with its detail message derived
* from the specified <code>double</code>, which is converted to a
* from the specified {@code double}, which is converted to a
* string as defined in section 15.18.1.1 of
* <cite>The Java&trade; Language Specification</cite>.
*

View file

@ -28,7 +28,7 @@ package java.lang;
/**
* Thrown to indicate that the code has attempted to cast an object
* to a subclass of which it is not an instance. For example, the
* following code generates a <code>ClassCastException</code>:
* following code generates a {@code ClassCastException}:
* <blockquote><pre>
* Object x = new Integer(0);
* System.out.println((String)x);
@ -43,14 +43,14 @@ class ClassCastException extends RuntimeException {
private static final long serialVersionUID = -9223365651070458532L;
/**
* Constructs a <code>ClassCastException</code> with no detail message.
* Constructs a {@code ClassCastException} with no detail message.
*/
public ClassCastException() {
super();
}
/**
* Constructs a <code>ClassCastException</code> with the specified
* Constructs a {@code ClassCastException} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -39,14 +39,14 @@ class ClassFormatError extends LinkageError {
private static final long serialVersionUID = -8420114879011949195L;
/**
* Constructs a <code>ClassFormatError</code> with no detail message.
* Constructs a {@code ClassFormatError} with no detail message.
*/
public ClassFormatError() {
super();
}
/**
* Constructs a <code>ClassFormatError</code> with the specified
* Constructs a {@code ClassFormatError} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -34,10 +34,10 @@ import java.io.ObjectStreamField;
* Thrown when an application tries to load in a class through its
* string name using:
* <ul>
* <li>The <code>forName</code> method in class <code>Class</code>.
* <li>The <code>findSystemClass</code> method in class
* <code>ClassLoader</code> .
* <li>The <code>loadClass</code> method in class <code>ClassLoader</code>.
* <li>The {@code forName} method in class {@code Class}.
* <li>The {@code findSystemClass} method in class
* {@code ClassLoader} .
* <li>The {@code loadClass} method in class {@code ClassLoader}.
* </ul>
* <p>
* but no definition for the class with the specified name could be found.
@ -63,14 +63,14 @@ public class ClassNotFoundException extends ReflectiveOperationException {
private static final long serialVersionUID = 9176873029745254542L;
/**
* Constructs a <code>ClassNotFoundException</code> with no detail message.
* Constructs a {@code ClassNotFoundException} with no detail message.
*/
public ClassNotFoundException() {
super((Throwable)null); // Disallow initCause
}
/**
* Constructs a <code>ClassNotFoundException</code> with the
* Constructs a {@code ClassNotFoundException} with the
* specified detail message.
*
* @param s the detail message.
@ -80,7 +80,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
}
/**
* Constructs a <code>ClassNotFoundException</code> with the
* Constructs a {@code ClassNotFoundException} with the
* specified detail message and optional exception that was
* raised while loading the class.
*
@ -100,7 +100,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
* The {@link Throwable#getCause()} method is now the preferred means of
* obtaining this information.
*
* @return the <code>Exception</code> that was raised while loading a class
* @return the {@code Exception} that was raised while loading a class
* @since 1.2
*/
public Throwable getException() {

View file

@ -26,12 +26,12 @@
package java.lang;
/**
* Thrown to indicate that the <code>clone</code> method in class
* <code>Object</code> has been called to clone an object, but that
* the object's class does not implement the <code>Cloneable</code>
* Thrown to indicate that the {@code clone} method in class
* {@code Object} has been called to clone an object, but that
* the object's class does not implement the {@code Cloneable}
* interface.
* <p>
* Applications that override the <code>clone</code> method can also
* Applications that override the {@code clone} method can also
* throw this exception to indicate that an object could not or
* should not be cloned.
*
@ -47,7 +47,7 @@ class CloneNotSupportedException extends Exception {
private static final long serialVersionUID = 5195511250079656443L;
/**
* Constructs a <code>CloneNotSupportedException</code> with no
* Constructs a {@code CloneNotSupportedException} with no
* detail message.
*/
public CloneNotSupportedException() {
@ -55,7 +55,7 @@ class CloneNotSupportedException extends Exception {
}
/**
* Constructs a <code>CloneNotSupportedException</code> with the
* Constructs a {@code CloneNotSupportedException} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,14 +26,14 @@
package java.lang;
/**
* A class implements the <code>Cloneable</code> interface to
* A class implements the {@code Cloneable} interface to
* indicate to the {@link java.lang.Object#clone()} method that it
* is legal for that method to make a
* field-for-field copy of instances of that class.
* <p>
* Invoking Object's clone method on an instance that does not implement the
* <code>Cloneable</code> interface results in the exception
* <code>CloneNotSupportedException</code> being thrown.
* {@code Cloneable} interface results in the exception
* {@code CloneNotSupportedException} being thrown.
* <p>
* By convention, classes that implement this interface should override
* {@code Object.clone} (which is protected) with a public method.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,15 +34,15 @@ import sun.text.Normalizer;
/**
* This is a utility class for <code>String.toLowerCase()</code> and
* <code>String.toUpperCase()</code>, that handles special casing with
* This is a utility class for {@code String.toLowerCase()} and
* {@code String.toUpperCase()}, that handles special casing with
* conditions. In other words, it handles the mappings with conditions
* that are defined in
* <a href="http://www.unicode.org/Public/UNIDATA/SpecialCasing.txt">Special
* Casing Properties</a> file.
* <p>
* Note that the unconditional case mappings (including 1:M mappings)
* are handled in <code>Character.toLower/UpperCase()</code>.
* are handled in {@code Character.toLower/UpperCase()}.
*/
final class ConditionalSpecialCasing {
@ -329,7 +329,7 @@ final class ConditionalSpecialCasing {
/**
* Implements the "Before_Dot" condition
*
* Specification: C is followed by <code>U+0307 COMBINING DOT ABOVE</code>.
* Specification: C is followed by {@code U+0307 COMBINING DOT ABOVE}.
* Any sequence of characters with a combining class that is
* neither 0 nor 230 may intervene between the current character
* and the combining dot above.

View file

@ -32,7 +32,7 @@ import java.io.ObjectStreamField;
/**
* Signals that an unexpected exception has occurred in a static initializer.
* An <code>ExceptionInInitializerError</code> is thrown to indicate that an
* An {@code ExceptionInInitializerError} is thrown to indicate that an
* exception occurred during evaluation of a static initializer or the
* initializer for a static variable.
*
@ -54,8 +54,8 @@ public class ExceptionInInitializerError extends LinkageError {
private static final long serialVersionUID = 1521711792217232256L;
/**
* Constructs an <code>ExceptionInInitializerError</code> with
* <code>null</code> as its detail message string and with no saved
* Constructs an {@code ExceptionInInitializerError} with
* {@code null} as its detail message string and with no saved
* throwable object.
* A detail message is a String that describes this particular exception.
*/
@ -64,10 +64,10 @@ public class ExceptionInInitializerError extends LinkageError {
}
/**
* Constructs a new <code>ExceptionInInitializerError</code> class by
* saving a reference to the <code>Throwable</code> object thrown for
* Constructs a new {@code ExceptionInInitializerError} class by
* saving a reference to the {@code Throwable} object thrown for
* later retrieval by the {@link #getException()} method. The detail
* message string is set to <code>null</code>.
* message string is set to {@code null}.
*
* @param thrown The exception thrown
*/
@ -97,8 +97,8 @@ public class ExceptionInInitializerError extends LinkageError {
* obtaining this information.
*
* @return the saved throwable object of this
* <code>ExceptionInInitializerError</code>, or <code>null</code>
* if this <code>ExceptionInInitializerError</code> has no saved
* {@code ExceptionInInitializerError}, or {@code null}
* if this {@code ExceptionInInitializerError} has no saved
* throwable object.
*/
public Throwable getException() {

View file

@ -41,14 +41,14 @@ public class IllegalAccessError extends IncompatibleClassChangeError {
private static final long serialVersionUID = -8988904074992417891L;
/**
* Constructs an <code>IllegalAccessError</code> with no detail message.
* Constructs an {@code IllegalAccessError} with no detail message.
*/
public IllegalAccessError() {
super();
}
/**
* Constructs an <code>IllegalAccessError</code> with the specified
* Constructs an {@code IllegalAccessError} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -60,7 +60,7 @@ public class IllegalAccessException extends ReflectiveOperationException {
private static final long serialVersionUID = 6616958222490762034L;
/**
* Constructs an <code>IllegalAccessException</code> without a
* Constructs an {@code IllegalAccessException} without a
* detail message.
*/
public IllegalAccessException() {
@ -68,7 +68,7 @@ public class IllegalAccessException extends ReflectiveOperationException {
}
/**
* Constructs an <code>IllegalAccessException</code> with a detail message.
* Constructs an {@code IllegalAccessException} with a detail message.
*
* @param s the detail message.
*/

View file

@ -35,7 +35,7 @@ package java.lang;
public
class IllegalArgumentException extends RuntimeException {
/**
* Constructs an <code>IllegalArgumentException</code> with no
* Constructs an {@code IllegalArgumentException} with no
* detail message.
*/
public IllegalArgumentException() {
@ -43,7 +43,7 @@ class IllegalArgumentException extends RuntimeException {
}
/**
* Constructs an <code>IllegalArgumentException</code> with the
* Constructs an {@code IllegalArgumentException} with the
* specified detail message.
*
* @param s the detail message.
@ -56,7 +56,7 @@ class IllegalArgumentException extends RuntimeException {
* Constructs a new exception with the specified detail message and
* cause.
*
* <p>Note that the detail message associated with <code>cause</code> is
* <p>Note that the detail message associated with {@code cause} is
* <i>not</i> automatically incorporated in this exception's detail
* message.
*

View file

@ -44,7 +44,7 @@ class IllegalMonitorStateException extends RuntimeException {
private static final long serialVersionUID = 3713306369498869069L;
/**
* Constructs an <code>IllegalMonitorStateException</code> with no
* Constructs an {@code IllegalMonitorStateException} with no
* detail message.
*/
public IllegalMonitorStateException() {
@ -52,7 +52,7 @@ class IllegalMonitorStateException extends RuntimeException {
}
/**
* Constructs an <code>IllegalMonitorStateException</code> with the
* Constructs an {@code IllegalMonitorStateException} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -59,7 +59,7 @@ class IllegalStateException extends RuntimeException {
* Constructs a new exception with the specified detail message and
* cause.
*
* <p>Note that the detail message associated with <code>cause</code> is
* <p>Note that the detail message associated with {@code cause} is
* <i>not</i> automatically incorporated in this exception's detail
* message.
*

View file

@ -28,8 +28,8 @@ package java.lang;
/**
* Thrown to indicate that a thread is not in an appropriate state
* for the requested operation. See, for example, the
* <code>suspend</code> and <code>resume</code> methods in class
* <code>Thread</code>.
* {@code suspend} and {@code resume} methods in class
* {@code Thread}.
*
* @author unascribed
* @see java.lang.Thread#resume()
@ -41,7 +41,7 @@ public class IllegalThreadStateException extends IllegalArgumentException {
private static final long serialVersionUID = -7626246362397460174L;
/**
* Constructs an <code>IllegalThreadStateException</code> with no
* Constructs an {@code IllegalThreadStateException} with no
* detail message.
*/
public IllegalThreadStateException() {
@ -49,7 +49,7 @@ public class IllegalThreadStateException extends IllegalArgumentException {
}
/**
* Constructs an <code>IllegalThreadStateException</code> with the
* Constructs an {@code IllegalThreadStateException} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -39,7 +39,7 @@ class IncompatibleClassChangeError extends LinkageError {
private static final long serialVersionUID = -4914975503642802119L;
/**
* Constructs an <code>IncompatibleClassChangeError</code> with no
* Constructs an {@code IncompatibleClassChangeError} with no
* detail message.
*/
public IncompatibleClassChangeError () {
@ -47,7 +47,7 @@ class IncompatibleClassChangeError extends LinkageError {
}
/**
* Constructs an <code>IncompatibleClassChangeError</code> with the
* Constructs an {@code IncompatibleClassChangeError} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -26,7 +26,7 @@
package java.lang;
/**
* Thrown when an application tries to use the Java <code>new</code>
* Thrown when an application tries to use the Java {@code new}
* construct to instantiate an abstract class or an interface.
* <p>
* Normally, this error is caught by the compiler; this error can
@ -44,14 +44,14 @@ class InstantiationError extends IncompatibleClassChangeError {
private static final long serialVersionUID = -4885810657349421204L;
/**
* Constructs an <code>InstantiationError</code> with no detail message.
* Constructs an {@code InstantiationError} with no detail message.
*/
public InstantiationError() {
super();
}
/**
* Constructs an <code>InstantiationError</code> with the specified
* Constructs an {@code InstantiationError} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,14 +36,14 @@ public class InternalError extends VirtualMachineError {
private static final long serialVersionUID = -9062593416125562365L;
/**
* Constructs an <code>InternalError</code> with no detail message.
* Constructs an {@code InternalError} with no detail message.
*/
public InternalError() {
super();
}
/**
* Constructs an <code>InternalError</code> with the specified
* Constructs an {@code InternalError} with the specified
* detail message.
*
* @param message the detail message.

View file

@ -52,14 +52,14 @@ class InterruptedException extends Exception {
private static final long serialVersionUID = 6700697376100628473L;
/**
* Constructs an <code>InterruptedException</code> with no detail message.
* Constructs an {@code InterruptedException} with no detail message.
*/
public InterruptedException() {
super();
}
/**
* Constructs an <code>InterruptedException</code> with the
* Constructs an {@code InterruptedException} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -37,7 +37,7 @@ class NegativeArraySizeException extends RuntimeException {
private static final long serialVersionUID = -8960118058596991861L;
/**
* Constructs a <code>NegativeArraySizeException</code> with no
* Constructs a {@code NegativeArraySizeException} with no
* detail message.
*/
public NegativeArraySizeException() {
@ -45,7 +45,7 @@ class NegativeArraySizeException extends RuntimeException {
}
/**
* Constructs a <code>NegativeArraySizeException</code> with the
* Constructs a {@code NegativeArraySizeException} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -26,9 +26,9 @@
package java.lang;
/**
* Thrown if the Java Virtual Machine or a <code>ClassLoader</code> instance
* Thrown if the Java Virtual Machine or a {@code ClassLoader} instance
* tries to load in the definition of a class (as part of a normal method call
* or as part of creating a new instance using the <code>new</code> expression)
* or as part of creating a new instance using the {@code new} expression)
* and no definition of the class could be found.
* <p>
* The searched-for class definition existed when the currently
@ -44,14 +44,14 @@ class NoClassDefFoundError extends LinkageError {
private static final long serialVersionUID = 9095859863287012458L;
/**
* Constructs a <code>NoClassDefFoundError</code> with no detail message.
* Constructs a {@code NoClassDefFoundError} with no detail message.
*/
public NoClassDefFoundError() {
super();
}
/**
* Constructs a <code>NoClassDefFoundError</code> with the specified
* Constructs a {@code NoClassDefFoundError} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -42,14 +42,14 @@ class NoSuchFieldError extends IncompatibleClassChangeError {
private static final long serialVersionUID = -3456430195886129035L;
/**
* Constructs a <code>NoSuchFieldError</code> with no detail message.
* Constructs a {@code NoSuchFieldError} with no detail message.
*/
public NoSuchFieldError() {
super();
}
/**
* Constructs a <code>NoSuchFieldError</code> with the specified
* Constructs a {@code NoSuchFieldError} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -43,14 +43,14 @@ class NoSuchMethodError extends IncompatibleClassChangeError {
private static final long serialVersionUID = -3765521442372831335L;
/**
* Constructs a <code>NoSuchMethodError</code> with no detail message.
* Constructs a {@code NoSuchMethodError} with no detail message.
*/
public NoSuchMethodError() {
super();
}
/**
* Constructs a <code>NoSuchMethodError</code> with the
* Constructs a {@code NoSuchMethodError} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -37,14 +37,14 @@ class NoSuchMethodException extends ReflectiveOperationException {
private static final long serialVersionUID = 5034388446362600923L;
/**
* Constructs a <code>NoSuchMethodException</code> without a detail message.
* Constructs a {@code NoSuchMethodException} without a detail message.
*/
public NoSuchMethodException() {
super();
}
/**
* Constructs a <code>NoSuchMethodException</code> with a detail message.
* Constructs a {@code NoSuchMethodException} with a detail message.
*
* @param s the detail message.
*/

View file

@ -40,14 +40,14 @@ class NumberFormatException extends IllegalArgumentException {
static final long serialVersionUID = -2848938806368998894L;
/**
* Constructs a <code>NumberFormatException</code> with no detail message.
* Constructs a {@code NumberFormatException} with no detail message.
*/
public NumberFormatException () {
super();
}
/**
* Constructs a <code>NumberFormatException</code> with the
* Constructs a {@code NumberFormatException} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,23 +26,23 @@
package java.lang;
/**
* The <code>Runnable</code> interface should be implemented by any
* The {@code Runnable} interface should be implemented by any
* class whose instances are intended to be executed by a thread. The
* class must define a method of no arguments called <code>run</code>.
* class must define a method of no arguments called {@code run}.
* <p>
* This interface is designed to provide a common protocol for objects that
* wish to execute code while they are active. For example,
* <code>Runnable</code> is implemented by class <code>Thread</code>.
* {@code Runnable} is implemented by class {@code Thread}.
* Being active simply means that a thread has been started and has not
* yet been stopped.
* <p>
* In addition, <code>Runnable</code> provides the means for a class to be
* active while not subclassing <code>Thread</code>. A class that implements
* <code>Runnable</code> can run without subclassing <code>Thread</code>
* by instantiating a <code>Thread</code> instance and passing itself in
* as the target. In most cases, the <code>Runnable</code> interface should
* be used if you are only planning to override the <code>run()</code>
* method and no other <code>Thread</code> methods.
* In addition, {@code Runnable} provides the means for a class to be
* active while not subclassing {@code Thread}. A class that implements
* {@code Runnable} can run without subclassing {@code Thread}
* by instantiating a {@code Thread} instance and passing itself in
* as the target. In most cases, the {@code Runnable} interface should
* be used if you are only planning to override the {@code run()}
* method and no other {@code Thread} methods.
* This is important because classes should not be subclassed
* unless the programmer intends on modifying or enhancing the fundamental
* behavior of the class.
@ -55,12 +55,12 @@ package java.lang;
@FunctionalInterface
public interface Runnable {
/**
* When an object implementing interface <code>Runnable</code> is used
* When an object implementing interface {@code Runnable} is used
* to create a thread, starting the thread causes the object's
* <code>run</code> method to be called in that separately executing
* {@code run} method to be called in that separately executing
* thread.
* <p>
* The general contract of the method <code>run</code> is that it may
* The general contract of the method {@code run} is that it may
* take any action whatsoever.
*
* @see java.lang.Thread#run()

View file

@ -180,7 +180,7 @@ import java.lang.module.ModuleFinder;
*
* <tr>
* <th scope="row">stopThread</th>
* <td>Stopping of threads via calls to the Thread <code>stop</code>
* <td>Stopping of threads via calls to the Thread {@code stop}
* method</td>
* <td>This allows code to stop any thread in the system provided that it is
* already granted permission to access that thread.
@ -191,9 +191,9 @@ import java.lang.module.ModuleFinder;
* <tr>
* <th scope="row">modifyThreadGroup</th>
* <td>modification of thread groups, e.g., via calls to ThreadGroup
* <code>destroy</code>, <code>getParent</code>, <code>resume</code>,
* <code>setDaemon</code>, <code>setMaxPriority</code>, <code>stop</code>,
* and <code>suspend</code> methods</td>
* {@code destroy}, {@code getParent}, {@code resume},
* {@code setDaemon}, {@code setMaxPriority}, {@code stop},
* and {@code suspend} methods</td>
* <td>This allows an attacker to create thread groups and
* set their run priority.</td>
* </tr>
@ -246,8 +246,8 @@ import java.lang.module.ModuleFinder;
* <tr>
* <th scope="row">accessClassInPackage.{package name}</th>
* <td>Access to the specified package via a class loader's
* <code>loadClass</code> method when that class loader calls
* the SecurityManager <code>checkPackageAccess</code> method</td>
* {@code loadClass} method when that class loader calls
* the SecurityManager {@code checkPackageAccess} method</td>
* <td>This gives code access to classes in packages
* to which it normally does not have access. Malicious code
* may use these classes to help in its attempt to compromise
@ -257,12 +257,12 @@ import java.lang.module.ModuleFinder;
* <tr>
* <th scope="row">defineClassInPackage.{package name}</th>
* <td>Definition of classes in the specified package, via a class
* loader's <code>defineClass</code> method when that class loader calls
* the SecurityManager <code>checkPackageDefinition</code> method.</td>
* loader's {@code defineClass} method when that class loader calls
* the SecurityManager {@code checkPackageDefinition} method.</td>
* <td>This grants code permission to define a class
* in a particular package. This is dangerous because malicious
* code with this permission may define rogue classes in
* trusted packages like <code>java.security</code> or <code>java.lang</code>,
* trusted packages like {@code java.security} or {@code java.lang},
* for example.</td>
* </tr>
*
@ -412,8 +412,8 @@ public final class RuntimePermission extends BasicPermission {
*
* @param name the name of the RuntimePermission.
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
public RuntimePermission(String name)
@ -429,8 +429,8 @@ public final class RuntimePermission extends BasicPermission {
* @param name the name of the RuntimePermission.
* @param actions should be null.
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
public RuntimePermission(String name, String actions)

View file

@ -60,11 +60,11 @@ import sun.security.util.SecurityConstants;
* operation to be performed. The
* application can allow or disallow the operation.
* <p>
* The <code>SecurityManager</code> class contains many methods with
* names that begin with the word <code>check</code>. These methods
* The {@code SecurityManager} class contains many methods with
* names that begin with the word {@code check}. These methods
* are called by various methods in the Java libraries before those
* methods perform certain potentially sensitive operations. The
* invocation of such a <code>check</code> method typically looks like this:
* invocation of such a {@code check} method typically looks like this:
* <blockquote><pre>
* SecurityManager security = System.getSecurityManager();
* if (security != null) {
@ -75,7 +75,7 @@ import sun.security.util.SecurityConstants;
* The security manager is thereby given an opportunity to prevent
* completion of the operation by throwing an exception. A security
* manager routine simply returns if the operation is permitted, but
* throws a <code>SecurityException</code> if the operation is not
* throws a {@code SecurityException} if the operation is not
* permitted.
* <p>
* Environments using a security manager will typically set the security
@ -185,16 +185,16 @@ import sun.security.util.SecurityConstants;
*
* <p>
* If a requested access is allowed,
* <code>checkPermission</code> returns quietly. If denied, a
* <code>SecurityException</code> is thrown.
* {@code checkPermission} returns quietly. If denied, a
* {@code SecurityException} is thrown.
* <p>
* The default implementation of each of the other
* <code>check</code> methods in <code>SecurityManager</code> is to
* call the <code>SecurityManager checkPermission</code> method
* {@code check} methods in {@code SecurityManager} is to
* call the {@code SecurityManager checkPermission} method
* to determine if the calling thread has permission to perform the requested
* operation.
* <p>
* Note that the <code>checkPermission</code> method with
* Note that the {@code checkPermission} method with
* just a single permission argument always performs security checks
* within the context of the currently executing thread.
* Sometimes a security check that should be made within a given context
@ -205,7 +205,7 @@ import sun.security.util.SecurityConstants;
* java.lang.Object) checkPermission}
* method that includes a context argument are provided
* for this situation. The
* <code>getSecurityContext</code> method returns a "snapshot"
* {@code getSecurityContext} method returns a "snapshot"
* of the current calling context. (The default implementation
* returns an AccessControlContext object.) A sample call is
* the following:
@ -217,14 +217,14 @@ import sun.security.util.SecurityConstants;
* </pre>
*
* <p>
* The <code>checkPermission</code> method
* The {@code checkPermission} method
* that takes a context object in addition to a permission
* makes access decisions based on that context,
* rather than on that of the current execution thread.
* Code within a different context can thus call that method,
* passing the permission and the
* previously-saved context object. A sample call, using the
* SecurityManager <code>sm</code> obtained as in the previous example,
* SecurityManager {@code sm} obtained as in the previous example,
* is the following:
*
* <pre>
@ -234,21 +234,21 @@ import sun.security.util.SecurityConstants;
* <p>Permissions fall into these categories: File, Socket, Net,
* Security, Runtime, Property, AWT, Reflect, and Serializable.
* The classes managing these various
* permission categories are <code>java.io.FilePermission</code>,
* <code>java.net.SocketPermission</code>,
* <code>java.net.NetPermission</code>,
* <code>java.security.SecurityPermission</code>,
* <code>java.lang.RuntimePermission</code>,
* <code>java.util.PropertyPermission</code>,
* <code>java.awt.AWTPermission</code>,
* <code>java.lang.reflect.ReflectPermission</code>, and
* <code>java.io.SerializablePermission</code>.
* permission categories are {@code java.io.FilePermission},
* {@code java.net.SocketPermission},
* {@code java.net.NetPermission},
* {@code java.security.SecurityPermission},
* {@code java.lang.RuntimePermission},
* {@code java.util.PropertyPermission},
* {@code java.awt.AWTPermission},
* {@code java.lang.reflect.ReflectPermission}, and
* {@code java.io.SerializablePermission}.
*
* <p>All but the first two (FilePermission and SocketPermission) are
* subclasses of <code>java.security.BasicPermission</code>, which itself
* subclasses of {@code java.security.BasicPermission}, which itself
* is an abstract subclass of the
* top-level class for permissions, which is
* <code>java.security.Permission</code>. BasicPermission defines the
* {@code java.security.Permission}. BasicPermission defines the
* functionality needed for all permissions that contain a name
* that follows the hierarchical property naming convention
* (for example, "exitVM", "setFactory", "queuePrintJob", etc).
@ -259,16 +259,16 @@ import sun.security.util.SecurityConstants;
*
* <p>FilePermission and SocketPermission are subclasses of the
* top-level class for permissions
* (<code>java.security.Permission</code>). Classes like these
* ({@code java.security.Permission}). Classes like these
* that have a more complicated name syntax than that used by
* BasicPermission subclass directly from Permission rather than from
* BasicPermission. For example,
* for a <code>java.io.FilePermission</code> object, the permission name is
* for a {@code java.io.FilePermission} object, the permission name is
* the path name of a file (or directory).
*
* <p>Some of the permission classes have an "actions" list that tells
* the actions that are permitted for the object. For example,
* for a <code>java.io.FilePermission</code> object, the actions list
* for a {@code java.io.FilePermission} object, the actions list
* (such as "read, write") specifies which actions are granted for the
* specified file (or for files in the specified directory).
*
@ -276,7 +276,7 @@ import sun.security.util.SecurityConstants;
* ones that contain a name but no actions list; you either have the
* named permission or you don't.
*
* <p>Note: There is also a <code>java.security.AllPermission</code>
* <p>Note: There is also a {@code java.security.AllPermission}
* permission that implies all permissions. It exists to simplify the work
* of system administrators who might need to perform multiple
* tasks that require all (or numerous) permissions.
@ -285,7 +285,7 @@ import sun.security.util.SecurityConstants;
* Permissions in the Java Development Kit (JDK)}
* for permission-related information.
* This document includes a table listing the various SecurityManager
* <code>check</code> methods and the permission(s) the default
* {@code check} methods and the permission(s) the default
* implementation of each such method requires.
* It also contains a table of the methods
* that require permissions, and for each such method tells
@ -322,17 +322,17 @@ public class SecurityManager {
private boolean initialized = false;
/**
* Constructs a new <code>SecurityManager</code>.
* Constructs a new {@code SecurityManager}.
*
* <p> If there is a security manager already installed, this method first
* calls the security manager's <code>checkPermission</code> method
* with the <code>RuntimePermission("createSecurityManager")</code>
* calls the security manager's {@code checkPermission} method
* with the {@code RuntimePermission("createSecurityManager")}
* permission to ensure the calling thread has permission to create a new
* security manager.
* This may result in throwing a <code>SecurityException</code>.
* This may result in throwing a {@code SecurityException}.
*
* @throws java.lang.SecurityException if a security manager already
* exists and its <code>checkPermission</code> method
* exists and its {@code checkPermission} method
* doesn't allow creation of a new security manager.
* @see java.lang.System#getSecurityManager()
* @see #checkPermission(java.security.Permission) checkPermission
@ -355,8 +355,8 @@ public class SecurityManager {
* Returns the current execution stack as an array of classes.
* <p>
* The length of the array is the number of methods on the execution
* stack. The element at index <code>0</code> is the class of the
* currently executing method, the element at index <code>1</code> is
* stack. The element at index {@code 0} is the class of the
* currently executing method, the element at index {@code 1} is
* the class of that method's caller, and so on.
*
* @return the execution stack.
@ -366,15 +366,15 @@ public class SecurityManager {
/**
* Creates an object that encapsulates the current execution
* environment. The result of this method is used, for example, by the
* three-argument <code>checkConnect</code> method and by the
* two-argument <code>checkRead</code> method.
* three-argument {@code checkConnect} method and by the
* two-argument {@code checkRead} method.
* These methods are needed because a trusted method may be called
* on to read a file or open a socket on behalf of another method.
* The trusted method needs to determine if the other (possibly
* untrusted) method would be allowed to perform the operation on its
* own.
* <p> The default implementation of this method is to return
* an <code>AccessControlContext</code> object.
* an {@code AccessControlContext} object.
*
* @return an implementation-dependent object that encapsulates
* sufficient information about the current execution environment
@ -390,18 +390,18 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the requested
* Throws a {@code SecurityException} if the requested
* access, specified by the given permission, is not permitted based
* on the security policy currently in effect.
* <p>
* This method calls <code>AccessController.checkPermission</code>
* This method calls {@code AccessController.checkPermission}
* with the given permission.
*
* @param perm the requested permission.
* @throws SecurityException if access is not permitted based on
* the current security policy.
* @throws NullPointerException if the permission argument is
* <code>null</code>.
* {@code null}.
* @since 1.2
*/
public void checkPermission(Permission perm) {
@ -409,32 +409,32 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* specified security context is denied access to the resource
* specified by the given permission.
* The context must be a security
* context returned by a previous call to
* <code>getSecurityContext</code> and the access control
* {@code getSecurityContext} and the access control
* decision is based upon the configured security policy for
* that security context.
* <p>
* If <code>context</code> is an instance of
* <code>AccessControlContext</code> then the
* <code>AccessControlContext.checkPermission</code> method is
* If {@code context} is an instance of
* {@code AccessControlContext} then the
* {@code AccessControlContext.checkPermission} method is
* invoked with the specified permission.
* <p>
* If <code>context</code> is not an instance of
* <code>AccessControlContext</code> then a
* <code>SecurityException</code> is thrown.
* If {@code context} is not an instance of
* {@code AccessControlContext} then a
* {@code SecurityException} is thrown.
*
* @param perm the specified permission
* @param context a system-dependent security context.
* @throws SecurityException if the specified security context
* is not an instance of <code>AccessControlContext</code>
* (e.g., is <code>null</code>), or is denied access to the
* is not an instance of {@code AccessControlContext}
* (e.g., is {@code null}), or is denied access to the
* resource specified by the given permission.
* @throws NullPointerException if the permission argument is
* <code>null</code>.
* {@code null}.
* @see java.lang.SecurityManager#getSecurityContext()
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
* @since 1.2
@ -448,15 +448,15 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to create a new class loader.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>RuntimePermission("createClassLoader")</code>
* This method calls {@code checkPermission} with the
* {@code RuntimePermission("createClassLoader")}
* permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkCreateClassLoader</code>
* {@code super.checkCreateClassLoader}
* at the point the overridden method would normally throw an
* exception.
*
@ -486,31 +486,31 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to modify the thread argument.
* <p>
* This method is invoked for the current security manager by the
* <code>stop</code>, <code>suspend</code>, <code>resume</code>,
* <code>setPriority</code>, <code>setName</code>, and
* <code>setDaemon</code> methods of class <code>Thread</code>.
* {@code stop}, {@code suspend}, {@code resume},
* {@code setPriority}, {@code setName}, and
* {@code setDaemon} methods of class {@code Thread}.
* <p>
* If the thread argument is a system thread (belongs to
* the thread group with a <code>null</code> parent) then
* this method calls <code>checkPermission</code> with the
* <code>RuntimePermission("modifyThread")</code> permission.
* the thread group with a {@code null} parent) then
* this method calls {@code checkPermission} with the
* {@code RuntimePermission("modifyThread")} permission.
* If the thread argument is <i>not</i> a system thread,
* this method just returns silently.
* <p>
* Applications that want a stricter policy should override this
* method. If this method is overridden, the method that overrides
* it should additionally check to see if the calling thread has the
* <code>RuntimePermission("modifyThread")</code> permission, and
* {@code RuntimePermission("modifyThread")} permission, and
* if so, return silently. This is to ensure that code granted
* that permission (such as the JDK itself) is allowed to
* manipulate any thread.
* <p>
* If this method is overridden, then
* <code>super.checkAccess</code> should
* {@code super.checkAccess} should
* be called by the first statement in the overridden method, or the
* equivalent security check should be placed in the overridden method.
*
@ -518,7 +518,7 @@ public class SecurityManager {
* @throws SecurityException if the calling thread does not have
* permission to modify the thread.
* @throws NullPointerException if the thread argument is
* <code>null</code>.
* {@code null}.
* @see java.lang.Thread#resume() resume
* @see java.lang.Thread#setDaemon(boolean) setDaemon
* @see java.lang.Thread#setName(java.lang.String) setName
@ -538,32 +538,32 @@ public class SecurityManager {
}
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to modify the thread group argument.
* <p>
* This method is invoked for the current security manager when a
* new child thread or child thread group is created, and by the
* <code>setDaemon</code>, <code>setMaxPriority</code>,
* <code>stop</code>, <code>suspend</code>, <code>resume</code>, and
* <code>destroy</code> methods of class <code>ThreadGroup</code>.
* {@code setDaemon}, {@code setMaxPriority},
* {@code stop}, {@code suspend}, {@code resume}, and
* {@code destroy} methods of class {@code ThreadGroup}.
* <p>
* If the thread group argument is the system thread group (
* has a <code>null</code> parent) then
* this method calls <code>checkPermission</code> with the
* <code>RuntimePermission("modifyThreadGroup")</code> permission.
* has a {@code null} parent) then
* this method calls {@code checkPermission} with the
* {@code RuntimePermission("modifyThreadGroup")} permission.
* If the thread group argument is <i>not</i> the system thread group,
* this method just returns silently.
* <p>
* Applications that want a stricter policy should override this
* method. If this method is overridden, the method that overrides
* it should additionally check to see if the calling thread has the
* <code>RuntimePermission("modifyThreadGroup")</code> permission, and
* {@code RuntimePermission("modifyThreadGroup")} permission, and
* if so, return silently. This is to ensure that code granted
* that permission (such as the JDK itself) is allowed to
* manipulate any thread.
* <p>
* If this method is overridden, then
* <code>super.checkAccess</code> should
* {@code super.checkAccess} should
* be called by the first statement in the overridden method, or the
* equivalent security check should be placed in the overridden method.
*
@ -571,7 +571,7 @@ public class SecurityManager {
* @throws SecurityException if the calling thread does not have
* permission to modify the thread group.
* @throws NullPointerException if the thread group argument is
* <code>null</code>.
* {@code null}.
* @see java.lang.ThreadGroup#destroy() destroy
* @see java.lang.ThreadGroup#resume() resume
* @see java.lang.ThreadGroup#setDaemon(boolean) setDaemon
@ -592,20 +592,20 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to cause the Java Virtual Machine to
* halt with the specified status code.
* <p>
* This method is invoked for the current security manager by the
* <code>exit</code> method of class <code>Runtime</code>. A status
* of <code>0</code> indicates success; other values indicate various
* {@code exit} method of class {@code Runtime}. A status
* of {@code 0} indicates success; other values indicate various
* errors.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>RuntimePermission("exitVM."+status)</code> permission.
* This method calls {@code checkPermission} with the
* {@code RuntimePermission("exitVM."+status)} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkExit</code>
* {@code super.checkExit}
* at the point the overridden method would normally throw an
* exception.
*
@ -621,28 +621,28 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to create a subprocess.
* <p>
* This method is invoked for the current security manager by the
* <code>exec</code> methods of class <code>Runtime</code>.
* {@code exec} methods of class {@code Runtime}.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>FilePermission(cmd,"execute")</code> permission
* This method calls {@code checkPermission} with the
* {@code FilePermission(cmd,"execute")} permission
* if cmd is an absolute path, otherwise it calls
* <code>checkPermission</code> with
* {@code checkPermission} with
* <code>FilePermission("&lt;&lt;ALL FILES&gt;&gt;","execute")</code>.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkExec</code>
* {@code super.checkExec}
* at the point the overridden method would normally throw an
* exception.
*
* @param cmd the specified system command.
* @throws SecurityException if the calling thread does not have
* permission to create a subprocess.
* @throws NullPointerException if the <code>cmd</code> argument is
* <code>null</code>.
* @throws NullPointerException if the {@code cmd} argument is
* {@code null}.
* @see java.lang.Runtime#exec(java.lang.String)
* @see java.lang.Runtime#exec(java.lang.String, java.lang.String[])
* @see java.lang.Runtime#exec(java.lang.String[])
@ -661,28 +661,28 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to dynamic link the library code
* specified by the string argument file. The argument is either a
* simple library name or a complete filename.
* <p>
* This method is invoked for the current security manager by
* methods <code>load</code> and <code>loadLibrary</code> of class
* <code>Runtime</code>.
* methods {@code load} and {@code loadLibrary} of class
* {@code Runtime}.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>RuntimePermission("loadLibrary."+lib)</code> permission.
* This method calls {@code checkPermission} with the
* {@code RuntimePermission("loadLibrary."+lib)} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkLink</code>
* {@code super.checkLink}
* at the point the overridden method would normally throw an
* exception.
*
* @param lib the name of the library.
* @throws SecurityException if the calling thread does not have
* permission to dynamically link the library.
* @throws NullPointerException if the <code>lib</code> argument is
* <code>null</code>.
* @throws NullPointerException if the {@code lib} argument is
* {@code null}.
* @see java.lang.Runtime#load(java.lang.String)
* @see java.lang.Runtime#loadLibrary(java.lang.String)
* @see #checkPermission(java.security.Permission) checkPermission
@ -695,16 +695,16 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to read from the specified file
* descriptor.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>RuntimePermission("readFileDescriptor")</code>
* This method calls {@code checkPermission} with the
* {@code RuntimePermission("readFileDescriptor")}
* permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkRead</code>
* {@code super.checkRead}
* at the point the overridden method would normally throw an
* exception.
*
@ -712,7 +712,7 @@ public class SecurityManager {
* @throws SecurityException if the calling thread does not have
* permission to access the specified file descriptor.
* @throws NullPointerException if the file descriptor argument is
* <code>null</code>.
* {@code null}.
* @see java.io.FileDescriptor
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -724,23 +724,23 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to read the file specified by the
* string argument.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>FilePermission(file,"read")</code> permission.
* This method calls {@code checkPermission} with the
* {@code FilePermission(file,"read")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkRead</code>
* {@code super.checkRead}
* at the point the overridden method would normally throw an
* exception.
*
* @param file the system-dependent file name.
* @throws SecurityException if the calling thread does not have
* permission to access the specified file.
* @throws NullPointerException if the <code>file</code> argument is
* <code>null</code>.
* @throws NullPointerException if the {@code file} argument is
* {@code null}.
* @see #checkPermission(java.security.Permission) checkPermission
*/
public void checkRead(String file) {
@ -749,32 +749,32 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* specified security context is not allowed to read the file
* specified by the string argument. The context must be a security
* context returned by a previous call to
* <code>getSecurityContext</code>.
* <p> If <code>context</code> is an instance of
* <code>AccessControlContext</code> then the
* <code>AccessControlContext.checkPermission</code> method will
* be invoked with the <code>FilePermission(file,"read")</code> permission.
* <p> If <code>context</code> is not an instance of
* <code>AccessControlContext</code> then a
* <code>SecurityException</code> is thrown.
* {@code getSecurityContext}.
* <p> If {@code context} is an instance of
* {@code AccessControlContext} then the
* {@code AccessControlContext.checkPermission} method will
* be invoked with the {@code FilePermission(file,"read")} permission.
* <p> If {@code context} is not an instance of
* {@code AccessControlContext} then a
* {@code SecurityException} is thrown.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkRead</code>
* {@code super.checkRead}
* at the point the overridden method would normally throw an
* exception.
*
* @param file the system-dependent filename.
* @param context a system-dependent security context.
* @throws SecurityException if the specified security context
* is not an instance of <code>AccessControlContext</code>
* (e.g., is <code>null</code>), or does not have permission
* is not an instance of {@code AccessControlContext}
* (e.g., is {@code null}), or does not have permission
* to read the specified file.
* @throws NullPointerException if the <code>file</code> argument is
* <code>null</code>.
* @throws NullPointerException if the {@code file} argument is
* {@code null}.
* @see java.lang.SecurityManager#getSecurityContext()
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
*/
@ -785,16 +785,16 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to write to the specified file
* descriptor.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>RuntimePermission("writeFileDescriptor")</code>
* This method calls {@code checkPermission} with the
* {@code RuntimePermission("writeFileDescriptor")}
* permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkWrite</code>
* {@code super.checkWrite}
* at the point the overridden method would normally throw an
* exception.
*
@ -802,7 +802,7 @@ public class SecurityManager {
* @throws SecurityException if the calling thread does not have
* permission to access the specified file descriptor.
* @throws NullPointerException if the file descriptor argument is
* <code>null</code>.
* {@code null}.
* @see java.io.FileDescriptor
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -815,23 +815,23 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to write to the file specified by
* the string argument.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>FilePermission(file,"write")</code> permission.
* This method calls {@code checkPermission} with the
* {@code FilePermission(file,"write")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkWrite</code>
* {@code super.checkWrite}
* at the point the overridden method would normally throw an
* exception.
*
* @param file the system-dependent filename.
* @throws SecurityException if the calling thread does not
* have permission to access the specified file.
* @throws NullPointerException if the <code>file</code> argument is
* <code>null</code>.
* @throws NullPointerException if the {@code file} argument is
* {@code null}.
* @see #checkPermission(java.security.Permission) checkPermission
*/
public void checkWrite(String file) {
@ -840,25 +840,25 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to delete the specified file.
* <p>
* This method is invoked for the current security manager by the
* <code>delete</code> method of class <code>File</code>.
* {@code delete} method of class {@code File}.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>FilePermission(file,"delete")</code> permission.
* This method calls {@code checkPermission} with the
* {@code FilePermission(file,"delete")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkDelete</code>
* {@code super.checkDelete}
* at the point the overridden method would normally throw an
* exception.
*
* @param file the system-dependent filename.
* @throws SecurityException if the calling thread does not
* have permission to delete the file.
* @throws NullPointerException if the <code>file</code> argument is
* <code>null</code>.
* @throws NullPointerException if the {@code file} argument is
* {@code null}.
* @see java.io.File#delete()
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -868,22 +868,22 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to open a socket connection to the
* specified host and port number.
* <p>
* A port number of <code>-1</code> indicates that the calling
* A port number of {@code -1} indicates that the calling
* method is attempting to determine the IP address of the specified
* host name.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>SocketPermission(host+":"+port,"connect")</code> permission if
* This method calls {@code checkPermission} with the
* {@code SocketPermission(host+":"+port,"connect")} permission if
* the port is not equal to -1. If the port is equal to -1, then
* it calls <code>checkPermission</code> with the
* <code>SocketPermission(host,"resolve")</code> permission.
* it calls {@code checkPermission} with the
* {@code SocketPermission(host,"resolve")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkConnect</code>
* {@code super.checkConnect}
* at the point the overridden method would normally throw an
* exception.
*
@ -891,9 +891,9 @@ public class SecurityManager {
* @param port the protocol port to connect to.
* @throws SecurityException if the calling thread does not have
* permission to open a socket connection to the specified
* <code>host</code> and <code>port</code>.
* @throws NullPointerException if the <code>host</code> argument is
* <code>null</code>.
* {@code host} and {@code port}.
* @throws NullPointerException if the {@code host} argument is
* {@code null}.
* @see #checkPermission(java.security.Permission) checkPermission
*/
public void checkConnect(String host, int port) {
@ -913,28 +913,28 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* specified security context is not allowed to open a socket
* connection to the specified host and port number.
* <p>
* A port number of <code>-1</code> indicates that the calling
* A port number of {@code -1} indicates that the calling
* method is attempting to determine the IP address of the specified
* host name.
* <p> If <code>context</code> is not an instance of
* <code>AccessControlContext</code> then a
* <code>SecurityException</code> is thrown.
* <p> If {@code context} is not an instance of
* {@code AccessControlContext} then a
* {@code SecurityException} is thrown.
* <p>
* Otherwise, the port number is checked. If it is not equal
* to -1, the <code>context</code>'s <code>checkPermission</code>
* to -1, the {@code context}'s {@code checkPermission}
* method is called with a
* <code>SocketPermission(host+":"+port,"connect")</code> permission.
* {@code SocketPermission(host+":"+port,"connect")} permission.
* If the port is equal to -1, then
* the <code>context</code>'s <code>checkPermission</code> method
* the {@code context}'s {@code checkPermission} method
* is called with a
* <code>SocketPermission(host,"resolve")</code> permission.
* {@code SocketPermission(host,"resolve")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkConnect</code>
* {@code super.checkConnect}
* at the point the overridden method would normally throw an
* exception.
*
@ -942,12 +942,12 @@ public class SecurityManager {
* @param port the protocol port to connect to.
* @param context a system-dependent security context.
* @throws SecurityException if the specified security context
* is not an instance of <code>AccessControlContext</code>
* (e.g., is <code>null</code>), or does not have permission
* is not an instance of {@code AccessControlContext}
* (e.g., is {@code null}), or does not have permission
* to open a socket connection to the specified
* <code>host</code> and <code>port</code>.
* @throws NullPointerException if the <code>host</code> argument is
* <code>null</code>.
* {@code host} and {@code port}.
* @throws NullPointerException if the {@code host} argument is
* {@code null}.
* @see java.lang.SecurityManager#getSecurityContext()
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
*/
@ -969,15 +969,15 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to wait for a connection request on
* the specified local port number.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>SocketPermission("localhost:"+port,"listen")</code>.
* This method calls {@code checkPermission} with the
* {@code SocketPermission("localhost:"+port,"listen")}.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkListen</code>
* {@code super.checkListen}
* at the point the overridden method would normally throw an
* exception.
*
@ -992,18 +992,18 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not permitted to accept a socket connection from
* the specified host and port number.
* <p>
* This method is invoked for the current security manager by the
* <code>accept</code> method of class <code>ServerSocket</code>.
* {@code accept} method of class {@code ServerSocket}.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>SocketPermission(host+":"+port,"accept")</code> permission.
* This method calls {@code checkPermission} with the
* {@code SocketPermission(host+":"+port,"accept")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkAccept</code>
* {@code super.checkAccept}
* at the point the overridden method would normally throw an
* exception.
*
@ -1011,8 +1011,8 @@ public class SecurityManager {
* @param port the port number of the socket connection.
* @throws SecurityException if the calling thread does not have
* permission to accept the connection.
* @throws NullPointerException if the <code>host</code> argument is
* <code>null</code>.
* @throws NullPointerException if the {@code host} argument is
* {@code null}.
* @see java.net.ServerSocket#accept()
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -1028,16 +1028,16 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to use
* (join/leave/send/receive) IP multicast.
* <p>
* This method calls <code>checkPermission</code> with the
* This method calls {@code checkPermission} with the
* <code>java.net.SocketPermission(maddr.getHostAddress(),
* "accept,connect")</code> permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkMulticast</code>
* {@code super.checkMulticast}
* at the point the overridden method would normally throw an
* exception.
*
@ -1045,7 +1045,7 @@ public class SecurityManager {
* @throws SecurityException if the calling thread is not allowed to
* use (join/leave/send/receive) IP multicast.
* @throws NullPointerException if the address argument is
* <code>null</code>.
* {@code null}.
* @since 1.1
* @see #checkPermission(java.security.Permission) checkPermission
*/
@ -1059,16 +1059,16 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to use
* (join/leave/send/receive) IP multicast.
* <p>
* This method calls <code>checkPermission</code> with the
* This method calls {@code checkPermission} with the
* <code>java.net.SocketPermission(maddr.getHostAddress(),
* "accept,connect")</code> permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkMulticast</code>
* {@code super.checkMulticast}
* at the point the overridden method would normally throw an
* exception.
*
@ -1079,7 +1079,7 @@ public class SecurityManager {
* @throws SecurityException if the calling thread is not allowed to
* use (join/leave/send/receive) IP multicast.
* @throws NullPointerException if the address argument is
* <code>null</code>.
* {@code null}.
* @since 1.1
* @deprecated Use #checkPermission(java.security.Permission) instead
* @see #checkPermission(java.security.Permission) checkPermission
@ -1095,18 +1095,18 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to access or modify the system
* properties.
* <p>
* This method is used by the <code>getProperties</code> and
* <code>setProperties</code> methods of class <code>System</code>.
* This method is used by the {@code getProperties} and
* {@code setProperties} methods of class {@code System}.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>PropertyPermission("*", "read,write")</code> permission.
* This method calls {@code checkPermission} with the
* {@code PropertyPermission("*", "read,write")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkPropertiesAccess</code>
* {@code super.checkPropertiesAccess}
* at the point the overridden method would normally throw an
* exception.
*
@ -1122,18 +1122,18 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to access the system property with
* the specified <code>key</code> name.
* the specified {@code key} name.
* <p>
* This method is used by the <code>getProperty</code> method of
* class <code>System</code>.
* This method is used by the {@code getProperty} method of
* class {@code System}.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>PropertyPermission(key, "read")</code> permission.
* This method calls {@code checkPermission} with the
* {@code PropertyPermission(key, "read")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkPropertyAccess</code>
* {@code super.checkPropertyAccess}
* at the point the overridden method would normally throw an
* exception.
*
@ -1141,9 +1141,9 @@ public class SecurityManager {
*
* @throws SecurityException if the calling thread does not have
* permission to access the specified system property.
* @throws NullPointerException if the <code>key</code> argument is
* <code>null</code>.
* @throws IllegalArgumentException if <code>key</code> is empty.
* @throws NullPointerException if the {@code key} argument is
* {@code null}.
* @throws IllegalArgumentException if {@code key} is empty.
*
* @see java.lang.System#getProperty(java.lang.String)
* @see #checkPermission(java.security.Permission) checkPermission
@ -1154,15 +1154,15 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to initiate a print job request.
* <p>
* This method calls
* <code>checkPermission</code> with the
* <code>RuntimePermission("queuePrintJob")</code> permission.
* {@code checkPermission} with the
* {@code RuntimePermission("queuePrintJob")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkPrintJobAccess</code>
* {@code super.checkPrintJobAccess}
* at the point the overridden method would normally throw an
* exception.
*
@ -1461,16 +1461,16 @@ public class SecurityManager {
}
/**
* Throws a <code>SecurityException</code> if the
* Throws a {@code SecurityException} if the
* calling thread is not allowed to set the socket factory used by
* <code>ServerSocket</code> or <code>Socket</code>, or the stream
* handler factory used by <code>URL</code>.
* {@code ServerSocket} or {@code Socket}, or the stream
* handler factory used by {@code URL}.
* <p>
* This method calls <code>checkPermission</code> with the
* <code>RuntimePermission("setFactory")</code> permission.
* This method calls {@code checkPermission} with the
* {@code RuntimePermission("setFactory")} permission.
* <p>
* If you override this method, then you should make a call to
* <code>super.checkSetFactory</code>
* {@code super.checkSetFactory}
* at the point the overridden method would normally throw an
* exception.
*
@ -1494,8 +1494,8 @@ public class SecurityManager {
* <p> If the requested permission is allowed, this method returns
* quietly. If denied, a SecurityException is raised.
*
* <p> This method creates a <code>SecurityPermission</code> object for
* the given permission target name and calls <code>checkPermission</code>
* <p> This method creates a {@code SecurityPermission} object for
* the given permission target name and calls {@code checkPermission}
* with it.
*
* <p> See the documentation for
@ -1503,16 +1503,16 @@ public class SecurityManager {
* a list of possible permission target names.
*
* <p> If you override this method, then you should make a call to
* <code>super.checkSecurityAccess</code>
* {@code super.checkSecurityAccess}
* at the point the overridden method would normally throw an
* exception.
*
* @param target the target name of the <code>SecurityPermission</code>.
* @param target the target name of the {@code SecurityPermission}.
*
* @throws SecurityException if the calling thread does not have
* permission for the requested access.
* @throws NullPointerException if <code>target</code> is null.
* @throws IllegalArgumentException if <code>target</code> is empty.
* @throws NullPointerException if {@code target} is null.
* @throws IllegalArgumentException if {@code target} is empty.
*
* @since 1.1
* @see #checkPermission(java.security.Permission) checkPermission

View file

@ -38,14 +38,14 @@ class StackOverflowError extends VirtualMachineError {
private static final long serialVersionUID = 8609175038441759607L;
/**
* Constructs a <code>StackOverflowError</code> with no detail message.
* Constructs a {@code StackOverflowError} with no detail message.
*/
public StackOverflowError() {
super();
}
/**
* Constructs a <code>StackOverflowError</code> with the specified
* Constructs a {@code StackOverflowError} with the specified
* detail message.
*
* @param s the detail message.

View file

@ -38,14 +38,14 @@ class UnknownError extends VirtualMachineError {
private static final long serialVersionUID = 2524784860676771849L;
/**
* Constructs an <code>UnknownError</code> with no detail message.
* Constructs an {@code UnknownError} with no detail message.
*/
public UnknownError() {
super();
}
/**
* Constructs an <code>UnknownError</code> with the specified detail
* Constructs an {@code UnknownError} with the specified detail
* message.
*
* @param s the detail message.

View file

@ -27,7 +27,7 @@ package java.lang;
/**
* Thrown if the Java Virtual Machine cannot find an appropriate
* native-language definition of a method declared <code>native</code>.
* native-language definition of a method declared {@code native}.
*
* @author unascribed
* @see java.lang.Runtime
@ -39,14 +39,14 @@ class UnsatisfiedLinkError extends LinkageError {
private static final long serialVersionUID = -4019343241616879428L;
/**
* Constructs an <code>UnsatisfiedLinkError</code> with no detail message.
* Constructs an {@code UnsatisfiedLinkError} with no detail message.
*/
public UnsatisfiedLinkError() {
super();
}
/**
* Constructs an <code>UnsatisfiedLinkError</code> with the
* Constructs an {@code UnsatisfiedLinkError} with the
* specified detail message.
*
* @param s the detail message.

View file

@ -38,7 +38,7 @@ class UnsupportedClassVersionError extends ClassFormatError {
private static final long serialVersionUID = -7123279212883497373L;
/**
* Constructs a <code>UnsupportedClassVersionError</code>
* Constructs a {@code UnsupportedClassVersionError}
* with no detail message.
*/
public UnsupportedClassVersionError() {
@ -46,7 +46,7 @@ class UnsupportedClassVersionError extends ClassFormatError {
}
/**
* Constructs a <code>UnsupportedClassVersionError</code> with
* Constructs a {@code UnsupportedClassVersionError} with
* the specified detail message.
*
* @param s the detail message.

View file

@ -56,7 +56,7 @@ public class UnsupportedOperationException extends RuntimeException {
* Constructs a new exception with the specified detail message and
* cause.
*
* <p>Note that the detail message associated with <code>cause</code> is
* <p>Note that the detail message associated with {@code cause} is
* <i>not</i> automatically incorporated in this exception's detail
* message.
*

View file

@ -39,14 +39,14 @@ class VerifyError extends LinkageError {
private static final long serialVersionUID = 7001962396098498785L;
/**
* Constructs an <code>VerifyError</code> with no detail message.
* Constructs an {@code VerifyError} with no detail message.
*/
public VerifyError() {
super();
}
/**
* Constructs an <code>VerifyError</code> with the specified detail message.
* Constructs an {@code VerifyError} with the specified detail message.
*
* @param s the detail message.
*/

View file

@ -38,14 +38,14 @@ public abstract class VirtualMachineError extends Error {
private static final long serialVersionUID = 4161983926571568670L;
/**
* Constructs a <code>VirtualMachineError</code> with no detail message.
* Constructs a {@code VirtualMachineError} with no detail message.
*/
public VirtualMachineError() {
super();
}
/**
* Constructs a <code>VirtualMachineError</code> with the specified
* Constructs a {@code VirtualMachineError} with the specified
* detail message.
*
* @param message the detail message.

View file

@ -1042,7 +1042,7 @@ public class MethodHandles {
* <td style="text-align:center">IAE</td>
* </tr>
* <tr>
* <td>{@code ANY.in(X)}, for inaccessible <code>X</code></td>
* <td>{@code ANY.in(X)}, for inaccessible {@code X}</td>
* <td></td>
* <td></td>
* <td></td>

View file

@ -216,22 +216,22 @@
* <tbody>
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">*</th><td>
* <ul style="list-style:none; padding-left: 0; margin:0">
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
* <li><code>CallSite bootstrap(Object... args)</code>
* <li><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code>
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)}
* <li>{@code CallSite bootstrap(Object... args)}
* <li>{@code CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)}
* </ul></td></tr>
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">0</th><td>
* <ul style="list-style:none; padding-left: 0; margin:0">
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code>
* <li><code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code>
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type)}
* <li>{@code CallSite bootstrap(Lookup caller, Object... nameAndType)}
* </ul></td></tr>
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">1</th><td>
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
* {@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)}</td></tr>
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">2</th><td>
* <ul style="list-style:none; padding-left: 0; margin:0">
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code>
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code>
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)}
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)}
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)}
* </ul></td></tr>
* </tbody>
* </table>

View file

@ -323,10 +323,10 @@ public abstract class Reference<T> {
/**
* Returns this reference object's referent. If this reference object has
* 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
* <code>null</code> if this reference object has been cleared
* {@code null} if this reference object has been cleared
*/
@HotSpotIntrinsicCandidate
public T get() {
@ -350,9 +350,9 @@ public abstract class Reference<T> {
* Tells whether or not this reference object has been enqueued, either by
* the program or by the garbage collector. If this reference object was
* not registered with a queue when it was created, then this method will
* always return <code>false</code>.
* always return {@code false}.
*
* @return <code>true</code> if and only if this reference object has
* @return {@code true} if and only if this reference object has
* been enqueued
*/
public boolean isEnqueued() {
@ -366,8 +366,8 @@ public abstract class Reference<T> {
* <p> This method is invoked only by Java code; when the garbage collector
* enqueues references it does so directly, without invoking this method.
*
* @return <code>true</code> if this reference object was successfully
* enqueued; <code>false</code> if it was already enqueued or if
* @return {@code true} if this reference object was successfully
* enqueued; {@code false} if it was already enqueued or if
* it was not registered with a queue when it was created
*/
public boolean enqueue() {

View file

@ -117,7 +117,7 @@ public class AttributedString {
/**
* Constructs an AttributedString instance with the given text.
* @param text The text for this attributed string.
* @throws NullPointerException if <code>text</code> is null.
* @throws NullPointerException if {@code text} is null.
*/
public AttributedString(String text) {
if (text == null) {
@ -130,8 +130,8 @@ public class AttributedString {
* Constructs an AttributedString instance with the given text and attributes.
* @param text The text for this attributed string.
* @param attributes The attributes that apply to the entire string.
* @throws NullPointerException if <code>text</code> or
* <code>attributes</code> is null.
* @throws NullPointerException if {@code text} or
* {@code attributes} is null.
* @throws IllegalArgumentException if the text has length 0
* and the attributes parameter is not an empty Map (attributes
* cannot be applied to a 0-length range).
@ -171,7 +171,7 @@ public class AttributedString {
* Constructs an AttributedString instance with the given attributed
* text represented by AttributedCharacterIterator.
* @param text The text for this attributed string.
* @throws NullPointerException if <code>text</code> is null.
* @throws NullPointerException if {@code text} is null.
*/
public AttributedString(AttributedCharacterIterator text) {
// If performance is critical, this constructor should be
@ -192,7 +192,7 @@ public class AttributedString {
* @param beginIndex Index of the first character of the range.
* @param endIndex Index of the character following the last character
* of the range.
* @throws NullPointerException if <code>text</code> is null.
* @throws NullPointerException if {@code text} is null.
* @throws IllegalArgumentException if the subrange given by
* beginIndex and endIndex is out of the text range.
* @see java.text.Annotation
@ -220,7 +220,7 @@ public class AttributedString {
* @param attributes Specifies attributes to be extracted
* from the text. If null is specified, all available attributes will
* be used.
* @throws NullPointerException if <code>text</code> is null.
* @throws NullPointerException if {@code text} is null.
* @throws IllegalArgumentException if the subrange given by
* beginIndex and endIndex is out of the text range.
* @see java.text.Annotation
@ -307,7 +307,7 @@ public class AttributedString {
* Adds an attribute to the entire string.
* @param attribute the attribute key
* @param value the value of the attribute; may be null
* @throws NullPointerException if <code>attribute</code> is null.
* @throws NullPointerException if {@code attribute} is null.
* @throws IllegalArgumentException if the AttributedString has length 0
* (attributes cannot be applied to a 0-length range).
*/
@ -331,7 +331,7 @@ public class AttributedString {
* @param value The value of the attribute. May be null.
* @param beginIndex Index of the first character of the range.
* @param endIndex Index of the character following the last character of the range.
* @throws NullPointerException if <code>attribute</code> is null.
* @throws NullPointerException if {@code attribute} is null.
* @throws IllegalArgumentException if beginIndex is less than 0, endIndex is
* greater than the length of the string, or beginIndex and endIndex together don't
* define a non-empty subrange of the string.
@ -356,7 +356,7 @@ public class AttributedString {
* @param beginIndex Index of the first character of the range.
* @param endIndex Index of the character following the last
* character of the range.
* @throws NullPointerException if <code>attributes</code> is null.
* @throws NullPointerException if {@code attributes} is null.
* @throws IllegalArgumentException if beginIndex is less than
* 0, endIndex is greater than the length of the string, or
* beginIndex and endIndex together don't define a non-empty

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -261,7 +261,7 @@ public final class Bidi {
/**
* Return the level of the nth logical run in this line.
* @param run the index of the run, between 0 and <code>getRunCount()</code>
* @param run the index of the run, between 0 and {@code getRunCount()}
* @return the level of the run
*/
public int getRunLevel(int run) {
@ -271,7 +271,7 @@ public final class Bidi {
/**
* Return the index of the character at the start of the nth logical run in this line, as
* an offset from the start of the line.
* @param run the index of the run, between 0 and <code>getRunCount()</code>
* @param run the index of the run, between 0 and {@code getRunCount()}
* @return the start of the run
*/
public int getRunStart(int run) {
@ -282,7 +282,7 @@ public final class Bidi {
* Return the index of the character past the end of the nth logical run in this line, as
* an offset from the start of the line. For example, this will return the length
* of the line for the last run on the line.
* @param run the index of the run, between 0 and <code>getRunCount()</code>
* @param run the index of the run, between 0 and {@code getRunCount()}
* @return limit the limit of the run
*/
public int getRunLimit(int run) {
@ -308,11 +308,11 @@ public final class Bidi {
* Reorder the objects in the array into visual order based on their levels.
* This is a utility function to use when you have a collection of objects
* representing runs of text in logical order, each run containing text
* at a single level. The elements at <code>index</code> from
* <code>objectStart</code> up to <code>objectStart + count</code>
* at a single level. The elements at {@code index} from
* {@code objectStart} up to {@code objectStart + count}
* in the objects array will be reordered into visual order assuming
* each run of text has the level indicated by the corresponding element
* in the levels array (at <code>index - objectStart + levelStart</code>).
* in the levels array (at {@code index - objectStart + levelStart}).
*
* @param levels an array representing the bidi level of each object
* @param levelStart the start position in the levels array

View file

@ -48,23 +48,23 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
/**
* The <code>BreakIterator</code> class implements methods for finding
* the location of boundaries in text. Instances of <code>BreakIterator</code>
* The {@code BreakIterator} class implements methods for finding
* the location of boundaries in text. Instances of {@code BreakIterator}
* maintain a current position and scan over text
* returning the index of characters where boundaries occur.
* Internally, <code>BreakIterator</code> scans text using a
* <code>CharacterIterator</code>, and is thus able to scan text held
* by any object implementing that protocol. A <code>StringCharacterIterator</code>
* is used to scan <code>String</code> objects passed to <code>setText</code>.
* Internally, {@code BreakIterator} scans text using a
* {@code CharacterIterator}, and is thus able to scan text held
* by any object implementing that protocol. A {@code StringCharacterIterator}
* is used to scan {@code String} objects passed to {@code setText}.
*
* <p>
* You use the factory methods provided by this class to create
* instances of various types of break iterators. In particular,
* use <code>getWordInstance</code>, <code>getLineInstance</code>,
* <code>getSentenceInstance</code>, and <code>getCharacterInstance</code>
* to create <code>BreakIterator</code>s that perform
* use {@code getWordInstance}, {@code getLineInstance},
* {@code getSentenceInstance}, and {@code getCharacterInstance}
* to create {@code BreakIterator}s that perform
* word, line, sentence, and character boundary analysis respectively.
* A single <code>BreakIterator</code> can work only on one unit
* A single {@code BreakIterator} can work only on one unit
* (word, line, sentence, and so on). You must use a different iterator
* for each unit boundary analysis you wish to perform.
*
@ -100,7 +100,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* differ between languages.
*
* <p>
* The <code>BreakIterator</code> instances returned by the factory methods
* The {@code BreakIterator} instances returned by the factory methods
* of this class are intended for use with natural languages only, not for
* programming language text. It is however possible to define subclasses
* that tokenize a programming language.
@ -274,31 +274,31 @@ public abstract class BreakIterator implements Cloneable
/**
* Returns the nth boundary from the current boundary. If either
* the first or last text boundary has been reached, it returns
* <code>BreakIterator.DONE</code> and the current position is set to either
* {@code BreakIterator.DONE} and the current position is set to either
* the first or last text boundary depending on which one is reached. Otherwise,
* the iterator's current position is set to the new boundary.
* For example, if the iterator's current position is the mth text boundary
* and three more boundaries exist from the current boundary to the last text
* boundary, the next(2) call will return m + 2. The new text position is set
* to the (m + 2)th text boundary. A next(4) call would return
* <code>BreakIterator.DONE</code> and the last text boundary would become the
* {@code BreakIterator.DONE} and the last text boundary would become the
* new text position.
* @param n which boundary to return. A value of 0
* does nothing. Negative values move to previous boundaries
* and positive values move to later boundaries.
* @return The character index of the nth boundary from the current position
* or <code>BreakIterator.DONE</code> if either first or last text boundary
* or {@code BreakIterator.DONE} if either first or last text boundary
* has been reached.
*/
public abstract int next(int n);
/**
* Returns the boundary following the current boundary. If the current boundary
* is the last text boundary, it returns <code>BreakIterator.DONE</code> and
* is the last text boundary, it returns {@code BreakIterator.DONE} and
* the iterator's current position is unchanged. Otherwise, the iterator's
* current position is set to the boundary following the current boundary.
* @return The character index of the next text boundary or
* <code>BreakIterator.DONE</code> if the current boundary is the last text
* {@code BreakIterator.DONE} if the current boundary is the last text
* boundary.
* Equivalent to next(1).
* @see #next(int)
@ -307,11 +307,11 @@ public abstract class BreakIterator implements Cloneable
/**
* Returns the boundary preceding the current boundary. If the current boundary
* is the first text boundary, it returns <code>BreakIterator.DONE</code> and
* is the first text boundary, it returns {@code BreakIterator.DONE} and
* the iterator's current position is unchanged. Otherwise, the iterator's
* current position is set to the boundary preceding the current boundary.
* @return The character index of the previous text boundary or
* <code>BreakIterator.DONE</code> if the current boundary is the first text
* {@code BreakIterator.DONE} if the current boundary is the first text
* boundary.
*/
public abstract int previous();
@ -319,13 +319,13 @@ public abstract class BreakIterator implements Cloneable
/**
* Returns the first boundary following the specified character offset. If the
* specified offset equals to the last text boundary, it returns
* <code>BreakIterator.DONE</code> and the iterator's current position is unchanged.
* {@code BreakIterator.DONE} and the iterator's current position is unchanged.
* Otherwise, the iterator's current position is set to the returned boundary.
* The value returned is always greater than the offset or the value
* <code>BreakIterator.DONE</code>.
* {@code BreakIterator.DONE}.
* @param offset the character offset to begin scanning.
* @return The first boundary after the specified offset or
* <code>BreakIterator.DONE</code> if the last text boundary is passed in
* {@code BreakIterator.DONE} if the last text boundary is passed in
* as the offset.
* @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
@ -335,13 +335,13 @@ public abstract class BreakIterator implements Cloneable
/**
* Returns the last boundary preceding the specified character offset. If the
* specified offset equals to the first text boundary, it returns
* <code>BreakIterator.DONE</code> and the iterator's current position is unchanged.
* {@code BreakIterator.DONE} and the iterator's current position is unchanged.
* Otherwise, the iterator's current position is set to the returned boundary.
* The value returned is always less than the offset or the value
* <code>BreakIterator.DONE</code>.
* {@code BreakIterator.DONE}.
* @param offset the character offset to begin scanning.
* @return The last boundary before the specified offset or
* <code>BreakIterator.DONE</code> if the first text boundary is passed in
* {@code BreakIterator.DONE} if the first text boundary is passed in
* as the offset.
* @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
@ -361,8 +361,8 @@ public abstract class BreakIterator implements Cloneable
/**
* Returns true if the specified character offset is a text boundary.
* @param offset the character offset to check.
* @return <code>true</code> if "offset" is a boundary position,
* <code>false</code> otherwise.
* @return {@code true} if "offset" is a boundary position,
* {@code false} otherwise.
* @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
* @since 1.2
@ -390,7 +390,7 @@ public abstract class BreakIterator implements Cloneable
* Returns character index of the text boundary that was most
* recently returned by next(), next(int), previous(), first(), last(),
* following(int) or preceding(int). If any of these methods returns
* <code>BreakIterator.DONE</code> because either first or last text boundary
* {@code BreakIterator.DONE} because either first or last text boundary
* has been reached, it returns the first or last text boundary depending on
* which one is reached.
* @return The text boundary returned from the above methods, first or last
@ -437,7 +437,7 @@ public abstract class BreakIterator implements Cloneable
private static final SoftReference<BreakIteratorCache>[] iterCache = (SoftReference<BreakIteratorCache>[]) new SoftReference<?>[4];
/**
* Returns a new <code>BreakIterator</code> instance
* Returns a new {@code BreakIterator} instance
* for <a href="BreakIterator.html#word">word breaks</a>
* for the {@linkplain Locale#getDefault() default locale}.
* @return A break iterator for word breaks
@ -448,12 +448,12 @@ public abstract class BreakIterator implements Cloneable
}
/**
* Returns a new <code>BreakIterator</code> instance
* Returns a new {@code BreakIterator} instance
* for <a href="BreakIterator.html#word">word breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for word breaks
* @throws NullPointerException if <code>locale</code> is null
* @throws NullPointerException if {@code locale} is null
*/
public static BreakIterator getWordInstance(Locale locale)
{
@ -461,7 +461,7 @@ public abstract class BreakIterator implements Cloneable
}
/**
* Returns a new <code>BreakIterator</code> instance
* Returns a new {@code BreakIterator} instance
* for <a href="BreakIterator.html#line">line breaks</a>
* for the {@linkplain Locale#getDefault() default locale}.
* @return A break iterator for line breaks
@ -472,12 +472,12 @@ public abstract class BreakIterator implements Cloneable
}
/**
* Returns a new <code>BreakIterator</code> instance
* Returns a new {@code BreakIterator} instance
* for <a href="BreakIterator.html#line">line breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for line breaks
* @throws NullPointerException if <code>locale</code> is null
* @throws NullPointerException if {@code locale} is null
*/
public static BreakIterator getLineInstance(Locale locale)
{
@ -485,7 +485,7 @@ public abstract class BreakIterator implements Cloneable
}
/**
* Returns a new <code>BreakIterator</code> instance
* Returns a new {@code BreakIterator} instance
* for <a href="BreakIterator.html#character">character breaks</a>
* for the {@linkplain Locale#getDefault() default locale}.
* @return A break iterator for character breaks
@ -496,12 +496,12 @@ public abstract class BreakIterator implements Cloneable
}
/**
* Returns a new <code>BreakIterator</code> instance
* Returns a new {@code BreakIterator} instance
* for <a href="BreakIterator.html#character">character breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for character breaks
* @throws NullPointerException if <code>locale</code> is null
* @throws NullPointerException if {@code locale} is null
*/
public static BreakIterator getCharacterInstance(Locale locale)
{
@ -509,7 +509,7 @@ public abstract class BreakIterator implements Cloneable
}
/**
* Returns a new <code>BreakIterator</code> instance
* Returns a new {@code BreakIterator} instance
* for <a href="BreakIterator.html#sentence">sentence breaks</a>
* for the {@linkplain Locale#getDefault() default locale}.
* @return A break iterator for sentence breaks
@ -520,12 +520,12 @@ public abstract class BreakIterator implements Cloneable
}
/**
* Returns a new <code>BreakIterator</code> instance
* Returns a new {@code BreakIterator} instance
* for <a href="BreakIterator.html#sentence">sentence breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for sentence breaks
* @throws NullPointerException if <code>locale</code> is null
* @throws NullPointerException if {@code locale} is null
*/
public static BreakIterator getSentenceInstance(Locale locale)
{
@ -580,16 +580,16 @@ public abstract class BreakIterator implements Cloneable
/**
* Returns an array of all locales for which the
* <code>get*Instance</code> methods of this class can return
* {@code get*Instance} methods of this class can return
* localized instances.
* The returned array represents the union of locales supported by the Java
* runtime and by installed
* {@link java.text.spi.BreakIteratorProvider BreakIteratorProvider} implementations.
* It must contain at least a <code>Locale</code>
* It must contain at least a {@code Locale}
* instance equal to {@link java.util.Locale#US Locale.US}.
*
* @return An array of locales for which localized
* <code>BreakIterator</code> instances are available.
* {@code BreakIterator} instances are available.
*/
public static synchronized Locale[] getAvailableLocales()
{

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,16 +28,16 @@ import java.util.ArrayList;
/**
* CharacterIteratorFieldDelegate combines the notifications from a Format
* into a resulting <code>AttributedCharacterIterator</code>. The resulting
* <code>AttributedCharacterIterator</code> can be retrieved by way of
* the <code>getIterator</code> method.
* into a resulting {@code AttributedCharacterIterator}. The resulting
* {@code AttributedCharacterIterator} can be retrieved by way of
* the {@code getIterator} method.
*
*/
class CharacterIteratorFieldDelegate implements Format.FieldDelegate {
/**
* Array of AttributeStrings. Whenever <code>formatted</code> is invoked
* Array of AttributeStrings. Whenever {@code formatted} is invoked
* for a region > size, a new instance of AttributedString is added to
* attributedStrings. Subsequent invocations of <code>formatted</code>
* attributedStrings. Subsequent invocations of {@code formatted}
* for existing regions result in invoking addAttribute on the existing
* AttributedStrings.
*/
@ -98,7 +98,7 @@ class CharacterIteratorFieldDelegate implements Format.FieldDelegate {
}
/**
* Returns an <code>AttributedCharacterIterator</code> that can be used
* Returns an {@code AttributedCharacterIterator} that can be used
* to iterate over the resulting formatted String.
*
* @pararm string Result of formatting.

View file

@ -44,8 +44,8 @@ import java.io.ObjectInputStream;
import java.util.Arrays;
/**
* A <code>ChoiceFormat</code> allows you to attach a format to a range of numbers.
* It is generally used in a <code>MessageFormat</code> for handling plurals.
* A {@code ChoiceFormat} allows you to attach a format to a range of numbers.
* It is generally used in a {@code MessageFormat} for handling plurals.
* The choice is specified with an ascending list of doubles, where each item
* specifies a half-open interval up to the next item:
* <blockquote>
@ -60,15 +60,15 @@ import java.util.Arrays;
*
* <p>
* <strong>Note:</strong>
* <code>ChoiceFormat</code> differs from the other <code>Format</code>
* classes in that you create a <code>ChoiceFormat</code> object with a
* constructor (not with a <code>getInstance</code> style factory
* method). The factory methods aren't necessary because <code>ChoiceFormat</code>
* {@code ChoiceFormat} differs from the other {@code Format}
* classes in that you create a {@code ChoiceFormat} object with a
* constructor (not with a {@code getInstance} style factory
* method). The factory methods aren't necessary because {@code ChoiceFormat}
* doesn't require any complex setup for a given locale. In fact,
* <code>ChoiceFormat</code> doesn't implement any locale specific behavior.
* {@code ChoiceFormat} doesn't implement any locale specific behavior.
*
* <p>
* When creating a <code>ChoiceFormat</code>, you must specify an array of formats
* When creating a {@code ChoiceFormat}, you must specify an array of formats
* and an array of limits. The length of these arrays must be the same.
* For example,
* <ul>
@ -78,7 +78,7 @@ import java.util.Arrays;
* <li>
* <em>limits</em> = {0, 1, ChoiceFormat.nextDouble(1)}<br>
* <em>formats</em> = {"no files", "one file", "many files"}<br>
* (<code>nextDouble</code> can be used to get the next higher double, to
* ({@code nextDouble} can be used to get the next higher double, to
* make the half-open interval.)
* </ul>
*
@ -381,7 +381,7 @@ public class ChoiceFormat extends NumberFormat {
/**
* Specialization of format. This method really calls
* <code>format(double, StringBuffer, FieldPosition)</code>
* {@code format(double, StringBuffer, FieldPosition)}
* thus the range of longs that are supported is only equal to
* the range that can be stored by double. This will never be
* a practical limitation.
@ -542,16 +542,16 @@ public class ChoiceFormat extends NumberFormat {
/**
* A list of lower bounds for the choices. The formatter will return
* <code>choiceFormats[i]</code> if the number being formatted is greater than or equal to
* <code>choiceLimits[i]</code> and less than <code>choiceLimits[i+1]</code>.
* {@code choiceFormats[i]} if the number being formatted is greater than or equal to
* {@code choiceLimits[i]} and less than {@code choiceLimits[i+1]}.
* @serial
*/
private double[] choiceLimits;
/**
* A list of choice strings. The formatter will return
* <code>choiceFormats[i]</code> if the number being formatted is greater than or equal to
* <code>choiceLimits[i]</code> and less than <code>choiceLimits[i+1]</code>.
* {@code choiceFormats[i]} if the number being formatted is greater than or equal to
* {@code choiceLimits[i]} and less than {@code choiceLimits[i+1]}.
* @serial
*/
private String[] choiceFormats;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -44,7 +44,7 @@ import sun.text.CollatorUtilities;
import sun.text.normalizer.NormalizerBase;
/**
* The <code>CollationElementIterator</code> class is used as an iterator
* The {@code CollationElementIterator} class is used as an iterator
* to walk through each character of an international string. Use the iterator
* to return the ordering priority of the positioned character. The ordering
* priority of a character, which we refer to as a key, defines how a character
@ -68,9 +68,9 @@ import sun.text.normalizer.NormalizerBase;
* The key of a character is an integer composed of primary order(short),
* secondary order(byte), and tertiary order(byte). Java strictly defines
* the size and signedness of its primitive data types. Therefore, the static
* functions <code>primaryOrder</code>, <code>secondaryOrder</code>, and
* <code>tertiaryOrder</code> return <code>int</code>, <code>short</code>,
* and <code>short</code> respectively to ensure the correctness of the key
* functions {@code primaryOrder}, {@code secondaryOrder}, and
* {@code tertiaryOrder} return {@code int}, {@code short},
* and {@code short} respectively to ensure the correctness of the key
* value.
*
* <p>
@ -90,16 +90,16 @@ import sun.text.normalizer.NormalizerBase;
* </blockquote>
*
* <p>
* <code>CollationElementIterator.next</code> returns the collation order
* {@code CollationElementIterator.next} returns the collation order
* of the next character. A collation order consists of primary order,
* secondary order and tertiary order. The data type of the collation
* order is <strong>int</strong>. The first 16 bits of a collation order
* is its primary order; the next 8 bits is the secondary order and the
* last 8 bits is the tertiary order.
*
* <p><b>Note:</b> <code>CollationElementIterator</code> is a part of
* <code>RuleBasedCollator</code> implementation. It is only usable
* with <code>RuleBasedCollator</code> instances.
* <p><b>Note:</b> {@code CollationElementIterator} is a part of
* {@code RuleBasedCollator} implementation. It is only usable
* with {@code RuleBasedCollator} instances.
*
* @see Collator
* @see RuleBasedCollator

View file

@ -39,34 +39,34 @@
package java.text;
/**
* A <code>CollationKey</code> represents a <code>String</code> under the
* rules of a specific <code>Collator</code> object. Comparing two
* <code>CollationKey</code>s returns the relative order of the
* <code>String</code>s they represent. Using <code>CollationKey</code>s
* to compare <code>String</code>s is generally faster than using
* <code>Collator.compare</code>. Thus, when the <code>String</code>s
* A {@code CollationKey} represents a {@code String} under the
* rules of a specific {@code Collator} object. Comparing two
* {@code CollationKey}s returns the relative order of the
* {@code String}s they represent. Using {@code CollationKey}s
* to compare {@code String}s is generally faster than using
* {@code Collator.compare}. Thus, when the {@code String}s
* must be compared multiple times, for example when sorting a list
* of <code>String</code>s. It's more efficient to use <code>CollationKey</code>s.
* of {@code String}s. It's more efficient to use {@code CollationKey}s.
*
* <p>
* You can not create <code>CollationKey</code>s directly. Rather,
* generate them by calling <code>Collator.getCollationKey</code>.
* You can only compare <code>CollationKey</code>s generated from
* the same <code>Collator</code> object.
* You can not create {@code CollationKey}s directly. Rather,
* generate them by calling {@code Collator.getCollationKey}.
* You can only compare {@code CollationKey}s generated from
* the same {@code Collator} object.
*
* <p>
* Generating a <code>CollationKey</code> for a <code>String</code>
* involves examining the entire <code>String</code>
* Generating a {@code CollationKey} for a {@code String}
* involves examining the entire {@code String}
* and converting it to series of bits that can be compared bitwise. This
* allows fast comparisons once the keys are generated. The cost of generating
* keys is recouped in faster comparisons when <code>String</code>s need
* keys is recouped in faster comparisons when {@code String}s need
* to be compared many times. On the other hand, the result of a comparison
* is often determined by the first couple of characters of each <code>String</code>.
* <code>Collator.compare</code> examines only as many characters as it needs which
* is often determined by the first couple of characters of each {@code String}.
* {@code Collator.compare} examines only as many characters as it needs which
* allows it to be faster when doing single comparisons.
* <p>
* The following example shows how <code>CollationKey</code>s might be used
* to sort a list of <code>String</code>s.
* The following example shows how {@code CollationKey}s might be used
* to sort a list of {@code String}s.
* <blockquote>
* <pre>{@code
* // Create an array of CollationKeys for the Strings to be sorted.

View file

@ -49,28 +49,28 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
/**
* The <code>Collator</code> class performs locale-sensitive
* <code>String</code> comparison. You use this class to build
* The {@code Collator} class performs locale-sensitive
* {@code String} comparison. You use this class to build
* searching and sorting routines for natural language text.
*
* <p>
* <code>Collator</code> is an abstract base class. Subclasses
* {@code Collator} is an abstract base class. Subclasses
* implement specific collation strategies. One subclass,
* <code>RuleBasedCollator</code>, is currently provided with
* {@code RuleBasedCollator}, is currently provided with
* the Java Platform and is applicable to a wide set of languages. Other
* subclasses may be created to handle more specialized needs.
*
* <p>
* Like other locale-sensitive classes, you can use the static
* factory method, <code>getInstance</code>, to obtain the appropriate
* <code>Collator</code> object for a given locale. You will only need
* to look at the subclasses of <code>Collator</code> if you need
* factory method, {@code getInstance}, to obtain the appropriate
* {@code Collator} object for a given locale. You will only need
* to look at the subclasses of {@code Collator} if you need
* to understand the details of a particular collation strategy or
* if you need to modify that strategy.
*
* <p>
* The following example shows how to compare two strings using
* the <code>Collator</code> for the default locale.
* the {@code Collator} for the default locale.
* <blockquote>
* <pre>{@code
* // Compare two strings in the default locale
@ -83,10 +83,10 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* </blockquote>
*
* <p>
* You can set a <code>Collator</code>'s <em>strength</em> property
* You can set a {@code Collator}'s <em>strength</em> property
* to determine the level of difference considered significant in
* comparisons. Four strengths are provided: <code>PRIMARY</code>,
* <code>SECONDARY</code>, <code>TERTIARY</code>, and <code>IDENTICAL</code>.
* comparisons. Four strengths are provided: {@code PRIMARY},
* {@code SECONDARY}, {@code TERTIARY}, and {@code IDENTICAL}.
* The exact assignment of strengths to language features is
* locale dependent. For example, in Czech, "e" and "f" are considered
* primary differences, while "e" and "&#283;" are secondary differences,
@ -104,19 +104,19 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* </pre>
* </blockquote>
* <p>
* For comparing <code>String</code>s exactly once, the <code>compare</code>
* For comparing {@code String}s exactly once, the {@code compare}
* method provides the best performance. When sorting a list of
* <code>String</code>s however, it is generally necessary to compare each
* <code>String</code> multiple times. In this case, <code>CollationKey</code>s
* provide better performance. The <code>CollationKey</code> class converts
* a <code>String</code> to a series of bits that can be compared bitwise
* against other <code>CollationKey</code>s. A <code>CollationKey</code> is
* created by a <code>Collator</code> object for a given <code>String</code>.
* {@code String}s however, it is generally necessary to compare each
* {@code String} multiple times. In this case, {@code CollationKey}s
* provide better performance. The {@code CollationKey} class converts
* a {@code String} to a series of bits that can be compared bitwise
* against other {@code CollationKey}s. A {@code CollationKey} is
* created by a {@code Collator} object for a given {@code String}.
* <br>
* <strong>Note:</strong> <code>CollationKey</code>s from different
* <code>Collator</code>s can not be compared. See the class description
* <strong>Note:</strong> {@code CollationKey}s from different
* {@code Collator}s can not be compared. See the class description
* for {@link CollationKey}
* for an example using <code>CollationKey</code>s.
* for an example using {@code CollationKey}s.
*
* @see RuleBasedCollator
* @see CollationKey
@ -291,7 +291,7 @@ public abstract class Collator
* to, or greater than the second.
* <p>
* This implementation merely returns
* <code> compare((String)o1, (String)o2) </code>.
* {@code compare((String)o1, (String)o2) }.
*
* @return a negative integer, zero, or a positive integer as the
* first argument is less than, equal to, or greater than the
@ -416,7 +416,7 @@ public abstract class Collator
/**
* Returns an array of all locales for which the
* <code>getInstance</code> methods of this class can return
* {@code getInstance} methods of this class can return
* localized instances.
* The returned array represents the union of locales supported
* by the Java runtime and by installed
@ -425,7 +425,7 @@ public abstract class Collator
* {@link java.util.Locale#US Locale.US}.
*
* @return An array of locales for which localized
* <code>Collator</code> instances are available.
* {@code Collator} instances are available.
*/
public static synchronized Locale[] getAvailableLocales() {
LocaleServiceProviderPool pool =

View file

@ -58,7 +58,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* formats and parses dates or time in a language-independent manner.
* The date/time formatting subclass, such as {@link SimpleDateFormat}, allows for
* formatting (i.e., date &rarr; text), parsing (text &rarr; date), and
* normalization. The date is represented as a <code>Date</code> object or
* normalization. The date is represented as a {@code Date} object or
* as the milliseconds since January 1, 1970, 00:00:00 GMT.
*
* <p>{@code DateFormat} provides many class methods for obtaining default date/time
@ -185,15 +185,15 @@ public abstract class DateFormat extends Format {
*
* <p>Subclasses should initialize this field to a {@link Calendar}
* appropriate for the {@link Locale} associated with this
* <code>DateFormat</code>.
* {@code DateFormat}.
* @serial
*/
protected Calendar calendar;
/**
* The number formatter that <code>DateFormat</code> uses to format numbers
* The number formatter that {@code DateFormat} uses to format numbers
* in dates and times. Subclasses should initialize this to a number format
* appropriate for the locale associated with this <code>DateFormat</code>.
* appropriate for the locale associated with this {@code DateFormat}.
* @serial
*/
protected NumberFormat numberFormat;
@ -383,8 +383,8 @@ public abstract class DateFormat extends Format {
* See the {@link #parse(String, ParsePosition)} method for more information
* on date parsing.
*
* @param source A <code>String</code> whose beginning should be parsed.
* @return A <code>Date</code> parsed from the string.
* @param source A {@code String} whose beginning should be parsed.
* @return A {@code Date} parsed from the string.
* @throws ParseException if the beginning of the specified string
* cannot be parsed.
*/
@ -427,26 +427,26 @@ public abstract class DateFormat extends Format {
public abstract Date parse(String source, ParsePosition pos);
/**
* Parses text from a string to produce a <code>Date</code>.
* Parses text from a string to produce a {@code Date}.
* <p>
* The method attempts to parse text starting at the index given by
* <code>pos</code>.
* If parsing succeeds, then the index of <code>pos</code> is updated
* {@code pos}.
* If parsing succeeds, then the index of {@code pos} is updated
* to the index after the last character used (parsing does not necessarily
* use all characters up to the end of the string), and the parsed
* date is returned. The updated <code>pos</code> can be used to
* date is returned. The updated {@code pos} can be used to
* indicate the starting point for the next call to this method.
* If an error occurs, then the index of <code>pos</code> is not
* changed, the error index of <code>pos</code> is set to the index of
* If an error occurs, then the index of {@code pos} is not
* changed, the error index of {@code pos} is set to the index of
* the character where the error occurred, and null is returned.
* <p>
* See the {@link #parse(String, ParsePosition)} method for more information
* on date parsing.
*
* @param source A <code>String</code>, part of which should be parsed.
* @param pos A <code>ParsePosition</code> object with index and error
* @param source A {@code String}, part of which should be parsed.
* @param pos A {@code ParsePosition} object with index and error
* index information as described above.
* @return A <code>Date</code> parsed from the string. In case of
* @return A {@code Date} parsed from the string. In case of
* error, returns null.
* @throws NullPointerException if {@code source} or {@code pos} is null.
*/
@ -628,16 +628,16 @@ public abstract class DateFormat extends Format {
/**
* Returns an array of all locales for which the
* <code>get*Instance</code> methods of this class can return
* {@code get*Instance} methods of this class can return
* localized instances.
* The returned array represents the union of locales supported by the Java
* runtime and by installed
* {@link java.text.spi.DateFormatProvider DateFormatProvider} implementations.
* It must contain at least a <code>Locale</code> instance equal to
* It must contain at least a {@code Locale} instance equal to
* {@link java.util.Locale#US Locale.US}.
*
* @return An array of locales for which localized
* <code>DateFormat</code> instances are available.
* {@code DateFormat} instances are available.
*/
public static Locale[] getAvailableLocales()
{
@ -854,9 +854,9 @@ public abstract class DateFormat extends Format {
/**
* Defines constants that are used as attribute keys in the
* <code>AttributedCharacterIterator</code> returned
* from <code>DateFormat.formatToCharacterIterator</code> and as
* field identifiers in <code>FieldPosition</code>.
* {@code AttributedCharacterIterator} returned
* from {@code DateFormat.formatToCharacterIterator} and as
* field identifiers in {@code FieldPosition}.
* <p>
* The class also provides two methods to map
* between its constants and the corresponding Calendar constants.
@ -881,13 +881,13 @@ public abstract class DateFormat extends Format {
private int calendarField;
/**
* Returns the <code>Field</code> constant that corresponds to
* the <code>Calendar</code> constant <code>calendarField</code>.
* If there is no direct mapping between the <code>Calendar</code>
* constant and a <code>Field</code>, null is returned.
* Returns the {@code Field} constant that corresponds to
* the {@code Calendar} constant {@code calendarField}.
* If there is no direct mapping between the {@code Calendar}
* constant and a {@code Field}, null is returned.
*
* @throws IllegalArgumentException if <code>calendarField</code> is
* not the value of a <code>Calendar</code> field constant.
* @throws IllegalArgumentException if {@code calendarField} is
* not the value of a {@code Calendar} field constant.
* @param calendarField Calendar field constant
* @return Field instance representing calendarField.
* @see java.util.Calendar
@ -902,14 +902,14 @@ public abstract class DateFormat extends Format {
}
/**
* Creates a <code>Field</code>.
* Creates a {@code Field}.
*
* @param name the name of the <code>Field</code>
* @param calendarField the <code>Calendar</code> constant this
* <code>Field</code> corresponds to; any value, even one
* outside the range of legal <code>Calendar</code> values may
* be used, but <code>-1</code> should be used for values
* that don't correspond to legal <code>Calendar</code> values
* @param name the name of the {@code Field}
* @param calendarField the {@code Calendar} constant this
* {@code Field} corresponds to; any value, even one
* outside the range of legal {@code Calendar} values may
* be used, but {@code -1} should be used for values
* that don't correspond to legal {@code Calendar} values
*/
protected Field(String name, int calendarField) {
super(name);
@ -924,11 +924,11 @@ public abstract class DateFormat extends Format {
}
/**
* Returns the <code>Calendar</code> field associated with this
* Returns the {@code Calendar} field associated with this
* attribute. For example, if this represents the hours field of
* a <code>Calendar</code>, this would return
* <code>Calendar.HOUR</code>. If there is no corresponding
* <code>Calendar</code> constant, this will return -1.
* a {@code Calendar}, this would return
* {@code Calendar.HOUR}. If there is no corresponding
* {@code Calendar} constant, this will return -1.
*
* @return Calendar constant for this field
* @see java.util.Calendar

View file

@ -56,22 +56,22 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
import sun.util.locale.provider.TimeZoneNameUtility;
/**
* <code>DateFormatSymbols</code> is a public class for encapsulating
* {@code DateFormatSymbols} is a public class for encapsulating
* localizable date-time formatting data, such as the names of the
* months, the names of the days of the week, and the time zone data.
* <code>SimpleDateFormat</code> uses
* <code>DateFormatSymbols</code> to encapsulate this information.
* {@code SimpleDateFormat} uses
* {@code DateFormatSymbols} to encapsulate this information.
*
* <p>
* Typically you shouldn't use <code>DateFormatSymbols</code> directly.
* Typically you shouldn't use {@code DateFormatSymbols} directly.
* Rather, you are encouraged to create a date-time formatter with the
* <code>DateFormat</code> class's factory methods: <code>getTimeInstance</code>,
* <code>getDateInstance</code>, or <code>getDateTimeInstance</code>.
* These methods automatically create a <code>DateFormatSymbols</code> for
* {@code DateFormat} class's factory methods: {@code getTimeInstance},
* {@code getDateInstance}, or {@code getDateTimeInstance}.
* These methods automatically create a {@code DateFormatSymbols} for
* the formatter so that you don't have to. After the
* formatter is created, you may modify its format pattern using the
* <code>setPattern</code> method. For more information about
* creating formatters using <code>DateFormat</code>'s factory methods,
* {@code setPattern} method. For more information about
* creating formatters using {@code DateFormat}'s factory methods,
* see {@link DateFormat}.
*
* <p>
@ -88,16 +88,16 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* the symbols are overridden for the designated region.
*
* <p>
* <code>DateFormatSymbols</code> objects are cloneable. When you obtain
* a <code>DateFormatSymbols</code> object, feel free to modify the
* {@code DateFormatSymbols} objects are cloneable. When you obtain
* a {@code DateFormatSymbols} object, feel free to modify the
* date-time formatting data. For instance, you can replace the localized
* date-time format pattern characters with the ones that you feel easy
* to remember. Or you can change the representative cities
* to your favorite ones.
*
* <p>
* New <code>DateFormatSymbols</code> subclasses may be added to support
* <code>SimpleDateFormat</code> for date-time formatting for additional locales.
* New {@code DateFormatSymbols} subclasses may be added to support
* {@code SimpleDateFormat} for date-time formatting for additional locales.
* @see DateFormat
* @see SimpleDateFormat
@ -159,7 +159,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Era strings. For example: "AD" and "BC". An array of 2 strings,
* indexed by <code>Calendar.BC</code> and <code>Calendar.AD</code>.
* indexed by {@code Calendar.BC} and {@code Calendar.AD}.
* @serial
*/
String eras[] = null;
@ -167,7 +167,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Month strings. For example: "January", "February", etc. An array
* of 13 strings (some calendars have 13 months), indexed by
* <code>Calendar.JANUARY</code>, <code>Calendar.FEBRUARY</code>, etc.
* {@code Calendar.JANUARY}, {@code Calendar.FEBRUARY}, etc.
* @serial
*/
String months[] = null;
@ -175,7 +175,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Short month strings. For example: "Jan", "Feb", etc. An array of
* 13 strings (some calendars have 13 months), indexed by
* <code>Calendar.JANUARY</code>, <code>Calendar.FEBRUARY</code>, etc.
* {@code Calendar.JANUARY}, {@code Calendar.FEBRUARY}, etc.
* @serial
*/
@ -183,26 +183,26 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Weekday strings. For example: "Sunday", "Monday", etc. An array
* of 8 strings, indexed by <code>Calendar.SUNDAY</code>,
* <code>Calendar.MONDAY</code>, etc.
* The element <code>weekdays[0]</code> is ignored.
* of 8 strings, indexed by {@code Calendar.SUNDAY},
* {@code Calendar.MONDAY}, etc.
* The element {@code weekdays[0]} is ignored.
* @serial
*/
String weekdays[] = null;
/**
* Short weekday strings. For example: "Sun", "Mon", etc. An array
* of 8 strings, indexed by <code>Calendar.SUNDAY</code>,
* <code>Calendar.MONDAY</code>, etc.
* The element <code>shortWeekdays[0]</code> is ignored.
* of 8 strings, indexed by {@code Calendar.SUNDAY},
* {@code Calendar.MONDAY}, etc.
* The element {@code shortWeekdays[0]} is ignored.
* @serial
*/
String shortWeekdays[] = null;
/**
* AM and PM strings. For example: "AM" and "PM". An array of
* 2 strings, indexed by <code>Calendar.AM</code> and
* <code>Calendar.PM</code>.
* 2 strings, indexed by {@code Calendar.AM} and
* {@code Calendar.PM}.
* @serial
*/
String ampms[] = null;
@ -211,18 +211,18 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* Localized names of time zones in this locale. This is a
* two-dimensional array of strings of size <em>n</em> by <em>m</em>,
* where <em>m</em> is at least 5. Each of the <em>n</em> rows is an
* entry containing the localized names for a single <code>TimeZone</code>.
* Each such row contains (with <code>i</code> ranging from
* entry containing the localized names for a single {@code TimeZone}.
* Each such row contains (with {@code i} ranging from
* 0..<em>n</em>-1):
* <ul>
* <li><code>zoneStrings[i][0]</code> - time zone ID</li>
* <li><code>zoneStrings[i][1]</code> - long name of zone in standard
* <li>{@code zoneStrings[i][0]} - time zone ID</li>
* <li>{@code zoneStrings[i][1]} - long name of zone in standard
* time</li>
* <li><code>zoneStrings[i][2]</code> - short name of zone in
* <li>{@code zoneStrings[i][2]} - short name of zone in
* standard time</li>
* <li><code>zoneStrings[i][3]</code> - long name of zone in daylight
* <li>{@code zoneStrings[i][3]} - long name of zone in daylight
* saving time</li>
* <li><code>zoneStrings[i][4]</code> - short name of zone in daylight
* <li>{@code zoneStrings[i][4]} - short name of zone in daylight
* saving time</li>
* </ul>
* The zone ID is <em>not</em> localized; it's one of the valid IDs of
@ -274,8 +274,8 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* wish to use 'u' rather than 'y' to represent years in its date format
* pattern strings.
* This string must be exactly 18 characters long, with the index of
* the characters described by <code>DateFormat.ERA_FIELD</code>,
* <code>DateFormat.YEAR_FIELD</code>, etc. Thus, if the string were
* the characters described by {@code DateFormat.ERA_FIELD},
* {@code DateFormat.YEAR_FIELD}, etc. Thus, if the string were
* "Xz...", then localized patterns would use 'X' for era and 'z' for year.
* @serial
*/
@ -295,16 +295,16 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Returns an array of all locales for which the
* <code>getInstance</code> methods of this class can return
* {@code getInstance} methods of this class can return
* localized instances.
* The returned array represents the union of locales supported by the
* Java runtime and by installed
* {@link java.text.spi.DateFormatSymbolsProvider DateFormatSymbolsProvider}
* implementations. It must contain at least a <code>Locale</code>
* implementations. It must contain at least a {@code Locale}
* instance equal to {@link java.util.Locale#US Locale.US}.
*
* @return An array of locales for which localized
* <code>DateFormatSymbols</code> instances are available.
* {@code DateFormatSymbols} instances are available.
* @since 1.6
*/
public static Locale[] getAvailableLocales() {
@ -314,8 +314,8 @@ public class DateFormatSymbols implements Serializable, Cloneable {
}
/**
* Gets the <code>DateFormatSymbols</code> instance for the default
* locale. This method provides access to <code>DateFormatSymbols</code>
* Gets the {@code DateFormatSymbols} instance for the default
* locale. This method provides access to {@code DateFormatSymbols}
* instances for locales supported by the Java runtime itself as well
* as for those supported by installed
* {@link java.text.spi.DateFormatSymbolsProvider DateFormatSymbolsProvider}
@ -324,7 +324,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* getInstance(Locale.getDefault(Locale.Category.FORMAT))}.
* @see java.util.Locale#getDefault(java.util.Locale.Category)
* @see java.util.Locale.Category#FORMAT
* @return a <code>DateFormatSymbols</code> instance.
* @return a {@code DateFormatSymbols} instance.
* @since 1.6
*/
public static final DateFormatSymbols getInstance() {
@ -332,15 +332,15 @@ public class DateFormatSymbols implements Serializable, Cloneable {
}
/**
* Gets the <code>DateFormatSymbols</code> instance for the specified
* locale. This method provides access to <code>DateFormatSymbols</code>
* Gets the {@code DateFormatSymbols} instance for the specified
* locale. This method provides access to {@code DateFormatSymbols}
* instances for locales supported by the Java runtime itself as well
* as for those supported by installed
* {@link java.text.spi.DateFormatSymbolsProvider DateFormatSymbolsProvider}
* implementations.
* @param locale the given locale.
* @return a <code>DateFormatSymbols</code> instance.
* @throws NullPointerException if <code>locale</code> is null
* @return a {@code DateFormatSymbols} instance.
* @throws NullPointerException if {@code locale} is null
* @since 1.6
*/
public static final DateFormatSymbols getInstance(Locale locale) {
@ -538,18 +538,18 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* The value returned is a
* two-dimensional array of strings of size <em>n</em> by <em>m</em>,
* where <em>m</em> is at least 5. Each of the <em>n</em> rows is an
* entry containing the localized names for a single <code>TimeZone</code>.
* Each such row contains (with <code>i</code> ranging from
* entry containing the localized names for a single {@code TimeZone}.
* Each such row contains (with {@code i} ranging from
* 0..<em>n</em>-1):
* <ul>
* <li><code>zoneStrings[i][0]</code> - time zone ID</li>
* <li><code>zoneStrings[i][1]</code> - long name of zone in standard
* <li>{@code zoneStrings[i][0]} - time zone ID</li>
* <li>{@code zoneStrings[i][1]} - long name of zone in standard
* time</li>
* <li><code>zoneStrings[i][2]</code> - short name of zone in
* <li>{@code zoneStrings[i][2]} - short name of zone in
* standard time</li>
* <li><code>zoneStrings[i][3]</code> - long name of zone in daylight
* <li>{@code zoneStrings[i][3]} - long name of zone in daylight
* saving time</li>
* <li><code>zoneStrings[i][4]</code> - short name of zone in daylight
* <li>{@code zoneStrings[i][4]} - short name of zone in daylight
* saving time</li>
* </ul>
* The zone ID is <em>not</em> localized; it's one of the valid IDs of
@ -559,7 +559,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* daylight saving time, the daylight saving time names should not be used.
* <p>
* If {@link #setZoneStrings(String[][]) setZoneStrings} has been called
* on this <code>DateFormatSymbols</code> instance, then the strings
* on this {@code DateFormatSymbols} instance, then the strings
* provided by that call are returned. Otherwise, the returned array
* contains names provided by the Java runtime and by installed
* {@link java.util.spi.TimeZoneNameProvider TimeZoneNameProvider}
@ -576,18 +576,18 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* Sets time zone strings. The argument must be a
* two-dimensional array of strings of size <em>n</em> by <em>m</em>,
* where <em>m</em> is at least 5. Each of the <em>n</em> rows is an
* entry containing the localized names for a single <code>TimeZone</code>.
* Each such row contains (with <code>i</code> ranging from
* entry containing the localized names for a single {@code TimeZone}.
* Each such row contains (with {@code i} ranging from
* 0..<em>n</em>-1):
* <ul>
* <li><code>zoneStrings[i][0]</code> - time zone ID</li>
* <li><code>zoneStrings[i][1]</code> - long name of zone in standard
* <li>{@code zoneStrings[i][0]} - time zone ID</li>
* <li>{@code zoneStrings[i][1]} - long name of zone in standard
* time</li>
* <li><code>zoneStrings[i][2]</code> - short name of zone in
* <li>{@code zoneStrings[i][2]} - short name of zone in
* standard time</li>
* <li><code>zoneStrings[i][3]</code> - long name of zone in daylight
* <li>{@code zoneStrings[i][3]} - long name of zone in daylight
* saving time</li>
* <li><code>zoneStrings[i][4]</code> - short name of zone in daylight
* <li>{@code zoneStrings[i][4]} - short name of zone in daylight
* saving time</li>
* </ul>
* The zone ID is <em>not</em> localized; it's one of the valid IDs of
@ -597,8 +597,8 @@ public class DateFormatSymbols implements Serializable, Cloneable {
*
* @param newZoneStrings the new time zone strings.
* @throws IllegalArgumentException if the length of any row in
* <code>newZoneStrings</code> is less than 5
* @throws NullPointerException if <code>newZoneStrings</code> is null
* {@code newZoneStrings} is less than 5
* @throws NullPointerException if {@code newZoneStrings} is null
* @see #getZoneStrings()
*/
public void setZoneStrings(String[][] newZoneStrings) {
@ -888,7 +888,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* Write out the default serializable data, after ensuring the
* <code>zoneStrings</code> field is initialized in order to make
* {@code zoneStrings} field is initialized in order to make
* sure the backward compatibility.
*
* @since 1.6

View file

@ -439,7 +439,7 @@ final class DigitList implements Cloneable {
* java.math.RoundingMode class.
* [bnf]
* @param maximumDigits the number of digits to keep, from 0 to
* <code>count-1</code>. If 0, then all digits are rounded away, and
* {@code count-1}. If 0, then all digits are rounded away, and
* this method returns true if a one should be generated (e.g., formatting
* 0.09 with "#.#").
* @param alreadyRounded whether or not rounding up has already happened.
@ -447,7 +447,7 @@ final class DigitList implements Cloneable {
* an exact decimal representation of the value.
* @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @return true if digit <code>maximumDigits-1</code> should be
* @return true if digit {@code maximumDigits-1} should be
* incremented
*/
private boolean shouldRoundUp(int maximumDigits,

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,33 +39,33 @@
package java.text;
/**
* <code>FieldPosition</code> is a simple class used by <code>Format</code>
* {@code FieldPosition} is a simple class used by {@code Format}
* and its subclasses to identify fields in formatted output. Fields can
* be identified in two ways:
* <ul>
* <li>By an integer constant, whose names typically end with
* <code>_FIELD</code>. The constants are defined in the various
* subclasses of <code>Format</code>.
* <li>By a <code>Format.Field</code> constant, see <code>ERA_FIELD</code>
* and its friends in <code>DateFormat</code> for an example.
* {@code _FIELD}. The constants are defined in the various
* subclasses of {@code Format}.
* <li>By a {@code Format.Field} constant, see {@code ERA_FIELD}
* and its friends in {@code DateFormat} for an example.
* </ul>
* <p>
* <code>FieldPosition</code> keeps track of the position of the
* {@code FieldPosition} keeps track of the position of the
* field within the formatted output with two indices: the index
* of the first character of the field and the index of the last
* character of the field.
*
* <p>
* One version of the <code>format</code> method in the various
* <code>Format</code> classes requires a <code>FieldPosition</code>
* object as an argument. You use this <code>format</code> method
* One version of the {@code format} method in the various
* {@code Format} classes requires a {@code FieldPosition}
* object as an argument. You use this {@code format} method
* to perform partial formatting or to get information about the
* formatted output (such as the position of a field).
*
* <p>
* If you are interested in the positions of all attributes in the
* formatted string use the <code>Format</code> method
* <code>formatToCharacterIterator</code>.
* formatted string use the {@code Format} method
* {@code formatToCharacterIterator}.
*
* @author Mark Davis
* @since 1.1
@ -113,9 +113,9 @@ public class FieldPosition {
/**
* Creates a FieldPosition object for the given field constant. Fields are
* identified by constants defined in the various <code>Format</code>
* identified by constants defined in the various {@code Format}
* subclasses. This is equivalent to calling
* <code>new FieldPosition(attribute, -1)</code>.
* {@code new FieldPosition(attribute, -1)}.
*
* @param attribute Format.Field constant identifying a field
* @since 1.4
@ -125,16 +125,16 @@ public class FieldPosition {
}
/**
* Creates a <code>FieldPosition</code> object for the given field.
* Creates a {@code FieldPosition} object for the given field.
* The field is identified by an attribute constant from one of the
* <code>Field</code> subclasses as well as an integer field ID
* defined by the <code>Format</code> subclasses. <code>Format</code>
* subclasses that are aware of <code>Field</code> should give precedence
* to <code>attribute</code> and ignore <code>fieldID</code> if
* <code>attribute</code> is not null. However, older <code>Format</code>
* subclasses may not be aware of <code>Field</code> and rely on
* <code>fieldID</code>. If the field has no corresponding integer
* constant, <code>fieldID</code> should be -1.
* {@code Field} subclasses as well as an integer field ID
* defined by the {@code Format} subclasses. {@code Format}
* subclasses that are aware of {@code Field} should give precedence
* to {@code attribute} and ignore {@code fieldID} if
* {@code attribute} is not null. However, older {@code Format}
* subclasses may not be aware of {@code Field} and rely on
* {@code fieldID}. If the field has no corresponding integer
* constant, {@code fieldID} should be -1.
*
* @param attribute Format.Field constant identifying a field
* @param fieldID integer constant identifying a field
@ -147,7 +147,7 @@ public class FieldPosition {
/**
* Returns the field identifier as an attribute constant
* from one of the <code>Field</code> subclasses. May return null if
* from one of the {@code Field} subclasses. May return null if
* the field is specified only by an integer field ID.
*
* @return Identifier for the field
@ -206,7 +206,7 @@ public class FieldPosition {
}
/**
* Returns a <code>Format.FieldDelegate</code> instance that is associated
* Returns a {@code Format.FieldDelegate} instance that is associated
* with the FieldPosition. When the delegate is notified of the same
* field the FieldPosition is associated with, the begin/end will be
* adjusted.
@ -258,8 +258,8 @@ public class FieldPosition {
/**
* Return true if the receiver wants a <code>Format.Field</code> value and
* <code>attribute</code> is equal to it.
* Return true if the receiver wants a {@code Format.Field} value and
* {@code attribute} is equal to it.
*/
private boolean matchesField(Format.Field attribute) {
if (this.attribute != null) {
@ -269,9 +269,9 @@ public class FieldPosition {
}
/**
* Return true if the receiver wants a <code>Format.Field</code> value and
* <code>attribute</code> is equal to it, or true if the receiver
* represents an inteter constant and <code>field</code> equals it.
* Return true if the receiver wants a {@code Format.Field} value and
* {@code attribute} is equal to it, or true if the receiver
* represents an inteter constant and {@code field} equals it.
*/
private boolean matchesField(Format.Field attribute, int field) {
if (this.attribute != null) {
@ -289,7 +289,7 @@ public class FieldPosition {
private class Delegate implements Format.FieldDelegate {
/**
* Indicates whether the field has been encountered before. If this
* is true, and <code>formatted</code> is invoked, the begin/end
* is true, and {@code formatted} is invoked, the begin/end
* are not updated.
*/
private boolean encounteredField;

View file

@ -41,64 +41,64 @@ package java.text;
import java.io.Serializable;
/**
* <code>Format</code> is an abstract base class for formatting locale-sensitive
* {@code Format} is an abstract base class for formatting locale-sensitive
* information such as dates, messages, and numbers.
*
* <p>
* <code>Format</code> defines the programming interface for formatting
* locale-sensitive objects into <code>String</code>s (the
* <code>format</code> method) and for parsing <code>String</code>s back
* into objects (the <code>parseObject</code> method).
* {@code Format} defines the programming interface for formatting
* locale-sensitive objects into {@code String}s (the
* {@code format} method) and for parsing {@code String}s back
* into objects (the {@code parseObject} method).
*
* <p>
* Generally, a format's <code>parseObject</code> method must be able to parse
* any string formatted by its <code>format</code> method. However, there may
* Generally, a format's {@code parseObject} method must be able to parse
* any string formatted by its {@code format} method. However, there may
* be exceptional cases where this is not possible. For example, a
* <code>format</code> method might create two adjacent integer numbers with
* no separator in between, and in this case the <code>parseObject</code> could
* {@code format} method might create two adjacent integer numbers with
* no separator in between, and in this case the {@code parseObject} could
* not tell which digits belong to which number.
*
* <h2>Subclassing</h2>
*
* <p>
* The Java Platform provides three specialized subclasses of <code>Format</code>--
* <code>DateFormat</code>, <code>MessageFormat</code>, and
* <code>NumberFormat</code>--for formatting dates, messages, and numbers,
* The Java Platform provides three specialized subclasses of {@code Format}--
* {@code DateFormat}, {@code MessageFormat}, and
* {@code NumberFormat}--for formatting dates, messages, and numbers,
* respectively.
* <p>
* Concrete subclasses must implement three methods:
* <ol>
* <li> <code>format(Object obj, StringBuffer toAppendTo, FieldPosition pos)</code>
* <li> <code>formatToCharacterIterator(Object obj)</code>
* <li> <code>parseObject(String source, ParsePosition pos)</code>
* <li> {@code format(Object obj, StringBuffer toAppendTo, FieldPosition pos)}
* <li> {@code formatToCharacterIterator(Object obj)}
* <li> {@code parseObject(String source, ParsePosition pos)}
* </ol>
* These general methods allow polymorphic parsing and formatting of objects
* and are used, for example, by <code>MessageFormat</code>.
* Subclasses often also provide additional <code>format</code> methods for
* specific input types as well as <code>parse</code> methods for specific
* result types. Any <code>parse</code> method that does not take a
* <code>ParsePosition</code> argument should throw <code>ParseException</code>
* and are used, for example, by {@code MessageFormat}.
* Subclasses often also provide additional {@code format} methods for
* specific input types as well as {@code parse} methods for specific
* result types. Any {@code parse} method that does not take a
* {@code ParsePosition} argument should throw {@code ParseException}
* when no text in the required format is at the beginning of the input text.
*
* <p>
* Most subclasses will also implement the following factory methods:
* <ol>
* <li>
* <code>getInstance</code> for getting a useful format object appropriate
* {@code getInstance} for getting a useful format object appropriate
* for the current locale
* <li>
* <code>getInstance(Locale)</code> for getting a useful format
* {@code getInstance(Locale)} for getting a useful format
* object appropriate for the specified locale
* </ol>
* In addition, some subclasses may also implement other
* <code>getXxxxInstance</code> methods for more specialized control. For
* example, the <code>NumberFormat</code> class provides
* <code>getPercentInstance</code> and <code>getCurrencyInstance</code>
* {@code getXxxxInstance} methods for more specialized control. For
* example, the {@code NumberFormat} class provides
* {@code getPercentInstance} and {@code getCurrencyInstance}
* methods for getting specialized number formatters.
*
* <p>
* Subclasses of <code>Format</code> that allow programmers to create objects
* for locales (with <code>getInstance(Locale)</code> for example)
* Subclasses of {@code Format} that allow programmers to create objects
* for locales (with {@code getInstance(Locale)} for example)
* must also implement the following class method:
* <blockquote>
* <pre>
@ -112,7 +112,7 @@ import java.io.Serializable;
* object which identifies what information is contained in the field and its
* position in the formatted result. These constants should be named
* <code><em>item</em>_FIELD</code> where <code><em>item</em></code> identifies
* the field. For examples of these constants, see <code>ERA_FIELD</code> and its
* the field. For examples of these constants, see {@code ERA_FIELD} and its
* friends in {@link DateFormat}.
*
* <h3><a id="synchronization">Synchronization</a></h3>
@ -162,18 +162,18 @@ public abstract class Format implements Serializable, Cloneable {
/**
* Formats an object and appends the resulting text to a given string
* buffer.
* If the <code>pos</code> argument identifies a field used by the format,
* If the {@code pos} argument identifies a field used by the format,
* then its indices are set to the beginning and end of the first such
* field encountered.
*
* @param obj The object to format
* @param toAppendTo where the text is to be appended
* @param pos A <code>FieldPosition</code> identifying a field
* @param pos A {@code FieldPosition} identifying a field
* in the formatted text
* @return the string buffer passed in as <code>toAppendTo</code>,
* @return the string buffer passed in as {@code toAppendTo},
* with formatted text appended
* @throws NullPointerException if <code>toAppendTo</code> or
* <code>pos</code> is null
* @throws NullPointerException if {@code toAppendTo} or
* {@code pos} is null
* @throws IllegalArgumentException if the Format cannot format the given
* object
*/
@ -182,20 +182,20 @@ public abstract class Format implements Serializable, Cloneable {
FieldPosition pos);
/**
* Formats an Object producing an <code>AttributedCharacterIterator</code>.
* You can use the returned <code>AttributedCharacterIterator</code>
* Formats an Object producing an {@code AttributedCharacterIterator}.
* You can use the returned {@code AttributedCharacterIterator}
* to build the resulting String, as well as to determine information
* about the resulting String.
* <p>
* Each attribute key of the AttributedCharacterIterator will be of type
* <code>Field</code>. It is up to each <code>Format</code> implementation
* {@code Field}. It is up to each {@code Format} implementation
* to define what the legal values are for each attribute in the
* <code>AttributedCharacterIterator</code>, but typically the attribute
* {@code AttributedCharacterIterator}, but typically the attribute
* key is also used as the attribute value.
* <p>The default implementation creates an
* <code>AttributedCharacterIterator</code> with no attributes. Subclasses
* {@code AttributedCharacterIterator} with no attributes. Subclasses
* that support fields should override this and create an
* <code>AttributedCharacterIterator</code> with meaningful attributes.
* {@code AttributedCharacterIterator} with meaningful attributes.
*
* @throws NullPointerException if obj is null.
* @throws IllegalArgumentException when the Format cannot format the
@ -212,20 +212,20 @@ public abstract class Format implements Serializable, Cloneable {
* Parses text from a string to produce an object.
* <p>
* The method attempts to parse text starting at the index given by
* <code>pos</code>.
* If parsing succeeds, then the index of <code>pos</code> is updated
* {@code pos}.
* If parsing succeeds, then the index of {@code pos} is updated
* to the index after the last character used (parsing does not necessarily
* use all characters up to the end of the string), and the parsed
* object is returned. The updated <code>pos</code> can be used to
* object is returned. The updated {@code pos} can be used to
* indicate the starting point for the next call to this method.
* If an error occurs, then the index of <code>pos</code> is not
* changed, the error index of <code>pos</code> is set to the index of
* If an error occurs, then the index of {@code pos} is not
* changed, the error index of {@code pos} is set to the index of
* the character where the error occurred, and null is returned.
*
* @param source A <code>String</code>, part of which should be parsed.
* @param pos A <code>ParsePosition</code> object with index and error
* @param source A {@code String}, part of which should be parsed.
* @param pos A {@code ParsePosition} object with index and error
* index information as described above.
* @return An <code>Object</code> parsed from the string. In case of
* @return An {@code Object} parsed from the string. In case of
* error, returns null.
* @throws NullPointerException if {@code source} or {@code pos} is null.
*/
@ -235,8 +235,8 @@ public abstract class Format implements Serializable, Cloneable {
* Parses text from the beginning of the given string to produce an object.
* The method may not use the entire text of the given string.
*
* @param source A <code>String</code> whose beginning should be parsed.
* @return An <code>Object</code> parsed from the string.
* @param source A {@code String} whose beginning should be parsed.
* @return An {@code Object} parsed from the string.
* @throws ParseException if the beginning of the specified string
* cannot be parsed.
* @throws NullPointerException if {@code source} is null.
@ -271,8 +271,8 @@ public abstract class Format implements Serializable, Cloneable {
//
/**
* Creates an <code>AttributedCharacterIterator</code> for the String
* <code>s</code>.
* Creates an {@code AttributedCharacterIterator} for the String
* {@code s}.
*
* @param s String to create AttributedCharacterIterator from
* @return AttributedCharacterIterator wrapping s
@ -284,9 +284,9 @@ public abstract class Format implements Serializable, Cloneable {
}
/**
* Creates an <code>AttributedCharacterIterator</code> containing the
* Creates an {@code AttributedCharacterIterator} containing the
* concatenated contents of the passed in
* <code>AttributedCharacterIterator</code>s.
* {@code AttributedCharacterIterator}s.
*
* @param iterators AttributedCharacterIterators used to create resulting
* AttributedCharacterIterators
@ -302,8 +302,8 @@ public abstract class Format implements Serializable, Cloneable {
/**
* Returns an AttributedCharacterIterator with the String
* <code>string</code> and additional key/value pair <code>key</code>,
* <code>value</code>.
* {@code string} and additional key/value pair {@code key},
* {@code value}.
*
* @param string String to create AttributedCharacterIterator from
* @param key Key for AttributedCharacterIterator
@ -321,8 +321,8 @@ public abstract class Format implements Serializable, Cloneable {
/**
* Creates an AttributedCharacterIterator with the contents of
* <code>iterator</code> and the additional attribute <code>key</code>
* <code>value</code>.
* {@code iterator} and the additional attribute {@code key}
* {@code value}.
*
* @param iterator Initial AttributedCharacterIterator to add arg to
* @param key Key for AttributedCharacterIterator
@ -341,9 +341,9 @@ public abstract class Format implements Serializable, Cloneable {
/**
* Defines constants that are used as attribute keys in the
* <code>AttributedCharacterIterator</code> returned
* from <code>Format.formatToCharacterIterator</code> and as
* field identifiers in <code>FieldPosition</code>.
* {@code AttributedCharacterIterator} returned
* from {@code Format.formatToCharacterIterator} and as
* field identifiers in {@code FieldPosition}.
*
* @since 1.4
*/
@ -365,13 +365,13 @@ public abstract class Format implements Serializable, Cloneable {
/**
* FieldDelegate is notified by the various <code>Format</code>
* FieldDelegate is notified by the various {@code Format}
* implementations as they are formatting the Objects. This allows for
* storage of the individual sections of the formatted String for
* later use, such as in a <code>FieldPosition</code> or for an
* <code>AttributedCharacterIterator</code>.
* later use, such as in a {@code FieldPosition} or for an
* {@code AttributedCharacterIterator}.
* <p>
* Delegates should NOT assume that the <code>Format</code> will notify
* Delegates should NOT assume that the {@code Format} will notify
* the delegate of fields in any particular order.
*
* @see FieldPosition#getFieldDelegate
@ -381,7 +381,7 @@ public abstract class Format implements Serializable, Cloneable {
/**
* Notified when a particular region of the String is formatted. This
* method will be invoked if there is no corresponding integer field id
* matching <code>attr</code>.
* matching {@code attr}.
*
* @param attr Identifies the field matched
* @param value Value associated with the field

View file

@ -50,27 +50,27 @@ import java.util.Locale;
/**
* <code>MessageFormat</code> provides a means to produce concatenated
* {@code MessageFormat} provides a means to produce concatenated
* messages in a language-neutral way. Use this to construct messages
* displayed for end users.
*
* <p>
* <code>MessageFormat</code> takes a set of objects, formats them, then
* {@code MessageFormat} takes a set of objects, formats them, then
* inserts the formatted strings into the pattern at the appropriate places.
*
* <p>
* <strong>Note:</strong>
* <code>MessageFormat</code> differs from the other <code>Format</code>
* classes in that you create a <code>MessageFormat</code> object with one
* of its constructors (not with a <code>getInstance</code> style factory
* method). The factory methods aren't necessary because <code>MessageFormat</code>
* {@code MessageFormat} differs from the other {@code Format}
* classes in that you create a {@code MessageFormat} object with one
* of its constructors (not with a {@code getInstance} style factory
* method). The factory methods aren't necessary because {@code MessageFormat}
* itself doesn't implement locale specific behavior. Any locale specific
* behavior is defined by the pattern that you provide as well as the
* subformats used for inserted arguments.
*
* <h2><a id="patterns">Patterns and Their Interpretation</a></h2>
*
* <code>MessageFormat</code> uses patterns of the following form:
* {@code MessageFormat} uses patterns of the following form:
* <blockquote><pre>
* <i>MessageFormatPattern:</i>
* <i>String</i>
@ -102,7 +102,7 @@ import java.util.Locale;
* must be represented by doubled single quotes {@code ''} throughout a
* <i>String</i>. For example, pattern string <code>"'{''}'"</code> is
* interpreted as a sequence of <code>'{</code> (start of quoting and a
* left curly brace), <code>''</code> (a single quote), and
* left curly brace), {@code ''} (a single quote), and
* <code>}'</code> (a right curly brace and end of quoting),
* <em>not</em> <code>'{'</code> and <code>'}'</code> (quoted left and
* right curly braces): representing string <code>"{'}"</code>,
@ -228,8 +228,8 @@ import java.util.Locale;
* static strings will, of course, be obtained from resource bundles.
* Other parameters will be dynamically determined at runtime.
* <p>
* The first example uses the static method <code>MessageFormat.format</code>,
* which internally creates a <code>MessageFormat</code> for one-time use:
* The first example uses the static method {@code MessageFormat.format},
* which internally creates a {@code MessageFormat} for one-time use:
* <blockquote><pre>
* int planet = 7;
* String event = "a disturbance in the Force";
@ -244,7 +244,7 @@ import java.util.Locale;
* </pre></blockquote>
*
* <p>
* The following example creates a <code>MessageFormat</code> instance that
* The following example creates a {@code MessageFormat} instance that
* can be used repeatedly:
* <blockquote><pre>
* int fileCount = 1273;
@ -256,7 +256,7 @@ import java.util.Locale;
*
* System.out.println(form.format(testArgs));
* </pre></blockquote>
* The output with different values for <code>fileCount</code>:
* The output with different values for {@code fileCount}:
* <blockquote><pre>
* The disk "MyDisk" contains 0 file(s).
* The disk "MyDisk" contains 1 file(s).
@ -264,7 +264,7 @@ import java.util.Locale;
* </pre></blockquote>
*
* <p>
* For more sophisticated patterns, you can use a <code>ChoiceFormat</code>
* For more sophisticated patterns, you can use a {@code ChoiceFormat}
* to produce correct forms for singular and plural:
* <blockquote><pre>
* MessageFormat form = new MessageFormat("The disk \"{1}\" contains {0}.");
@ -279,7 +279,7 @@ import java.util.Locale;
*
* System.out.println(form.format(testArgs));
* </pre></blockquote>
* The output with different values for <code>fileCount</code>:
* The output with different values for {@code fileCount}:
* <blockquote><pre>
* The disk "MyDisk" contains no files.
* The disk "MyDisk" contains one file.
@ -287,7 +287,7 @@ import java.util.Locale;
* </pre></blockquote>
*
* <p>
* You can create the <code>ChoiceFormat</code> programmatically, as in the
* You can create the {@code ChoiceFormat} programmatically, as in the
* above example, or by using a pattern. See {@link ChoiceFormat}
* for more information.
* <blockquote><pre>{@code
@ -297,9 +297,9 @@ import java.util.Locale;
*
* <p>
* <strong>Note:</strong> As we see above, the string produced
* by a <code>ChoiceFormat</code> in <code>MessageFormat</code> is treated as special;
* by a {@code ChoiceFormat} in {@code MessageFormat} is treated as special;
* occurrences of '{' are used to indicate subformats, and cause recursion.
* If you create both a <code>MessageFormat</code> and <code>ChoiceFormat</code>
* If you create both a {@code MessageFormat} and {@code ChoiceFormat}
* programmatically (instead of using the string patterns), then be careful not to
* produce a format that recurses on itself, which will cause an infinite loop.
* <p>
@ -398,8 +398,8 @@ public class MessageFormat extends Format {
* <li>to the {@link #applyPattern applyPattern}
* and {@link #toPattern toPattern} methods if format elements specify
* a format type and therefore have the subformats created in the
* <code>applyPattern</code> method, as well as
* <li>to the <code>format</code> and
* {@code applyPattern} method, as well as
* <li>to the {@code format} and
* {@link #formatToCharacterIterator formatToCharacterIterator} methods
* if format elements do not specify a format type and therefore have
* the subformats created in the formatting methods.
@ -596,14 +596,14 @@ public class MessageFormat extends Format {
/**
* Sets the formats to use for the values passed into
* <code>format</code> methods or returned from <code>parse</code>
* methods. The indices of elements in <code>newFormats</code>
* {@code format} methods or returned from {@code parse}
* methods. The indices of elements in {@code newFormats}
* correspond to the argument indices used in the previously set
* pattern string.
* The order of formats in <code>newFormats</code> thus corresponds to
* the order of elements in the <code>arguments</code> array passed
* to the <code>format</code> methods or the result array returned
* by the <code>parse</code> methods.
* The order of formats in {@code newFormats} thus corresponds to
* the order of elements in the {@code arguments} array passed
* to the {@code format} methods or the result array returned
* by the {@code parse} methods.
* <p>
* If an argument index is used for more than one format element
* in the pattern string, then the corresponding new format is used
@ -611,10 +611,10 @@ public class MessageFormat extends Format {
* for any format element in the pattern string, then the
* corresponding new format is ignored. If fewer formats are provided
* than needed, then only the formats for argument indices less
* than <code>newFormats.length</code> are replaced.
* than {@code newFormats.length} are replaced.
*
* @param newFormats the new formats to use
* @throws NullPointerException if <code>newFormats</code> is null
* @throws NullPointerException if {@code newFormats} is null
* @since 1.4
*/
public void setFormatsByArgumentIndex(Format[] newFormats) {
@ -629,24 +629,24 @@ public class MessageFormat extends Format {
/**
* Sets the formats to use for the format elements in the
* previously set pattern string.
* The order of formats in <code>newFormats</code> corresponds to
* The order of formats in {@code newFormats} corresponds to
* the order of format elements in the pattern string.
* <p>
* If more formats are provided than needed by the pattern string,
* the remaining ones are ignored. If fewer formats are provided
* than needed, then only the first <code>newFormats.length</code>
* than needed, then only the first {@code newFormats.length}
* formats are replaced.
* <p>
* Since the order of format elements in a pattern string often
* changes during localization, it is generally better to use the
* {@link #setFormatsByArgumentIndex setFormatsByArgumentIndex}
* method, which assumes an order of formats corresponding to the
* order of elements in the <code>arguments</code> array passed to
* the <code>format</code> methods or the result array returned by
* the <code>parse</code> methods.
* order of elements in the {@code arguments} array passed to
* the {@code format} methods or the result array returned by
* the {@code parse} methods.
*
* @param newFormats the new formats to use
* @throws NullPointerException if <code>newFormats</code> is null
* @throws NullPointerException if {@code newFormats} is null
*/
public void setFormats(Format[] newFormats) {
int runsToCopy = newFormats.length;
@ -663,9 +663,9 @@ public class MessageFormat extends Format {
* previously set pattern string that use the given argument
* index.
* The argument index is part of the format element definition and
* represents an index into the <code>arguments</code> array passed
* to the <code>format</code> methods or the result array returned
* by the <code>parse</code> methods.
* represents an index into the {@code arguments} array passed
* to the {@code format} methods or the result array returned
* by the {@code parse} methods.
* <p>
* If the argument index is used for more than one format element
* in the pattern string, then the new format is used for all such
@ -711,14 +711,14 @@ public class MessageFormat extends Format {
/**
* Gets the formats used for the values passed into
* <code>format</code> methods or returned from <code>parse</code>
* {@code format} methods or returned from {@code parse}
* methods. The indices of elements in the returned array
* correspond to the argument indices used in the previously set
* pattern string.
* The order of formats in the returned array thus corresponds to
* the order of elements in the <code>arguments</code> array passed
* to the <code>format</code> methods or the result array returned
* by the <code>parse</code> methods.
* the order of elements in the {@code arguments} array passed
* to the {@code format} methods or the result array returned
* by the {@code parse} methods.
* <p>
* If an argument index is used for more than one format element
* in the pattern string, then the format used for the last such
@ -753,9 +753,9 @@ public class MessageFormat extends Format {
* changes during localization, it's generally better to use the
* {@link #getFormatsByArgumentIndex getFormatsByArgumentIndex}
* method, which assumes an order of formats corresponding to the
* order of elements in the <code>arguments</code> array passed to
* the <code>format</code> methods or the result array returned by
* the <code>parse</code> methods.
* order of elements in the {@code arguments} array passed to
* the {@code format} methods or the result array returned by
* the {@code parse} methods.
*
* @return the formats used for the format elements in the pattern
*/
@ -766,16 +766,16 @@ public class MessageFormat extends Format {
}
/**
* Formats an array of objects and appends the <code>MessageFormat</code>'s
* Formats an array of objects and appends the {@code MessageFormat}'s
* pattern, with format elements replaced by the formatted objects, to the
* provided <code>StringBuffer</code>.
* provided {@code StringBuffer}.
* <p>
* The text substituted for the individual format elements is derived from
* the current subformat of the format element and the
* <code>arguments</code> element at the format element's argument index
* {@code arguments} element at the format element's argument index
* as indicated by the first matching line of the following table. An
* argument is <i>unavailable</i> if <code>arguments</code> is
* <code>null</code> or has fewer than argumentIndex+1 elements.
* argument is <i>unavailable</i> if {@code arguments} is
* {@code null} or has fewer than argumentIndex+1 elements.
*
* <table class="plain">
* <caption style="display:none">Examples of subformat,argument,and formatted text</caption>
@ -791,36 +791,36 @@ public class MessageFormat extends Format {
* <th scope="row" style="text-weight-normal"><i>unavailable</i>
* <td><code>"{" + argumentIndex + "}"</code>
* <tr>
* <th scope="row" style="text-weight-normal"><code>null</code>
* <td><code>"null"</code>
* <th scope="row" style="text-weight-normal">{@code null}
* <td>{@code "null"}
* <tr>
* <th scope="row" style="text-weight-normal"><code>instanceof ChoiceFormat</code>
* <th scope="row" style="text-weight-normal">{@code instanceof ChoiceFormat}
* <th scope="row" style="text-weight-normal"><i>any</i>
* <td><code>subformat.format(argument).indexOf('{') &gt;= 0 ?<br>
* (new MessageFormat(subformat.format(argument), getLocale())).format(argument) :
* subformat.format(argument)</code>
* <tr>
* <th scope="row" style="text-weight-normal"><code>!= null</code>
* <th scope="row" style="text-weight-normal">{@code != null}
* <th scope="row" style="text-weight-normal"><i>any</i>
* <td><code>subformat.format(argument)</code>
* <td>{@code subformat.format(argument)}
* <tr>
* <th scope="row" style="text-weight-normal" rowspan=4><code>null</code>
* <th scope="row" style="text-weight-normal"><code>instanceof Number</code>
* <td><code>NumberFormat.getInstance(getLocale()).format(argument)</code>
* <th scope="row" style="text-weight-normal" rowspan=4>{@code null}
* <th scope="row" style="text-weight-normal">{@code instanceof Number}
* <td>{@code NumberFormat.getInstance(getLocale()).format(argument)}
* <tr>
* <th scope="row" style="text-weight-normal"><code>instanceof Date</code>
* <td><code>DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)</code>
* <th scope="row" style="text-weight-normal">{@code instanceof Date}
* <td>{@code DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)}
* <tr>
* <th scope="row" style="text-weight-normal"><code>instanceof String</code>
* <td><code>argument</code>
* <th scope="row" style="text-weight-normal">{@code instanceof String}
* <td>{@code argument}
* <tr>
* <th scope="row" style="text-weight-normal"><i>any</i>
* <td><code>argument.toString()</code>
* <td>{@code argument.toString()}
* </tbody>
* </table>
* <p>
* If <code>pos</code> is non-null, and refers to
* <code>Field.ARGUMENT</code>, the location of the first formatted
* If {@code pos} is non-null, and refers to
* {@code Field.ARGUMENT}, the location of the first formatted
* string will be returned.
*
* @param arguments an array of objects to be formatted and substituted.
@ -830,7 +830,7 @@ public class MessageFormat extends Format {
* @return the string buffer passed in as {@code result}, with formatted
* text appended
* @throws IllegalArgumentException if an argument in the
* <code>arguments</code> array is not of the type
* {@code arguments} array is not of the type
* expected by the format element(s) that use it.
* @throws NullPointerException if {@code result} is {@code null}
*/
@ -851,7 +851,7 @@ public class MessageFormat extends Format {
* @param arguments object(s) to format
* @return the formatted string
* @throws IllegalArgumentException if the pattern is invalid,
* or if an argument in the <code>arguments</code> array
* or if an argument in the {@code arguments} array
* is not of the type expected by the format element(s)
* that use it.
* @throws NullPointerException if {@code pattern} is {@code null}
@ -863,9 +863,9 @@ public class MessageFormat extends Format {
// Overrides
/**
* Formats an array of objects and appends the <code>MessageFormat</code>'s
* Formats an array of objects and appends the {@code MessageFormat}'s
* pattern, with format elements replaced by the formatted objects, to the
* provided <code>StringBuffer</code>.
* provided {@code StringBuffer}.
* This is equivalent to
* <blockquote>
* <code>{@link #format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) format}((Object[]) arguments, result, pos)</code>
@ -876,7 +876,7 @@ public class MessageFormat extends Format {
* @param pos keeps track on the position of the first replaced argument
* in the output string.
* @throws IllegalArgumentException if an argument in the
* <code>arguments</code> array is not of the type
* {@code arguments} array is not of the type
* expected by the format element(s) that use it.
* @throws NullPointerException if {@code result} is {@code null}
*/
@ -888,36 +888,36 @@ public class MessageFormat extends Format {
/**
* Formats an array of objects and inserts them into the
* <code>MessageFormat</code>'s pattern, producing an
* <code>AttributedCharacterIterator</code>.
* You can use the returned <code>AttributedCharacterIterator</code>
* {@code MessageFormat}'s pattern, producing an
* {@code AttributedCharacterIterator}.
* You can use the returned {@code AttributedCharacterIterator}
* to build the resulting String, as well as to determine information
* about the resulting String.
* <p>
* The text of the returned <code>AttributedCharacterIterator</code> is
* The text of the returned {@code AttributedCharacterIterator} is
* the same that would be returned by
* <blockquote>
* <code>{@link #format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) format}(arguments, new StringBuffer(), null).toString()</code>
* </blockquote>
* <p>
* In addition, the <code>AttributedCharacterIterator</code> contains at
* In addition, the {@code AttributedCharacterIterator} contains at
* least attributes indicating where text was generated from an
* argument in the <code>arguments</code> array. The keys of these attributes are of
* type <code>MessageFormat.Field</code>, their values are
* <code>Integer</code> objects indicating the index in the <code>arguments</code>
* argument in the {@code arguments} array. The keys of these attributes are of
* type {@code MessageFormat.Field}, their values are
* {@code Integer} objects indicating the index in the {@code arguments}
* array of the argument from which the text was generated.
* <p>
* The attributes/value from the underlying <code>Format</code>
* instances that <code>MessageFormat</code> uses will also be
* placed in the resulting <code>AttributedCharacterIterator</code>.
* The attributes/value from the underlying {@code Format}
* instances that {@code MessageFormat} uses will also be
* placed in the resulting {@code AttributedCharacterIterator}.
* This allows you to not only find where an argument is placed in the
* resulting String, but also which fields it contains in turn.
*
* @param arguments an array of objects to be formatted and substituted.
* @return AttributedCharacterIterator describing the formatted value.
* @throws NullPointerException if <code>arguments</code> is null.
* @throws NullPointerException if {@code arguments} is null.
* @throws IllegalArgumentException if an argument in the
* <code>arguments</code> array is not of the type
* {@code arguments} array is not of the type
* expected by the format element(s) that use it.
* @since 1.4
*/
@ -1055,8 +1055,8 @@ public class MessageFormat extends Format {
* See the {@link #parse(String, ParsePosition)} method for more information
* on message parsing.
*
* @param source A <code>String</code> whose beginning should be parsed.
* @return An <code>Object</code> array parsed from the string.
* @param source A {@code String} whose beginning should be parsed.
* @return An {@code Object} array parsed from the string.
* @throws ParseException if the beginning of the specified string
* cannot be parsed.
*/
@ -1073,23 +1073,23 @@ public class MessageFormat extends Format {
* Parses text from a string to produce an object array.
* <p>
* The method attempts to parse text starting at the index given by
* <code>pos</code>.
* If parsing succeeds, then the index of <code>pos</code> is updated
* {@code pos}.
* If parsing succeeds, then the index of {@code pos} is updated
* to the index after the last character used (parsing does not necessarily
* use all characters up to the end of the string), and the parsed
* object array is returned. The updated <code>pos</code> can be used to
* object array is returned. The updated {@code pos} can be used to
* indicate the starting point for the next call to this method.
* If an error occurs, then the index of <code>pos</code> is not
* changed, the error index of <code>pos</code> is set to the index of
* If an error occurs, then the index of {@code pos} is not
* changed, the error index of {@code pos} is set to the index of
* the character where the error occurred, and null is returned.
* <p>
* See the {@link #parse(String, ParsePosition)} method for more information
* on message parsing.
*
* @param source A <code>String</code>, part of which should be parsed.
* @param pos A <code>ParsePosition</code> object with index and error
* @param source A {@code String}, part of which should be parsed.
* @param pos A {@code ParsePosition} object with index and error
* index information as described above.
* @return An <code>Object</code> array parsed from the string. In case of
* @return An {@code Object} array parsed from the string. In case of
* error, returns null.
* @throws NullPointerException if {@code pos} is null.
*/
@ -1146,8 +1146,8 @@ public class MessageFormat extends Format {
/**
* Defines constants that are used as attribute keys in the
* <code>AttributedCharacterIterator</code> returned
* from <code>MessageFormat.formatToCharacterIterator</code>.
* {@code AttributedCharacterIterator} returned
* from {@code MessageFormat.formatToCharacterIterator}.
*
* @since 1.4
*/
@ -1188,9 +1188,9 @@ public class MessageFormat extends Format {
/**
* Constant identifying a portion of a message that was generated
* from an argument passed into <code>formatToCharacterIterator</code>.
* The value associated with the key will be an <code>Integer</code>
* indicating the index in the <code>arguments</code> array of the
* from an argument passed into {@code formatToCharacterIterator}.
* The value associated with the key will be an {@code Integer}
* indicating the index in the {@code arguments} array of the
* argument from which the text was generated.
*/
public static final Field ARGUMENT =
@ -1237,9 +1237,9 @@ public class MessageFormat extends Format {
private int[] argumentNumbers = new int[INITIAL_FORMATS];
/**
* One less than the number of entries in <code>offsets</code>. Can also be thought of
* as the index of the highest-numbered element in <code>offsets</code> that is being used.
* All of these arrays should have the same number of elements being used as <code>offsets</code>
* One less than the number of entries in {@code offsets}. Can also be thought of
* as the index of the highest-numbered element in {@code offsets} that is being used.
* All of these arrays should have the same number of elements being used as {@code offsets}
* does, and so this variable suffices to tell us how many entries are in all of them.
* @serial
*/
@ -1254,7 +1254,7 @@ public class MessageFormat extends Format {
* the first replaced argument will be set in it.
*
* @throws IllegalArgumentException if an argument in the
* <code>arguments</code> array is not of the type
* {@code arguments} array is not of the type
* expected by the format element(s) that use it.
*/
private StringBuffer subformat(Object[] arguments, StringBuffer result,
@ -1367,7 +1367,7 @@ public class MessageFormat extends Format {
/**
* Convenience method to append all the characters in
* <code>iterator</code> to the StringBuffer <code>result</code>.
* {@code iterator} to the StringBuffer {@code result}.
*/
private void append(StringBuffer result, CharacterIterator iterator) {
if (iterator.first() != CharacterIterator.DONE) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -40,10 +40,10 @@ package java.text;
import sun.text.normalizer.NormalizerBase;
/**
* This class provides the method <code>normalize</code> which transforms Unicode
* This class provides the method {@code normalize} which transforms Unicode
* text into an equivalent composed or decomposed form, allowing for easier
* sorting and searching of text.
* The <code>normalize</code> method supports the standard normalization forms
* The {@code normalize} method supports the standard normalization forms
* described in
* <a href="http://www.unicode.org/unicode/reports/tr15/tr15-23.html">
* Unicode Standard Annex #15 &mdash; Unicode Normalization Forms</a>.
@ -88,12 +88,12 @@ import sun.text.normalizer.NormalizerBase;
* into the corresponding semantic characters. When sorting and searching, you
* will often want to use these mappings.
* <p>
* The <code>normalize</code> method helps solve these problems by transforming
* The {@code normalize} method helps solve these problems by transforming
* text into the canonical composed and decomposed forms as shown in the first
* example above. In addition, you can have it perform compatibility
* decompositions so that you can treat compatibility characters the same as
* their equivalents.
* Finally, the <code>normalize</code> method rearranges accents into the
* Finally, the {@code normalize} method rearranges accents into the
* proper canonical order, so that you do not have to worry about accent
* rearrangement on your own.
* <p>
@ -152,7 +152,7 @@ public final class Normalizer {
* {@link java.text.Normalizer.Form#NFKC},
* {@link java.text.Normalizer.Form#NFKD}
* @return The normalized String
* @throws NullPointerException If <code>src</code> or <code>form</code>
* @throws NullPointerException If {@code src} or {@code form}
* is null.
*/
public static String normalize(CharSequence src, Form form) {
@ -169,7 +169,7 @@ public final class Normalizer {
* {@link java.text.Normalizer.Form#NFKD}
* @return true if the sequence of char values is normalized;
* false otherwise.
* @throws NullPointerException If <code>src</code> or <code>form</code>
* @throws NullPointerException If {@code src} or {@code form}
* is null.
*/
public static boolean isNormalized(CharSequence src, Form form) {

View file

@ -56,13 +56,13 @@ import sun.util.locale.provider.LocaleProviderAdapter;
import sun.util.locale.provider.LocaleServiceProviderPool;
/**
* <code>NumberFormat</code> is the abstract base class for all number
* {@code NumberFormat} is the abstract base class for all number
* formats. This class provides the interface for formatting and parsing
* numbers. <code>NumberFormat</code> also provides methods for determining
* numbers. {@code NumberFormat} also provides methods for determining
* which locales have number formats, and what their names are.
*
* <p>
* <code>NumberFormat</code> helps you to format and parse numbers for any locale.
* {@code NumberFormat} helps you to format and parse numbers for any locale.
* Your code can be completely independent of the locale conventions for
* decimal points, thousands-separators, or even the particular decimal
* digits used, or whether the number format is even decimal.
@ -88,7 +88,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* }</pre>
* </blockquote>
* To format a number for a different Locale, specify it in the
* call to <code>getInstance</code>.
* call to {@code getInstance}.
* <blockquote>
* <pre>{@code
* NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH);
@ -107,25 +107,25 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* myNumber = nf.parse(myString);
* }</pre>
* </blockquote>
* Use <code>getInstance</code> or <code>getNumberInstance</code> to get the
* normal number format. Use <code>getIntegerInstance</code> to get an
* integer number format. Use <code>getCurrencyInstance</code> to get the
* Use {@code getInstance} or {@code getNumberInstance} to get the
* normal number format. Use {@code getIntegerInstance} to get an
* integer number format. Use {@code getCurrencyInstance} to get the
* currency number format. Use {@code getCompactNumberInstance} to get the
* compact number format to format a number in shorter form. For example,
* {@code 2000} can be formatted as {@code "2K"} in
* {@link java.util.Locale#US US locale}. Use <code>getPercentInstance</code>
* {@link java.util.Locale#US US locale}. Use {@code getPercentInstance}
* to get a format for displaying percentages. With this format, a fraction
* like 0.53 is displayed as 53%.
*
* <p>
* You can also control the display of numbers with such methods as
* <code>setMinimumFractionDigits</code>.
* {@code setMinimumFractionDigits}.
* If you want even more control over the format or parsing,
* or want to give your users more control,
* you can try casting the <code>NumberFormat</code> you get from the factory methods
* you can try casting the {@code NumberFormat} you get from the factory methods
* to a {@code DecimalFormat} or {@code CompactNumberFormat} depending on
* the factory method used. This will work for the vast majority of locales;
* just remember to put it in a <code>try</code> block in case you encounter
* just remember to put it in a {@code try} block in case you encounter
* an unusual one.
*
* <p>
@ -149,8 +149,8 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* point, use setParseIntegerOnly.
*
* <p>
* You can also use forms of the <code>parse</code> and <code>format</code>
* methods with <code>ParsePosition</code> and <code>FieldPosition</code> to
* You can also use forms of the {@code parse} and {@code format}
* methods with {@code ParsePosition} and {@code FieldPosition} to
* allow you to:
* <ul>
* <li> progressively parse through pieces of a string
@ -159,15 +159,15 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* For example, you can align numbers in two ways:
* <ol>
* <li> If you are using a monospaced font with spacing for alignment,
* you can pass the <code>FieldPosition</code> in your format call, with
* <code>field</code> = <code>INTEGER_FIELD</code>. On output,
* <code>getEndIndex</code> will be set to the offset between the
* you can pass the {@code FieldPosition} in your format call, with
* {@code field} = {@code INTEGER_FIELD}. On output,
* {@code getEndIndex} will be set to the offset between the
* last character of the integer and the decimal. Add
* (desiredSpaceCount - getEndIndex) spaces at the front of the string.
*
* <li> If you are using proportional fonts,
* instead of padding with spaces, measure the width
* of the string in pixels from the start to <code>getEndIndex</code>.
* of the string in pixels from the start to {@code getEndIndex}.
* Then move the pen by
* (desiredPixelWidth - widthToAlignmentPoint) before drawing the text.
* It also works where there is no decimal, but possibly additional
@ -238,17 +238,17 @@ public abstract class NumberFormat extends Format {
* <p>
* This implementation extracts the number's value using
* {@link java.lang.Number#longValue()} for all integral type values that
* can be converted to <code>long</code> without loss of information,
* including <code>BigInteger</code> values with a
* can be converted to {@code long} without loss of information,
* including {@code BigInteger} values with a
* {@link java.math.BigInteger#bitLength() bit length} of less than 64,
* and {@link java.lang.Number#doubleValue()} for all other types. It
* then calls
* {@link #format(long,java.lang.StringBuffer,java.text.FieldPosition)}
* or {@link #format(double,java.lang.StringBuffer,java.text.FieldPosition)}.
* This may result in loss of magnitude information and precision for
* <code>BigInteger</code> and <code>BigDecimal</code> values.
* {@code BigInteger} and {@code BigDecimal} values.
* @param number the number to format
* @param toAppendTo the <code>StringBuffer</code> to which the formatted
* @param toAppendTo the {@code StringBuffer} to which the formatted
* text is to be appended
* @param pos keeps track on the position of the field within the
* returned string. For example, for formatting a number
@ -258,11 +258,11 @@ public abstract class NumberFormat extends Format {
* and end index of {@code fieldPosition} will be set
* to 0 and 9, respectively for the output string
* {@code 1,234,567.89}.
* @return the value passed in as <code>toAppendTo</code>
* @throws IllegalArgumentException if <code>number</code> is
* null or not an instance of <code>Number</code>.
* @throws NullPointerException if <code>toAppendTo</code> or
* <code>pos</code> is null
* @return the value passed in as {@code toAppendTo}
* @throws IllegalArgumentException if {@code number} is
* null or not an instance of {@code Number}.
* @throws NullPointerException if {@code toAppendTo} or
* {@code pos} is null
* @throws ArithmeticException if rounding is needed with rounding
* mode being set to RoundingMode.UNNECESSARY
* @see java.text.FieldPosition
@ -285,26 +285,26 @@ public abstract class NumberFormat extends Format {
}
/**
* Parses text from a string to produce a <code>Number</code>.
* Parses text from a string to produce a {@code Number}.
* <p>
* The method attempts to parse text starting at the index given by
* <code>pos</code>.
* If parsing succeeds, then the index of <code>pos</code> is updated
* {@code pos}.
* If parsing succeeds, then the index of {@code pos} is updated
* to the index after the last character used (parsing does not necessarily
* use all characters up to the end of the string), and the parsed
* number is returned. The updated <code>pos</code> can be used to
* number is returned. The updated {@code pos} can be used to
* indicate the starting point for the next call to this method.
* If an error occurs, then the index of <code>pos</code> is not
* changed, the error index of <code>pos</code> is set to the index of
* If an error occurs, then the index of {@code pos} is not
* changed, the error index of {@code pos} is set to the index of
* the character where the error occurred, and null is returned.
* <p>
* See the {@link #parse(String, ParsePosition)} method for more information
* on number parsing.
*
* @param source A <code>String</code>, part of which should be parsed.
* @param pos A <code>ParsePosition</code> object with index and error
* @param source A {@code String}, part of which should be parsed.
* @param pos A {@code ParsePosition} object with index and error
* index information as described above.
* @return A <code>Number</code> parsed from the string. In case of
* @return A {@code Number} parsed from the string. In case of
* error, returns null.
* @throws NullPointerException if {@code source} or {@code pos} is null.
*/
@ -422,8 +422,8 @@ public abstract class NumberFormat extends Format {
* See the {@link #parse(String, ParsePosition)} method for more information
* on number parsing.
*
* @param source A <code>String</code> whose beginning should be parsed.
* @return A <code>Number</code> parsed from the string.
* @param source A {@code String} whose beginning should be parsed.
* @return A {@code Number} parsed from the string.
* @throws ParseException if the beginning of the specified string
* cannot be parsed.
*/
@ -677,16 +677,16 @@ public abstract class NumberFormat extends Format {
/**
* Returns an array of all locales for which the
* <code>get*Instance</code> methods of this class can return
* {@code get*Instance} methods of this class can return
* localized instances.
* The returned array represents the union of locales supported by the Java
* runtime and by installed
* {@link java.text.spi.NumberFormatProvider NumberFormatProvider} implementations.
* It must contain at least a <code>Locale</code> instance equal to
* It must contain at least a {@code Locale} instance equal to
* {@link java.util.Locale#US Locale.US}.
*
* @return An array of locales for which localized
* <code>NumberFormat</code> instances are available.
* {@code NumberFormat} instances are available.
*/
public static Locale[] getAvailableLocales() {
LocaleServiceProviderPool pool =
@ -888,9 +888,9 @@ public abstract class NumberFormat extends Format {
* {@link #setCurrency(java.util.Currency) setCurrency}.
* <p>
* The default implementation throws
* <code>UnsupportedOperationException</code>.
* {@code UnsupportedOperationException}.
*
* @return the currency used by this number format, or <code>null</code>
* @return the currency used by this number format, or {@code null}
* @throws UnsupportedOperationException if the number format class
* doesn't implement currency formatting
* @since 1.4
@ -905,12 +905,12 @@ public abstract class NumberFormat extends Format {
* number of fraction digits used by the number format.
* <p>
* The default implementation throws
* <code>UnsupportedOperationException</code>.
* {@code UnsupportedOperationException}.
*
* @param currency the new currency to be used by this number format
* @throws UnsupportedOperationException if the number format class
* doesn't implement currency formatting
* @throws NullPointerException if <code>currency</code> is null
* @throws NullPointerException if {@code currency} is null
* @since 1.4
*/
public void setCurrency(Currency currency) {
@ -926,7 +926,7 @@ public abstract class NumberFormat extends Format {
*
* @throws UnsupportedOperationException The default implementation
* always throws this exception
* @return The <code>RoundingMode</code> used for this NumberFormat.
* @return The {@code RoundingMode} used for this NumberFormat.
* @see #setRoundingMode(RoundingMode)
* @since 1.6
*/
@ -943,8 +943,8 @@ public abstract class NumberFormat extends Format {
*
* @throws UnsupportedOperationException The default implementation
* always throws this exception
* @throws NullPointerException if <code>roundingMode</code> is null
* @param roundingMode The <code>RoundingMode</code> to be used
* @throws NullPointerException if {@code roundingMode} is null
* @param roundingMode The {@code RoundingMode} to be used
* @see #getRoundingMode()
* @since 1.6
*/
@ -996,20 +996,20 @@ public abstract class NumberFormat extends Format {
/**
* First, read in the default serializable data.
*
* Then, if <code>serialVersionOnStream</code> is less than 1, indicating that
* Then, if {@code serialVersionOnStream} is less than 1, indicating that
* the stream was written by JDK 1.1,
* set the <code>int</code> fields such as <code>maximumIntegerDigits</code>
* to be equal to the <code>byte</code> fields such as <code>maxIntegerDigits</code>,
* since the <code>int</code> fields were not present in JDK 1.1.
* set the {@code int} fields such as {@code maximumIntegerDigits}
* to be equal to the {@code byte} fields such as {@code maxIntegerDigits},
* since the {@code int} fields were not present in JDK 1.1.
* Finally, set serialVersionOnStream back to the maximum allowed value so that
* default serialization will work properly if this object is streamed out again.
*
* <p>If <code>minimumIntegerDigits</code> is greater than
* <code>maximumIntegerDigits</code> or <code>minimumFractionDigits</code>
* is greater than <code>maximumFractionDigits</code>, then the stream data
* is invalid and this method throws an <code>InvalidObjectException</code>.
* <p>If {@code minimumIntegerDigits} is greater than
* {@code maximumIntegerDigits} or {@code minimumFractionDigits}
* is greater than {@code maximumFractionDigits}, then the stream data
* is invalid and this method throws an {@code InvalidObjectException}.
* In addition, if any of these values is negative, then this method throws
* an <code>InvalidObjectException</code>.
* an {@code InvalidObjectException}.
*
* @since 1.2
*/
@ -1035,9 +1035,9 @@ public abstract class NumberFormat extends Format {
/**
* Write out the default serializable data, after first setting
* the <code>byte</code> fields such as <code>maxIntegerDigits</code> to be
* equal to the <code>int</code> fields such as <code>maximumIntegerDigits</code>
* (or to <code>Byte.MAX_VALUE</code>, whichever is smaller), for compatibility
* the {@code byte} fields such as {@code maxIntegerDigits} to be
* equal to the {@code int} fields such as {@code maximumIntegerDigits}
* (or to {@code Byte.MAX_VALUE}, whichever is smaller), for compatibility
* with the JDK 1.1 version of the stream format.
*
* @since 1.2
@ -1076,16 +1076,16 @@ public abstract class NumberFormat extends Format {
/**
* The maximum number of digits allowed in the integer portion of a
* number. <code>maxIntegerDigits</code> must be greater than or equal to
* <code>minIntegerDigits</code>.
* number. {@code maxIntegerDigits} must be greater than or equal to
* {@code minIntegerDigits}.
* <p>
* <strong>Note:</strong> This field exists only for serialization
* compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new
* <code>int</code> field <code>maximumIntegerDigits</code> is used instead.
* When writing to a stream, <code>maxIntegerDigits</code> is set to
* <code>maximumIntegerDigits</code> or <code>Byte.MAX_VALUE</code>,
* {@code int} field {@code maximumIntegerDigits} is used instead.
* When writing to a stream, {@code maxIntegerDigits} is set to
* {@code maximumIntegerDigits} or {@code Byte.MAX_VALUE},
* whichever is smaller. When reading from a stream, this field is used
* only if <code>serialVersionOnStream</code> is less than 1.
* only if {@code serialVersionOnStream} is less than 1.
*
* @serial
* @see #getMaximumIntegerDigits
@ -1094,16 +1094,16 @@ public abstract class NumberFormat extends Format {
/**
* The minimum number of digits allowed in the integer portion of a
* number. <code>minimumIntegerDigits</code> must be less than or equal to
* <code>maximumIntegerDigits</code>.
* number. {@code minimumIntegerDigits} must be less than or equal to
* {@code maximumIntegerDigits}.
* <p>
* <strong>Note:</strong> This field exists only for serialization
* compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new
* <code>int</code> field <code>minimumIntegerDigits</code> is used instead.
* When writing to a stream, <code>minIntegerDigits</code> is set to
* <code>minimumIntegerDigits</code> or <code>Byte.MAX_VALUE</code>,
* {@code int} field {@code minimumIntegerDigits} is used instead.
* When writing to a stream, {@code minIntegerDigits} is set to
* {@code minimumIntegerDigits} or {@code Byte.MAX_VALUE},
* whichever is smaller. When reading from a stream, this field is used
* only if <code>serialVersionOnStream</code> is less than 1.
* only if {@code serialVersionOnStream} is less than 1.
*
* @serial
* @see #getMinimumIntegerDigits
@ -1112,16 +1112,16 @@ public abstract class NumberFormat extends Format {
/**
* The maximum number of digits allowed in the fractional portion of a
* number. <code>maximumFractionDigits</code> must be greater than or equal to
* <code>minimumFractionDigits</code>.
* number. {@code maximumFractionDigits} must be greater than or equal to
* {@code minimumFractionDigits}.
* <p>
* <strong>Note:</strong> This field exists only for serialization
* compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new
* <code>int</code> field <code>maximumFractionDigits</code> is used instead.
* When writing to a stream, <code>maxFractionDigits</code> is set to
* <code>maximumFractionDigits</code> or <code>Byte.MAX_VALUE</code>,
* {@code int} field {@code maximumFractionDigits} is used instead.
* When writing to a stream, {@code maxFractionDigits} is set to
* {@code maximumFractionDigits} or {@code Byte.MAX_VALUE},
* whichever is smaller. When reading from a stream, this field is used
* only if <code>serialVersionOnStream</code> is less than 1.
* only if {@code serialVersionOnStream} is less than 1.
*
* @serial
* @see #getMaximumFractionDigits
@ -1130,16 +1130,16 @@ public abstract class NumberFormat extends Format {
/**
* The minimum number of digits allowed in the fractional portion of a
* number. <code>minimumFractionDigits</code> must be less than or equal to
* <code>maximumFractionDigits</code>.
* number. {@code minimumFractionDigits} must be less than or equal to
* {@code maximumFractionDigits}.
* <p>
* <strong>Note:</strong> This field exists only for serialization
* compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new
* <code>int</code> field <code>minimumFractionDigits</code> is used instead.
* When writing to a stream, <code>minFractionDigits</code> is set to
* <code>minimumFractionDigits</code> or <code>Byte.MAX_VALUE</code>,
* {@code int} field {@code minimumFractionDigits} is used instead.
* When writing to a stream, {@code minFractionDigits} is set to
* {@code minimumFractionDigits} or {@code Byte.MAX_VALUE},
* whichever is smaller. When reading from a stream, this field is used
* only if <code>serialVersionOnStream</code> is less than 1.
* only if {@code serialVersionOnStream} is less than 1.
*
* @serial
* @see #getMinimumFractionDigits
@ -1158,8 +1158,8 @@ public abstract class NumberFormat extends Format {
/**
* The maximum number of digits allowed in the integer portion of a
* number. <code>maximumIntegerDigits</code> must be greater than or equal to
* <code>minimumIntegerDigits</code>.
* number. {@code maximumIntegerDigits} must be greater than or equal to
* {@code minimumIntegerDigits}.
*
* @serial
* @since 1.2
@ -1169,8 +1169,8 @@ public abstract class NumberFormat extends Format {
/**
* The minimum number of digits allowed in the integer portion of a
* number. <code>minimumIntegerDigits</code> must be less than or equal to
* <code>maximumIntegerDigits</code>.
* number. {@code minimumIntegerDigits} must be less than or equal to
* {@code maximumIntegerDigits}.
*
* @serial
* @since 1.2
@ -1180,8 +1180,8 @@ public abstract class NumberFormat extends Format {
/**
* The maximum number of digits allowed in the fractional portion of a
* number. <code>maximumFractionDigits</code> must be greater than or equal to
* <code>minimumFractionDigits</code>.
* number. {@code maximumFractionDigits} must be greater than or equal to
* {@code minimumFractionDigits}.
*
* @serial
* @since 1.2
@ -1191,8 +1191,8 @@ public abstract class NumberFormat extends Format {
/**
* The minimum number of digits allowed in the fractional portion of a
* number. <code>minimumFractionDigits</code> must be less than or equal to
* <code>maximumFractionDigits</code>.
* number. {@code minimumFractionDigits} must be less than or equal to
* {@code maximumFractionDigits}.
*
* @serial
* @since 1.2
@ -1203,21 +1203,21 @@ public abstract class NumberFormat extends Format {
static final int currentSerialVersion = 1;
/**
* Describes the version of <code>NumberFormat</code> present on the stream.
* Describes the version of {@code NumberFormat} present on the stream.
* Possible values are:
* <ul>
* <li><b>0</b> (or uninitialized): the JDK 1.1 version of the stream format.
* In this version, the <code>int</code> fields such as
* <code>maximumIntegerDigits</code> were not present, and the <code>byte</code>
* fields such as <code>maxIntegerDigits</code> are used instead.
* In this version, the {@code int} fields such as
* {@code maximumIntegerDigits} were not present, and the {@code byte}
* fields such as {@code maxIntegerDigits} are used instead.
*
* <li><b>1</b>: the 1.2 version of the stream format. The values of the
* <code>byte</code> fields such as <code>maxIntegerDigits</code> are ignored,
* and the <code>int</code> fields such as <code>maximumIntegerDigits</code>
* {@code byte} fields such as {@code maxIntegerDigits} are ignored,
* and the {@code int} fields such as {@code maximumIntegerDigits}
* are used instead.
* </ul>
* When streaming out a <code>NumberFormat</code>, the most recent format
* (corresponding to the highest allowable <code>serialVersionOnStream</code>)
* When streaming out a {@code NumberFormat}, the most recent format
* (corresponding to the highest allowable {@code serialVersionOnStream})
* is always written.
*
* @serial
@ -1236,9 +1236,9 @@ public abstract class NumberFormat extends Format {
//
/**
* Defines constants that are used as attribute keys in the
* <code>AttributedCharacterIterator</code> returned
* from <code>NumberFormat.formatToCharacterIterator</code> and as
* field identifiers in <code>FieldPosition</code>.
* {@code AttributedCharacterIterator} returned
* from {@code NumberFormat.formatToCharacterIterator} and as
* field identifiers in {@code FieldPosition}.
*
* @since 1.4
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -40,14 +40,14 @@ package java.text;
/**
* <code>ParsePosition</code> is a simple class used by <code>Format</code>
* {@code ParsePosition} is a simple class used by {@code Format}
* and its subclasses to keep track of the current position during parsing.
* The <code>parseObject</code> method in the various <code>Format</code>
* classes requires a <code>ParsePosition</code> object as an argument.
* The {@code parseObject} method in the various {@code Format}
* classes requires a {@code ParsePosition} object as an argument.
*
* <p>
* By design, as you parse through a string with different formats,
* you can use the same <code>ParsePosition</code>, since the index parameter
* you can use the same {@code ParsePosition}, since the index parameter
* records the current position.
*
* @author Mark Davis

Some files were not shown because too many files have changed in this diff Show more