Skip to content

Commit d15a57b

Browse files
author
Julia Boes
committed
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
1 parent 13d0bac commit d15a57b

File tree

139 files changed

+3502
-3502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+3502
-3502
lines changed

src/java.base/share/classes/java/io/BufferedInputStream.java

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@
2929
import jdk.internal.util.ArraysSupport;
3030

3131
/**
32-
* A <code>BufferedInputStream</code> adds
32+
* A {@code BufferedInputStream} adds
3333
* functionality to another input stream-namely,
3434
* the ability to buffer the input and to
35-
* support the <code>mark</code> and <code>reset</code>
36-
* methods. When the <code>BufferedInputStream</code>
35+
* support the {@code mark} and {@code reset}
36+
* methods. When the {@code BufferedInputStream}
3737
* is created, an internal buffer array is
3838
* created. As bytes from the stream are read
3939
* or skipped, the internal buffer is refilled
4040
* as necessary from the contained input stream,
41-
* many bytes at a time. The <code>mark</code>
41+
* many bytes at a time. The {@code mark}
4242
* operation remembers a point in the input
43-
* stream and the <code>reset</code> operation
43+
* stream and the {@code reset} operation
4444
* causes all the bytes read since the most
45-
* recent <code>mark</code> operation to be
45+
* recent {@code mark} operation to be
4646
* reread before new bytes are taken from
4747
* the contained input stream.
4848
*
@@ -81,23 +81,23 @@ class BufferedInputStream extends FilterInputStream {
8181
* The index one greater than the index of the last valid byte in
8282
* the buffer.
8383
* This value is always
84-
* in the range <code>0</code> through <code>buf.length</code>;
85-
* elements <code>buf[0]</code> through <code>buf[count-1]
86-
* </code>contain buffered input data obtained
84+
* in the range {@code 0} through {@code buf.length};
85+
* elements {@code buf[0]} through {@code buf[count-1]}
86+
* contain buffered input data obtained
8787
* from the underlying input stream.
8888
*/
8989
protected int count;
9090

