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.
*/