9191
/**
9292
* The current position in the buffer. This is the index of the next
93-
* character to be read from the <code>buf</code> array.
93+
* character to be read from the {@code buf} array.
9494
* <p>
95-
* This value is always in the range <code>0</code>
96-
* through <code>count</code>. If it is less
97-
* than <code>count</code>, then <code>buf[pos]</code>
95+
* This value is always in the range {@code 0}
96+
* through {@code count}. If it is less
97+
* than {@code count}, then {@code buf[pos]}
9898
* is the next byte to be supplied as input;
99-
* if it is equal to <code>count</code>, then
100-
* the next <code>read</code> or <code>skip</code>
99+
* if it is equal to {@code count}, then
100+
* the next {@code read} or {@code skip}
101101
* operation will require more bytes to be
102102
* read from the contained input stream.
103103
*
@@ -106,28 +106,28 @@ class BufferedInputStream extends FilterInputStream {
106106
protected int pos;
107107

108108
/**
109-
* The value of the <code>pos</code> field at the time the last
110-
* <code>mark</code> method was called.
109+
* The value of the {@code pos} field at the time the last
110+
* {@code mark} method was called.
111111
* <p>
112112
* This value is always
113-
* in the range <code>-1</code> through <code>pos</code>.
113+
* in the range {@code -1} through {@code pos}.
114114
* If there is no marked position in the input
115-
* stream, this field is <code>-1</code>. If
115+
* stream, this field is {@code -1}. If
116116
* there is a marked position in the input
117-
* stream, then <code>buf[markpos]</code>
117+
* stream, then {@code buf[markpos]}
118118
* is the first byte to be supplied as input
119-
* after a <code>reset</code> operation. If
120-
* <code>markpos</code> is not <code>-1</code>,
121-
* then all bytes from positions <code>buf[markpos]</code>
122-
* through <code>buf[pos-1]</code> must remain
119+
* after a {@code reset} operation. If
120+
* {@code markpos} is not {@code -1},
121+
* then all bytes from positions {@code buf[markpos]}
122+
* through {@code buf[pos-1]} must remain
123123
* in the buffer array (though they may be
124124
* moved to another place in the buffer array,
125125
* with suitable adjustments to the values
126-
* of <code>count</code>, <code>pos</code>,
127-
* and <code>markpos</code>); they may not
126+
* of {@code count}, {@code pos},
127+
* and {@code markpos}); they may not
128128
* be discarded unless and until the difference
129-
* between <code>pos</code> and <code>markpos</code>
130-
* exceeds <code>marklimit</code>.
129+
* between {@code pos} and {@code markpos}
130+
* exceeds {@code marklimit}.
131131
*
132132
* @see java.io.BufferedInputStream#mark(int)
133133
* @see java.io.BufferedInputStream#pos
@@ -136,12 +136,12 @@ class BufferedInputStream extends FilterInputStream {
136136

137137
/**
138138
* The maximum read ahead allowed after a call to the
139-
* <code>mark</code> method before subsequent calls to the
140-
* <code>reset</code> method fail.
141-
* Whenever the difference between <code>pos</code>
142-
* and <code>markpos</code> exceeds <code>marklimit</code>,
139+
* {@code mark} method before subsequent calls to the
140+
* {@code reset} method fail.
141+
* Whenever the difference between {@code pos}
142+
* and {@code markpos} exceeds {@code marklimit},
143143
* then the mark may be dropped by setting
144-
* <code>markpos</code> to <code>-1</code>.
144+
* {@code markpos} to {@code -1}.
145145
*
146146
* @see java.io.BufferedInputStream#mark(int)
147147
* @see java.io.BufferedInputStream#reset()
@@ -171,10 +171,10 @@ private byte[] getBufIfOpen() throws IOException {
171171
}
172172

173173
/**
174-
* Creates a <code>BufferedInputStream</code>
174+
* Creates a {@code BufferedInputStream}
175175
* and saves its argument, the input stream
176-
* <code>in</code>, for later use. An internal
177-
* buffer array is created and stored in <code>buf</code>.
176+
* {@code in}, for later use. An internal
177+
* buffer array is created and stored in {@code buf}.
178178
*
179179
* @param in the underlying input stream.
180180
*/
@@ -183,12 +183,12 @@ public BufferedInputStream(InputStream in) {
183183
}
184184

185185
/**
186-
* Creates a <code>BufferedInputStream</code>
186+
* Creates a {@code BufferedInputStream}
187187
* with the specified buffer size,
188188
* and saves its argument, the input stream
189-
* <code>in</code>, for later use. An internal
190-
* buffer array of length <code>size</code>
191-
* is created and stored in <code>buf</code>.
189+
* {@code in}, for later use. An internal
190+
* buffer array of length {@code size}
191+
* is created and stored in {@code buf}.
192192
*
193193
* @param in the underlying input stream.
194194
* @param size the buffer size.
@@ -249,10 +249,10 @@ else if (pos >= buffer.length) { /* no room left in buffer */
249249

250250
/**
251251
* See
252-
* the general contract of the <code>read</code>
253-
* method of <code>InputStream</code>.
252+
* the general contract of the {@code read}
253+
* method of {@code InputStream}.
254254
*
255-
* @return the next byte of data, or <code>-1</code> if the end of the
255+
* @return the next byte of data, or {@code -1} if the end of the
256256
* stream is reached.
257257
* @throws IOException if this input stream has been closed by
258258
* invoking its {@link #close()} method,
@@ -300,21 +300,21 @@ private int read1(byte[] b, int off, int len) throws IOException {
300300
* <code>{@link InputStream#read(byte[], int, int) read}</code> method of
301301
* the <code>{@link InputStream}</code> class. As an additional
302302
* convenience, it attempts to read as many bytes as possible by repeatedly
303-
* invoking the <code>read</code> method of the underlying stream. This
304-
* iterated <code>read</code> continues until one of the following
303+
* invoking the {@code read} method of the underlying stream. This
304+
* iterated {@code read} continues until one of the following
305305
* conditions becomes true: <ul>
306306
*
307307
* <li> The specified number of bytes have been read,
308308
*
309-
* <li> The <code>read</code> method of the underlying stream returns
310-
* <code>-1</code>, indicating end-of-file, or
309+
* <li> The {@code read} method of the underlying stream returns
310+
* {@code -1}, indicating end-of-file, or
311311
*
312-
* <li> The <code>available</code> method of the underlying stream
312+
* <li> The {@code available} method of the underlying stream
313313
* returns zero, indicating that further input requests would block.
314314
*
315-
* </ul> If the first <code>read</code> on the underlying stream returns
316-
* <code>-1</code> to indicate end-of-file then this method returns
317-
* <code>-1</code>. Otherwise this method returns the number of bytes
315+
* </ul> If the first {@code read} on the underlying stream returns
316+
* {@code -1} to indicate end-of-file then this method returns
317+
* {@code -1}. Otherwise this method returns the number of bytes
318318
* actually read.
319319
*
320320
* <p> Subclasses of this class are encouraged, but not required, to
@@ -323,7 +323,7 @@ private int read1(byte[] b, int off, int len) throws IOException {
323323
* @param b destination buffer.
324324
* @param off offset at which to start storing bytes.
325325
* @param len maximum number of bytes to read.
326-
* @return the number of bytes read, or <code>-1</code> if the end of
326+
* @return the number of bytes read, or {@code -1} if the end of
327327
* the stream has been reached.
328328
* @throws IOException if this input stream has been closed by
329329
* invoking its {@link #close()} method,
@@ -355,8 +355,8 @@ public synchronized int read(byte b[], int off, int len)
355355
}
356356

357357
/**
358-
* See the general contract of the <code>skip</code>
359-
* method of <code>InputStream</code>.
358+
* See the general contract of the {@code skip}
359+
* method of {@code InputStream}.
360360
*
361361
* @throws IOException if this input stream has been closed by
362362
* invoking its {@link #close()} method,
@@ -413,8 +413,8 @@ public synchronized int available() throws IOException {
413413
}
414414

415415
/**
416-
* See the general contract of the <code>mark</code>
417-
* method of <code>InputStream</code>.
416+
* See the general contract of the {@code mark}
417+
* method of {@code InputStream}.
418418
*
419419
* @param readlimit the maximum limit of bytes that can be read before
420420
* the mark position becomes invalid.
@@ -426,14 +426,14 @@ public synchronized void mark(int readlimit) {
426426
}
427427

428428
/**
429-
* See the general contract of the <code>reset</code>
430-
* method of <code>InputStream</code>.
429+
* See the general contract of the {@code reset}
430+
* method of {@code InputStream}.
431431
* <p>
432-
* If <code>markpos</code> is <code>-1</code>
432+
* If {@code markpos} is {@code -1}
433433
* (no mark has been set or the mark has been
434-
* invalidated), an <code>IOException</code>
435-
* is thrown. Otherwise, <code>pos</code> is
436-
* set equal to <code>markpos</code>.
434+
* invalidated), an {@code IOException}
435+
* is thrown. Otherwise, {@code pos} is
436+
* set equal to {@code markpos}.
437437
*
438438
* @throws IOException if this stream has not been marked or,
439439
* if the mark has been invalidated, or the stream
@@ -449,13 +449,13 @@ public synchronized void reset() throws IOException {
449449
}
450450

451451
/**
452-
* Tests if this input stream supports the <code>mark</code>
453-
* and <code>reset</code> methods. The <code>markSupported</code>
454-
* method of <code>BufferedInputStream</code> returns
455-
* <code>true</code>.
452+
* Tests if this input stream supports the {@code mark}
453+
* and {@code reset} methods. The {@code markSupported}
454+
* method of {@code BufferedInputStream} returns
455+
* {@code true}.
456456
*
457-
* @return a <code>boolean</code> indicating if this stream type supports
458-
* the <code>mark</code> and <code>reset</code> methods.
457+
* @return a {@code boolean} indicating if this stream type supports
458+
* the {@code mark} and {@code reset} methods.
459459
* @see java.io.InputStream#mark(int)
460460
* @see java.io.InputStream#reset()
461461
*/

src/java.base/share/classes/java/io/BufferedOutputStream.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ public synchronized void write(int b) throws IOException {
9898
}
9999

100100
/**
101-
* Writes <code>len</code> bytes from the specified byte array
102-
* starting at offset <code>off</code> to this buffered output stream.
101+
* Writes {@code len} bytes from the specified byte array
102+
* starting at offset {@code off} to this buffered output stream.
103103
*
104104
* <p> Ordinarily this method stores bytes from the given array into this
105105
* stream's buffer, flushing the buffer to the underlying output stream as
106106
* needed. If the requested length is at least as large as this stream's
107107
* buffer, however, then this method will flush the buffer and write the
108108
* bytes directly to the underlying output stream. Thus redundant
109-
* <code>BufferedOutputStream</code>s will not copy data unnecessarily.
109+
* {@code BufferedOutputStream}s will not copy data unnecessarily.
110110
*
111111
* @param b the data.
112112
* @param off the start offset in the data.

src/java.base/share/classes/java/io/BufferedReader.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,22 @@ private int read1(char[] cbuf, int off, int len) throws IOException {
235235
* <code>{@link Reader#read(char[], int, int) read}</code> method of the
236236
* <code>{@link Reader}</code> class. As an additional convenience, it
237237
* attempts to read as many characters as possible by repeatedly invoking
238-
* the <code>read</code> method of the underlying stream. This iterated
239-
* <code>read</code> continues until one of the following conditions becomes
238+
* the {@code read} method of the underlying stream. This iterated
239+
* {@code read} continues until one of the following conditions becomes
240240
* true: <ul>
241241
*
242242
* <li> The specified number of characters have been read,
243243
*
244-
* <li> The <code>read</code> method of the underlying stream returns
245-
* <code>-1</code>, indicating end-of-file, or
244+
* <li> The {@code read} method of the underlying stream returns
245+
* {@code -1}, indicating end-of-file, or
246246
*
247-
* <li> The <code>ready</code> method of the underlying stream
248-
* returns <code>false</code>, indicating that further input requests
247+
* <li> The {@code ready} method of the underlying stream
248+
* returns {@code false}, indicating that further input requests
249249
* would block.
250250
*
251-
* </ul> If the first <code>read</code> on the underlying stream returns
252-
* <code>-1</code> to indicate end-of-file then this method returns
253-
* <code>-1</code>. Otherwise this method returns the number of characters
251+
* </ul> If the first {@code read} on the underlying stream returns
252+
* {@code -1} to indicate end-of-file then this method returns
253+
* {@code -1}. Otherwise this method returns the number of characters
254254
* actually read.
255255
*
256256
* <p> Subclasses of this class are encouraged, but not required, to
@@ -261,7 +261,7 @@ private int read1(char[] cbuf, int off, int len) throws IOException {
261261
* however, the buffer is empty, the mark is not valid, and the requested
262262
* length is at least as large as the buffer, then this method will read
263263
* characters directly from the underlying stream into the given array.
264-
* Thus redundant <code>BufferedReader</code>s will not copy data
264+
* Thus redundant {@code BufferedReader}s will not copy data
265265
* unnecessarily.
266266
*
267267
* @param cbuf Destination buffer
@@ -403,7 +403,7 @@ public String readLine() throws IOException {
403403
*
404404
* @return The number of characters actually skipped
405405
*
406-
* @throws IllegalArgumentException If <code>n</code> is negative.
406+
* @throws IllegalArgumentException If {@code n} is negative.
407407
* @throws IOException If an I/O error occurs
408408
*/
409409
public long skip(long n) throws IOException {

src/java.base/share/classes/java/io/CharArrayReader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ public int read(char b[], int off, int len) throws IOException {
148148
/**
149149
* Skips characters. Returns the number of characters that were skipped.
150150
*
151-
* <p>The <code>n</code> parameter may be negative, even though the
152-
* <code>skip</code> method of the {@link Reader} superclass throws
153-
* an exception in this case. If <code>n</code> is negative, then
154-
* this method does nothing and returns <code>0</code>.
151+
* <p>The {@code n} parameter may be negative, even though the
152+
* {@code skip} method of the {@link Reader} superclass throws
153+
* an exception in this case. If {@code n} is negative, then
154+
* this method does nothing and returns {@code 0}.
155155
*
156156
* @param n The number of characters to skip
157157
* @return The number of characters actually skipped

0 commit comments

Comments
 (0)