8133459: replace <tt> tags (obsolete in html5) in java.nio docs

Reviewed-by: lancea
This commit is contained in:
Alexander Stepanov 2015-08-13 12:40:07 +03:00
parent 48b997d5b3
commit 6b4c935035
53 changed files with 543 additions and 534 deletions

View file

@ -96,10 +96,10 @@ import jdk.internal.HotSpotIntrinsicCandidate;
* capacity values: * capacity values:
* *
* <blockquote> * <blockquote>
* <tt>0</tt> <tt>&lt;=</tt> * {@code 0} {@code <=}
* <i>mark</i> <tt>&lt;=</tt> * <i>mark</i> {@code <=}
* <i>position</i> <tt>&lt;=</tt> * <i>position</i> {@code <=}
* <i>limit</i> <tt>&lt;=</tt> * <i>limit</i> {@code <=}
* <i>capacity</i> * <i>capacity</i>
* </blockquote> * </blockquote>
* *
@ -229,7 +229,7 @@ public abstract class Buffer {
* The new buffer's capacity, in $type$s * The new buffer's capacity, in $type$s
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the <tt>capacity</tt> is a negative integer * If the {@code capacity} is a negative integer
*/ */
static IllegalArgumentException createCapacityException(int capacity) { static IllegalArgumentException createCapacityException(int capacity) {
assert capacity < 0 : "capacity expected to be negative"; assert capacity < 0 : "capacity expected to be negative";
@ -266,7 +266,7 @@ public abstract class Buffer {
* @return This buffer * @return This buffer
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the preconditions on <tt>newPosition</tt> do not hold * If the preconditions on {@code newPosition} do not hold
*/ */
public Buffer position(int newPosition) { public Buffer position(int newPosition) {
if (newPosition > limit | newPosition < 0) if (newPosition > limit | newPosition < 0)
@ -319,7 +319,7 @@ public abstract class Buffer {
* @return This buffer * @return This buffer
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the preconditions on <tt>newLimit</tt> do not hold * If the preconditions on {@code newLimit} do not hold
*/ */
public Buffer limit(int newLimit) { public Buffer limit(int newLimit) {
if (newLimit > capacity | newLimit < 0) if (newLimit > capacity | newLimit < 0)
@ -468,7 +468,7 @@ public abstract class Buffer {
* Tells whether there are any elements between the current position and * Tells whether there are any elements between the current position and
* the limit. * the limit.
* *
* @return <tt>true</tt> if, and only if, there is at least one element * @return {@code true} if, and only if, there is at least one element
* remaining in this buffer * remaining in this buffer
*/ */
public final boolean hasRemaining() { public final boolean hasRemaining() {
@ -478,7 +478,7 @@ public abstract class Buffer {
/** /**
* Tells whether or not this buffer is read-only. * Tells whether or not this buffer is read-only.
* *
* @return <tt>true</tt> if, and only if, this buffer is read-only * @return {@code true} if, and only if, this buffer is read-only
*/ */
public abstract boolean isReadOnly(); public abstract boolean isReadOnly();
@ -486,11 +486,11 @@ public abstract class Buffer {
* Tells whether or not this buffer is backed by an accessible * Tells whether or not this buffer is backed by an accessible
* array. * array.
* *
* <p> If this method returns <tt>true</tt> then the {@link #array() array} * <p> If this method returns {@code true} then the {@link #array() array}
* and {@link #arrayOffset() arrayOffset} methods may safely be invoked. * and {@link #arrayOffset() arrayOffset} methods may safely be invoked.
* </p> * </p>
* *
* @return <tt>true</tt> if, and only if, this buffer * @return {@code true} if, and only if, this buffer
* is backed by an array and is not read-only * is backed by an array and is not read-only
* *
* @since 1.6 * @since 1.6
@ -529,7 +529,7 @@ public abstract class Buffer {
* element of the buffer&nbsp;&nbsp;<i>(optional operation)</i>. * element of the buffer&nbsp;&nbsp;<i>(optional operation)</i>.
* *
* <p> If this buffer is backed by an array then buffer position <i>p</i> * <p> If this buffer is backed by an array then buffer position <i>p</i>
* corresponds to array index <i>p</i>&nbsp;+&nbsp;<tt>arrayOffset()</tt>. * corresponds to array index <i>p</i>&nbsp;+&nbsp;{@code arrayOffset()}.
* *
* <p> Invoke the {@link #hasArray hasArray} method before invoking this * <p> Invoke the {@link #hasArray hasArray} method before invoking this
* method in order to ensure that this buffer has an accessible backing * method in order to ensure that this buffer has an accessible backing
@ -552,7 +552,7 @@ public abstract class Buffer {
* Tells whether or not this buffer is * Tells whether or not this buffer is
* <a href="ByteBuffer.html#direct"><i>direct</i></a>. * <a href="ByteBuffer.html#direct"><i>direct</i></a>.
* *
* @return <tt>true</tt> if, and only if, this buffer is direct * @return {@code true} if, and only if, this buffer is direct
* *
* @since 1.6 * @since 1.6
*/ */

View file

@ -75,9 +75,9 @@ public final class ByteOrder {
/** /**
* Constructs a string describing this object. * Constructs a string describing this object.
* *
* <p> This method returns the string <tt>"BIG_ENDIAN"</tt> for {@link * <p> This method returns the string
* #BIG_ENDIAN} and <tt>"LITTLE_ENDIAN"</tt> for {@link #LITTLE_ENDIAN}. * {@code "BIG_ENDIAN"} for {@link #BIG_ENDIAN} and
* </p> * {@code "LITTLE_ENDIAN"} for {@link #LITTLE_ENDIAN}.
* *
* @return The specified string * @return The specified string
*/ */

View file

@ -116,10 +116,10 @@ public abstract class MappedByteBuffer
* Tells whether or not this buffer's content is resident in physical * Tells whether or not this buffer's content is resident in physical
* memory. * memory.
* *
* <p> A return value of <tt>true</tt> implies that it is highly likely * <p> A return value of {@code true} implies that it is highly likely
* that all of the data in this buffer is resident in physical memory and * that all of the data in this buffer is resident in physical memory and
* may therefore be accessed without incurring any virtual-memory page * may therefore be accessed without incurring any virtual-memory page
* faults or I/O operations. A return value of <tt>false</tt> does not * faults or I/O operations. A return value of {@code false} does not
* necessarily imply that the buffer's content is not resident in physical * necessarily imply that the buffer's content is not resident in physical
* memory. * memory.
* *
@ -127,7 +127,7 @@ public abstract class MappedByteBuffer
* underlying operating system may have paged out some of the buffer's data * underlying operating system may have paged out some of the buffer's data
* by the time that an invocation of this method returns. </p> * by the time that an invocation of this method returns. </p>
* *
* @return <tt>true</tt> if it is likely that this buffer's content * @return {@code true} if it is likely that this buffer's content
* is resident in physical memory * is resident in physical memory
*/ */
public final boolean isLoaded() { public final boolean isLoaded() {

View file

@ -78,7 +78,7 @@ class XXX {
* @return The $type$ value at the given index * @return The $type$ value at the given index
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>index</tt> is negative * If {@code index} is negative
* or not smaller than the buffer's limit, * or not smaller than the buffer's limit,
* minus $nbytesButOne$ * minus $nbytesButOne$
*/ */
@ -100,7 +100,7 @@ class XXX {
* @return This buffer * @return This buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>index</tt> is negative * If {@code index} is negative
* or not smaller than the buffer's limit, * or not smaller than the buffer's limit,
* minus $nbytesButOne$ * minus $nbytesButOne$
* *

View file

@ -133,7 +133,7 @@ import java.util.stream.$Streamtype$Stream;
* <h2> Access to binary data </h2> * <h2> Access to binary data </h2>
* *
* <p> This class defines methods for reading and writing values of all other * <p> This class defines methods for reading and writing values of all other
* primitive types, except <tt>boolean</tt>. Primitive values are translated * primitive types, except {@code boolean}. Primitive values are translated
* to (or from) sequences of bytes according to the buffer's current byte * to (or from) sequences of bytes according to the buffer's current byte
* order, which may be retrieved and modified via the {@link #order order} * order, which may be retrieved and modified via the {@link #order order}
* methods. Specific byte orders are represented by instances of the {@link * methods. Specific byte orders are represented by instances of the {@link
@ -151,8 +151,8 @@ import java.util.stream.$Streamtype$Stream;
* void {@link #putFloat(float) putFloat(float f)} * void {@link #putFloat(float) putFloat(float f)}
* void {@link #putFloat(int,float) putFloat(int index, float f)}</pre></blockquote> * void {@link #putFloat(int,float) putFloat(int index, float f)}</pre></blockquote>
* *
* <p> Corresponding methods are defined for the types <tt>char</tt>, * <p> Corresponding methods are defined for the types {@code char,
* <tt>short</tt>, <tt>int</tt>, <tt>long</tt>, and <tt>double</tt>. The index * short, int, long}, and {@code double}. The index
* parameters of the absolute <i>get</i> and <i>put</i> methods are in terms of * parameters of the absolute <i>get</i> and <i>put</i> methods are in terms of
* bytes rather than of the type being read or written. * bytes rather than of the type being read or written.
* *
@ -167,8 +167,7 @@ import java.util.stream.$Streamtype$Stream;
* #asFloatBuffer() asFloatBuffer} method, for example, creates an instance of * #asFloatBuffer() asFloatBuffer} method, for example, creates an instance of
* the {@link FloatBuffer} class that is backed by the byte buffer upon which * the {@link FloatBuffer} class that is backed by the byte buffer upon which
* the method is invoked. Corresponding view-creation methods are defined for * the method is invoked. Corresponding view-creation methods are defined for
* the types <tt>char</tt>, <tt>short</tt>, <tt>int</tt>, <tt>long</tt>, and * the types {@code char, short, int, long}, and {@code double}.
* <tt>double</tt>.
* *
* <p> View buffers have three important advantages over the families of * <p> View buffers have three important advantages over the families of
* type-specific <i>get</i> and <i>put</i> methods described above: * type-specific <i>get</i> and <i>put</i> methods described above:
@ -196,7 +195,7 @@ import java.util.stream.$Streamtype$Stream;
* *
* <p> Like a byte buffer, $a$ $type$ buffer is either <a * <p> Like a byte buffer, $a$ $type$ buffer is either <a
* href="ByteBuffer.html#direct"><i>direct</i> or <i>non-direct</i></a>. A * href="ByteBuffer.html#direct"><i>direct</i> or <i>non-direct</i></a>. A
* $type$ buffer created via the <tt>wrap</tt> methods of this class will * $type$ buffer created via the {@code wrap} methods of this class will
* be non-direct. $A$ $type$ buffer created as a view of a byte buffer will * be non-direct. $A$ $type$ buffer created as a view of a byte buffer will
* be direct if, and only if, the byte buffer itself is direct. Whether or not * be direct if, and only if, the byte buffer itself is direct. Whether or not
* $a$ $type$ buffer is direct may be determined by invoking the {@link * $a$ $type$ buffer is direct may be determined by invoking the {@link
@ -208,7 +207,7 @@ import java.util.stream.$Streamtype$Stream;
* *
* <p> This class implements the {@link CharSequence} interface so that * <p> This class implements the {@link CharSequence} interface so that
* character buffers may be used wherever character sequences are accepted, for * character buffers may be used wherever character sequences are accepted, for
* example in the regular-expression package <tt>{@link java.util.regex}</tt>. * example in the regular-expression package {@link java.util.regex}.
* </p> * </p>
* *
#end[char] #end[char]
@ -306,7 +305,7 @@ public abstract class $Type$Buffer
* @return The new $type$ buffer * @return The new $type$ buffer
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the <tt>capacity</tt> is a negative integer * If the {@code capacity} is a negative integer
*/ */
public static $Type$Buffer allocateDirect(int capacity) { public static $Type$Buffer allocateDirect(int capacity) {
return new Direct$Type$Buffer(capacity); return new Direct$Type$Buffer(capacity);
@ -335,7 +334,7 @@ public abstract class $Type$Buffer
* @return The new $type$ buffer * @return The new $type$ buffer
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the <tt>capacity</tt> is a negative integer * If the {@code capacity} is a negative integer
*/ */
public static $Type$Buffer allocate(int capacity) { public static $Type$Buffer allocate(int capacity) {
if (capacity < 0) if (capacity < 0)
@ -349,8 +348,8 @@ public abstract class $Type$Buffer
* <p> The new buffer will be backed by the given $type$ array; * <p> The new buffer will be backed by the given $type$ array;
* that is, modifications to the buffer will cause the array to be modified * that is, modifications to the buffer will cause the array to be modified
* and vice versa. The new buffer's capacity will be * and vice versa. The new buffer's capacity will be
* <tt>array.length</tt>, its position will be <tt>offset</tt>, its limit * {@code array.length}, its position will be {@code offset}, its limit
* will be <tt>offset + length</tt>, its mark will be undefined, and its * will be {@code offset + length}, its mark will be undefined, and its
* byte order will be * byte order will be
#if[byte] #if[byte]
* {@link ByteOrder#BIG_ENDIAN BIG_ENDIAN}. * {@link ByteOrder#BIG_ENDIAN BIG_ENDIAN}.
@ -366,19 +365,19 @@ public abstract class $Type$Buffer
* *
* @param offset * @param offset
* The offset of the subarray to be used; must be non-negative and * The offset of the subarray to be used; must be non-negative and
* no larger than <tt>array.length</tt>. The new buffer's position * no larger than {@code array.length}. The new buffer's position
* will be set to this value. * will be set to this value.
* *
* @param length * @param length
* The length of the subarray to be used; * The length of the subarray to be used;
* must be non-negative and no larger than * must be non-negative and no larger than
* <tt>array.length - offset</tt>. * {@code array.length - offset}.
* The new buffer's limit will be set to <tt>offset + length</tt>. * The new buffer's limit will be set to {@code offset + length}.
* *
* @return The new $type$ buffer * @return The new $type$ buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on the <tt>offset</tt> and <tt>length</tt> * If the preconditions on the {@code offset} and {@code length}
* parameters do not hold * parameters do not hold
*/ */
public static $Type$Buffer wrap($type$[] array, public static $Type$Buffer wrap($type$[] array,
@ -397,7 +396,7 @@ public abstract class $Type$Buffer
* <p> The new buffer will be backed by the given $type$ array; * <p> The new buffer will be backed by the given $type$ array;
* that is, modifications to the buffer will cause the array to be modified * that is, modifications to the buffer will cause the array to be modified
* and vice versa. The new buffer's capacity and limit will be * and vice versa. The new buffer's capacity and limit will be
* <tt>array.length</tt>, its position will be zero, its mark will be * {@code array.length}, its position will be zero, its mark will be
* undefined, and its byte order will be * undefined, and its byte order will be
#if[byte] #if[byte]
* {@link ByteOrder#BIG_ENDIAN BIG_ENDIAN}. * {@link ByteOrder#BIG_ENDIAN BIG_ENDIAN}.
@ -458,8 +457,8 @@ public abstract class $Type$Buffer
* *
* <p> The content of the new, read-only buffer will be the content of the * <p> The content of the new, read-only buffer will be the content of the
* given character sequence. The buffer's capacity will be * given character sequence. The buffer's capacity will be
* <tt>csq.length()</tt>, its position will be <tt>start</tt>, its limit * {@code csq.length()}, its position will be {@code start}, its limit
* will be <tt>end</tt>, and its mark will be undefined. </p> * will be {@code end}, and its mark will be undefined. </p>
* *
* @param csq * @param csq
* The character sequence from which the new character buffer is to * The character sequence from which the new character buffer is to
@ -467,19 +466,19 @@ public abstract class $Type$Buffer
* *
* @param start * @param start
* The index of the first character to be used; * The index of the first character to be used;
* must be non-negative and no larger than <tt>csq.length()</tt>. * must be non-negative and no larger than {@code csq.length()}.
* The new buffer's position will be set to this value. * The new buffer's position will be set to this value.
* *
* @param end * @param end
* The index of the character following the last character to be * The index of the character following the last character to be
* used; must be no smaller than <tt>start</tt> and no larger * used; must be no smaller than {@code start} and no larger
* than <tt>csq.length()</tt>. * than {@code csq.length()}.
* The new buffer's limit will be set to this value. * The new buffer's limit will be set to this value.
* *
* @return The new character buffer * @return The new character buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on the <tt>start</tt> and <tt>end</tt> * If the preconditions on the {@code start} and {@code end}
* parameters do not hold * parameters do not hold
*/ */
public static CharBuffer wrap(CharSequence csq, int start, int end) { public static CharBuffer wrap(CharSequence csq, int start, int end) {
@ -495,7 +494,7 @@ public abstract class $Type$Buffer
* *
* <p> The content of the new, read-only buffer will be the content of the * <p> The content of the new, read-only buffer will be the content of the
* given character sequence. The new buffer's capacity and limit will be * given character sequence. The new buffer's capacity and limit will be
* <tt>csq.length()</tt>, its position will be zero, and its mark will be * {@code csq.length()}, its position will be zero, and its mark will be
* undefined. </p> * undefined. </p>
* *
* @param csq * @param csq
@ -624,7 +623,7 @@ public abstract class $Type$Buffer
* @return The $type$ at the given index * @return The $type$ at the given index
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>index</tt> is negative * If {@code index} is negative
* or not smaller than the buffer's limit * or not smaller than the buffer's limit
*/ */
public abstract $type$ get(int index); public abstract $type$ get(int index);
@ -657,7 +656,7 @@ public abstract class $Type$Buffer
* @return This buffer * @return This buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>index</tt> is negative * If {@code index} is negative
* or not smaller than the buffer's limit * or not smaller than the buffer's limit
* *
* @throws ReadOnlyBufferException * @throws ReadOnlyBufferException
@ -674,17 +673,17 @@ public abstract class $Type$Buffer
* <p> This method transfers $type$s from this buffer into the given * <p> This method transfers $type$s from this buffer into the given
* destination array. If there are fewer $type$s remaining in the * destination array. If there are fewer $type$s remaining in the
* buffer than are required to satisfy the request, that is, if * buffer than are required to satisfy the request, that is, if
* <tt>length</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>, then no * {@code length}&nbsp;{@code >}&nbsp;{@code remaining()}, then no
* $type$s are transferred and a {@link BufferUnderflowException} is * $type$s are transferred and a {@link BufferUnderflowException} is
* thrown. * thrown.
* *
* <p> Otherwise, this method copies <tt>length</tt> $type$s from this * <p> Otherwise, this method copies {@code length} $type$s from this
* buffer into the given array, starting at the current position of this * buffer into the given array, starting at the current position of this
* buffer and at the given offset in the array. The position of this * buffer and at the given offset in the array. The position of this
* buffer is then incremented by <tt>length</tt>. * buffer is then incremented by {@code length}.
* *
* <p> In other words, an invocation of this method of the form * <p> In other words, an invocation of this method of the form
* <tt>src.get(dst,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as * <code>src.get(dst,&nbsp;off,&nbsp;len)</code> has exactly the same effect as
* the loop * the loop
* *
* <pre>{@code * <pre>{@code
@ -701,21 +700,21 @@ public abstract class $Type$Buffer
* @param offset * @param offset
* The offset within the array of the first $type$ to be * The offset within the array of the first $type$ to be
* written; must be non-negative and no larger than * written; must be non-negative and no larger than
* <tt>dst.length</tt> * {@code dst.length}
* *
* @param length * @param length
* The maximum number of $type$s to be written to the given * The maximum number of $type$s to be written to the given
* array; must be non-negative and no larger than * array; must be non-negative and no larger than
* <tt>dst.length - offset</tt> * {@code dst.length - offset}
* *
* @return This buffer * @return This buffer
* *
* @throws BufferUnderflowException * @throws BufferUnderflowException
* If there are fewer than <tt>length</tt> $type$s * If there are fewer than {@code length} $type$s
* remaining in this buffer * remaining in this buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on the <tt>offset</tt> and <tt>length</tt> * If the preconditions on the {@code offset} and {@code length}
* parameters do not hold * parameters do not hold
*/ */
public $Type$Buffer get($type$[] dst, int offset, int length) { public $Type$Buffer get($type$[] dst, int offset, int length) {
@ -733,7 +732,7 @@ public abstract class $Type$Buffer
* *
* <p> This method transfers $type$s from this buffer into the given * <p> This method transfers $type$s from this buffer into the given
* destination array. An invocation of this method of the form * destination array. An invocation of this method of the form
* <tt>src.get(a)</tt> behaves in exactly the same way as the invocation * {@code src.get(a)} behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
* src.get(a, 0, a.length) </pre> * src.get(a, 0, a.length) </pre>
@ -744,7 +743,7 @@ public abstract class $Type$Buffer
* @return This buffer * @return This buffer
* *
* @throws BufferUnderflowException * @throws BufferUnderflowException
* If there are fewer than <tt>length</tt> $type$s * If there are fewer than {@code length} $type$s
* remaining in this buffer * remaining in this buffer
*/ */
public $Type$Buffer get($type$[] dst) { public $Type$Buffer get($type$[] dst) {
@ -760,17 +759,17 @@ public abstract class $Type$Buffer
* <p> This method transfers the $type$s remaining in the given source * <p> This method transfers the $type$s remaining in the given source
* buffer into this buffer. If there are more $type$s remaining in the * buffer into this buffer. If there are more $type$s remaining in the
* source buffer than in this buffer, that is, if * source buffer than in this buffer, that is, if
* <tt>src.remaining()</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>, * {@code src.remaining()}&nbsp;{@code >}&nbsp;{@code remaining()},
* then no $type$s are transferred and a {@link * then no $type$s are transferred and a {@link
* BufferOverflowException} is thrown. * BufferOverflowException} is thrown.
* *
* <p> Otherwise, this method copies * <p> Otherwise, this method copies
* <i>n</i>&nbsp;=&nbsp;<tt>src.remaining()</tt> $type$s from the given * <i>n</i>&nbsp;=&nbsp;{@code src.remaining()} $type$s from the given
* buffer into this buffer, starting at each buffer's current position. * buffer into this buffer, starting at each buffer's current position.
* The positions of both buffers are then incremented by <i>n</i>. * The positions of both buffers are then incremented by <i>n</i>.
* *
* <p> In other words, an invocation of this method of the form * <p> In other words, an invocation of this method of the form
* <tt>dst.put(src)</tt> has exactly the same effect as the loop * {@code dst.put(src)} has exactly the same effect as the loop
* *
* <pre> * <pre>
* while (src.hasRemaining()) * while (src.hasRemaining())
@ -814,17 +813,17 @@ public abstract class $Type$Buffer
* <p> This method transfers $type$s into this buffer from the given * <p> This method transfers $type$s into this buffer from the given
* source array. If there are more $type$s to be copied from the array * source array. If there are more $type$s to be copied from the array
* than remain in this buffer, that is, if * than remain in this buffer, that is, if
* <tt>length</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>, then no * {@code length}&nbsp;{@code >}&nbsp;{@code remaining()}, then no
* $type$s are transferred and a {@link BufferOverflowException} is * $type$s are transferred and a {@link BufferOverflowException} is
* thrown. * thrown.
* *
* <p> Otherwise, this method copies <tt>length</tt> $type$s from the * <p> Otherwise, this method copies {@code length} $type$s from the
* given array into this buffer, starting at the given offset in the array * given array into this buffer, starting at the given offset in the array
* and at the current position of this buffer. The position of this buffer * and at the current position of this buffer. The position of this buffer
* is then incremented by <tt>length</tt>. * is then incremented by {@code length}.
* *
* <p> In other words, an invocation of this method of the form * <p> In other words, an invocation of this method of the form
* <tt>dst.put(src,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as * <code>dst.put(src,&nbsp;off,&nbsp;len)</code> has exactly the same effect as
* the loop * the loop
* *
* <pre>{@code * <pre>{@code
@ -840,12 +839,12 @@ public abstract class $Type$Buffer
* *
* @param offset * @param offset
* The offset within the array of the first $type$ to be read; * The offset within the array of the first $type$ to be read;
* must be non-negative and no larger than <tt>array.length</tt> * must be non-negative and no larger than {@code array.length}
* *
* @param length * @param length
* The number of $type$s to be read from the given array; * The number of $type$s to be read from the given array;
* must be non-negative and no larger than * must be non-negative and no larger than
* <tt>array.length - offset</tt> * {@code array.length - offset}
* *
* @return This buffer * @return This buffer
* *
@ -853,7 +852,7 @@ public abstract class $Type$Buffer
* If there is insufficient space in this buffer * If there is insufficient space in this buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on the <tt>offset</tt> and <tt>length</tt> * If the preconditions on the {@code offset} and {@code length}
* parameters do not hold * parameters do not hold
* *
* @throws ReadOnlyBufferException * @throws ReadOnlyBufferException
@ -874,7 +873,7 @@ public abstract class $Type$Buffer
* *
* <p> This method transfers the entire content of the given source * <p> This method transfers the entire content of the given source
* $type$ array into this buffer. An invocation of this method of the * $type$ array into this buffer. An invocation of this method of the
* form <tt>dst.put(a)</tt> behaves in exactly the same way as the * form {@code dst.put(a)} behaves in exactly the same way as the
* invocation * invocation
* *
* <pre> * <pre>
@ -903,18 +902,18 @@ public abstract class $Type$Buffer
* <p> This method transfers $type$s from the given string into this * <p> This method transfers $type$s from the given string into this
* buffer. If there are more $type$s to be copied from the string than * buffer. If there are more $type$s to be copied from the string than
* remain in this buffer, that is, if * remain in this buffer, that is, if
* <tt>end&nbsp;-&nbsp;start</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>, * <code>end&nbsp;-&nbsp;start</code>&nbsp;{@code >}&nbsp;{@code remaining()},
* then no $type$s are transferred and a {@link * then no $type$s are transferred and a {@link
* BufferOverflowException} is thrown. * BufferOverflowException} is thrown.
* *
* <p> Otherwise, this method copies * <p> Otherwise, this method copies
* <i>n</i>&nbsp;=&nbsp;<tt>end</tt>&nbsp;-&nbsp;<tt>start</tt> $type$s * <i>n</i>&nbsp;=&nbsp;{@code end}&nbsp;-&nbsp;{@code start} $type$s
* from the given string into this buffer, starting at the given * from the given string into this buffer, starting at the given
* <tt>start</tt> index and at the current position of this buffer. The * {@code start} index and at the current position of this buffer. The
* position of this buffer is then incremented by <i>n</i>. * position of this buffer is then incremented by <i>n</i>.
* *
* <p> In other words, an invocation of this method of the form * <p> In other words, an invocation of this method of the form
* <tt>dst.put(src,&nbsp;start,&nbsp;end)</tt> has exactly the same effect * <code>dst.put(src,&nbsp;start,&nbsp;end)</code> has exactly the same effect
* as the loop * as the loop
* *
* <pre>{@code * <pre>{@code
@ -931,12 +930,12 @@ public abstract class $Type$Buffer
* @param start * @param start
* The offset within the string of the first $type$ to be read; * The offset within the string of the first $type$ to be read;
* must be non-negative and no larger than * must be non-negative and no larger than
* <tt>string.length()</tt> * {@code string.length()}
* *
* @param end * @param end
* The offset within the string of the last $type$ to be read, * The offset within the string of the last $type$ to be read,
* plus one; must be non-negative and no larger than * plus one; must be non-negative and no larger than
* <tt>string.length()</tt> * {@code string.length()}
* *
* @return This buffer * @return This buffer
* *
@ -944,7 +943,7 @@ public abstract class $Type$Buffer
* If there is insufficient space in this buffer * If there is insufficient space in this buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on the <tt>start</tt> and <tt>end</tt> * If the preconditions on the {@code start} and {@code end}
* parameters do not hold * parameters do not hold
* *
* @throws ReadOnlyBufferException * @throws ReadOnlyBufferException
@ -966,7 +965,7 @@ public abstract class $Type$Buffer
* *
* <p> This method transfers the entire content of the given source string * <p> This method transfers the entire content of the given source string
* into this buffer. An invocation of this method of the form * into this buffer. An invocation of this method of the form
* <tt>dst.put(s)</tt> behaves in exactly the same way as the invocation * {@code dst.put(s)} behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
* dst.put(s, 0, s.length()) </pre> * dst.put(s, 0, s.length()) </pre>
@ -995,11 +994,11 @@ public abstract class $Type$Buffer
* Tells whether or not this buffer is backed by an accessible $type$ * Tells whether or not this buffer is backed by an accessible $type$
* array. * array.
* *
* <p> If this method returns <tt>true</tt> then the {@link #array() array} * <p> If this method returns {@code true} then the {@link #array() array}
* and {@link #arrayOffset() arrayOffset} methods may safely be invoked. * and {@link #arrayOffset() arrayOffset} methods may safely be invoked.
* </p> * </p>
* *
* @return <tt>true</tt> if, and only if, this buffer * @return {@code true} if, and only if, this buffer
* is backed by an array and is not read-only * is backed by an array and is not read-only
*/ */
public final boolean hasArray() { public final boolean hasArray() {
@ -1038,7 +1037,7 @@ public abstract class $Type$Buffer
* element of the buffer&nbsp;&nbsp;<i>(optional operation)</i>. * element of the buffer&nbsp;&nbsp;<i>(optional operation)</i>.
* *
* <p> If this buffer is backed by an array then buffer position <i>p</i> * <p> If this buffer is backed by an array then buffer position <i>p</i>
* corresponds to array index <i>p</i>&nbsp;+&nbsp;<tt>arrayOffset()</tt>. * corresponds to array index <i>p</i>&nbsp;+&nbsp;{@code arrayOffset()}.
* *
* <p> Invoke the {@link #hasArray hasArray} method before invoking this * <p> Invoke the {@link #hasArray hasArray} method before invoking this
* method in order to ensure that this buffer has an accessible backing * method in order to ensure that this buffer has an accessible backing
@ -1166,11 +1165,11 @@ public abstract class $Type$Buffer
* *
* <p> The $type$s between the buffer's current position and its limit, * <p> The $type$s between the buffer's current position and its limit,
* if any, are copied to the beginning of the buffer. That is, the * if any, are copied to the beginning of the buffer. That is, the
* $type$ at index <i>p</i>&nbsp;=&nbsp;<tt>position()</tt> is copied * $type$ at index <i>p</i>&nbsp;=&nbsp;{@code position()} is copied
* to index zero, the $type$ at index <i>p</i>&nbsp;+&nbsp;1 is copied * to index zero, the $type$ at index <i>p</i>&nbsp;+&nbsp;1 is copied
* to index one, and so forth until the $type$ at index * to index one, and so forth until the $type$ at index
* <tt>limit()</tt>&nbsp;-&nbsp;1 is copied to index * {@code limit()}&nbsp;-&nbsp;1 is copied to index
* <i>n</i>&nbsp;=&nbsp;<tt>limit()</tt>&nbsp;-&nbsp;<tt>1</tt>&nbsp;-&nbsp;<i>p</i>. * <i>n</i>&nbsp;=&nbsp;{@code limit()}&nbsp;-&nbsp;{@code 1}&nbsp;-&nbsp;<i>p</i>.
* The buffer's position is then set to <i>n+1</i> and its limit is set to * The buffer's position is then set to <i>n+1</i> and its limit is set to
* its capacity. The mark, if defined, is discarded. * its capacity. The mark, if defined, is discarded.
* *
@ -1183,7 +1182,7 @@ public abstract class $Type$Buffer
* *
* <p> Invoke this method after writing data from a buffer in case the * <p> Invoke this method after writing data from a buffer in case the
* write was incomplete. The following loop, for example, copies bytes * write was incomplete. The following loop, for example, copies bytes
* from one channel to another via the buffer <tt>buf</tt>: * from one channel to another via the buffer {@code buf}:
* *
* <blockquote><pre>{@code * <blockquote><pre>{@code
* buf.clear(); // Prepare buffer for use * buf.clear(); // Prepare buffer for use
@ -1206,7 +1205,7 @@ public abstract class $Type$Buffer
/** /**
* Tells whether or not this $type$ buffer is direct. * Tells whether or not this $type$ buffer is direct.
* *
* @return <tt>true</tt> if, and only if, this buffer is direct * @return {@code true} if, and only if, this buffer is direct
*/ */
public abstract boolean isDirect(); public abstract boolean isDirect();
@ -1239,8 +1238,8 @@ public abstract class $Type$Buffer
* Returns the current hash code of this buffer. * Returns the current hash code of this buffer.
* *
* <p> The hash code of a $type$ buffer depends only upon its remaining * <p> The hash code of a $type$ buffer depends only upon its remaining
* elements; that is, upon the elements from <tt>position()</tt> up to, and * elements; that is, upon the elements from {@code position()} up to, and
* including, the element at <tt>limit()</tt>&nbsp;-&nbsp;<tt>1</tt>. * including, the element at {@code limit()}&nbsp;-&nbsp;{@code 1}.
* *
* <p> Because buffer hash codes are content-dependent, it is inadvisable * <p> Because buffer hash codes are content-dependent, it is inadvisable
* to use buffers as keys in hash maps or similar data structures unless it * to use buffers as keys in hash maps or similar data structures unless it
@ -1289,7 +1288,7 @@ public abstract class $Type$Buffer
* *
* @param ob The object to which this buffer is to be compared * @param ob The object to which this buffer is to be compared
* *
* @return <tt>true</tt> if, and only if, this buffer is equal to the * @return {@code true} if, and only if, this buffer is equal to the
* given object * given object
*/ */
public boolean equals(Object ob) { public boolean equals(Object ob) {
@ -1368,7 +1367,7 @@ public abstract class $Type$Buffer
* *
* <p> The first character of the resulting string will be the character at * <p> The first character of the resulting string will be the character at
* this buffer's position, while the last character will be the character * this buffer's position, while the last character will be the character
* at index <tt>limit()</tt>&nbsp;-&nbsp;1. Invoking this method does not * at index {@code limit()}&nbsp;-&nbsp;1. Invoking this method does not
* change the buffer's position. </p> * change the buffer's position. </p>
* *
* @return The specified string * @return The specified string
@ -1388,7 +1387,7 @@ public abstract class $Type$Buffer
* <p> When viewed as a character sequence, the length of a character * <p> When viewed as a character sequence, the length of a character
* buffer is simply the number of characters between the position * buffer is simply the number of characters between the position
* (inclusive) and the limit (exclusive); that is, it is equivalent to * (inclusive) and the limit (exclusive); that is, it is equivalent to
* <tt>remaining()</tt>. </p> * {@code remaining()}. </p>
* *
* @return The length of this character buffer * @return The length of this character buffer
*/ */
@ -1402,13 +1401,13 @@ public abstract class $Type$Buffer
* *
* @param index * @param index
* The index of the character to be read, relative to the position; * The index of the character to be read, relative to the position;
* must be non-negative and smaller than <tt>remaining()</tt> * must be non-negative and smaller than {@code remaining()}
* *
* @return The character at index * @return The character at index
* <tt>position()&nbsp;+&nbsp;index</tt> * <code>position()&nbsp;+&nbsp;index</code>
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on <tt>index</tt> do not hold * If the preconditions on {@code index} do not hold
*/ */
public final char charAt(int index) { public final char charAt(int index) {
return get(position() + checkIndex(index, 1)); return get(position() + checkIndex(index, 1));
@ -1422,26 +1421,26 @@ public abstract class $Type$Buffer
* content of this buffer is mutable then modifications to one buffer will * content of this buffer is mutable then modifications to one buffer will
* cause the other to be modified. The new buffer's capacity will be that * cause the other to be modified. The new buffer's capacity will be that
* of this buffer, its position will be * of this buffer, its position will be
* <tt>position()</tt>&nbsp;+&nbsp;<tt>start</tt>, and its limit will be * {@code position()}&nbsp;+&nbsp;{@code start}, and its limit will be
* <tt>position()</tt>&nbsp;+&nbsp;<tt>end</tt>. The new buffer will be * {@code position()}&nbsp;+&nbsp;{@code end}. The new buffer will be
* direct if, and only if, this buffer is direct, and it will be read-only * direct if, and only if, this buffer is direct, and it will be read-only
* if, and only if, this buffer is read-only. </p> * if, and only if, this buffer is read-only. </p>
* *
* @param start * @param start
* The index, relative to the current position, of the first * The index, relative to the current position, of the first
* character in the subsequence; must be non-negative and no larger * character in the subsequence; must be non-negative and no larger
* than <tt>remaining()</tt> * than {@code remaining()}
* *
* @param end * @param end
* The index, relative to the current position, of the character * The index, relative to the current position, of the character
* following the last character in the subsequence; must be no * following the last character in the subsequence; must be no
* smaller than <tt>start</tt> and no larger than * smaller than {@code start} and no larger than
* <tt>remaining()</tt> * {@code remaining()}
* *
* @return The new character buffer * @return The new character buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on <tt>start</tt> and <tt>end</tt> * If the preconditions on {@code start} and {@code end}
* do not hold * do not hold
*/ */
public abstract CharBuffer subSequence(int start, int end); public abstract CharBuffer subSequence(int start, int end);
@ -1453,21 +1452,21 @@ public abstract class $Type$Buffer
* Appends the specified character sequence to this * Appends the specified character sequence to this
* buffer&nbsp;&nbsp;<i>(optional operation)</i>. * buffer&nbsp;&nbsp;<i>(optional operation)</i>.
* *
* <p> An invocation of this method of the form <tt>dst.append(csq)</tt> * <p> An invocation of this method of the form {@code dst.append(csq)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
* dst.put(csq.toString()) </pre> * dst.put(csq.toString()) </pre>
* *
* <p> Depending on the specification of <tt>toString</tt> for the * <p> Depending on the specification of {@code toString} for the
* character sequence <tt>csq</tt>, the entire sequence may not be * character sequence {@code csq}, the entire sequence may not be
* appended. For instance, invoking the {@link $Type$Buffer#toString() * appended. For instance, invoking the {@link $Type$Buffer#toString()
* toString} method of a character buffer will return a subsequence whose * toString} method of a character buffer will return a subsequence whose
* content depends upon the buffer's position and limit. * content depends upon the buffer's position and limit.
* *
* @param csq * @param csq
* The character sequence to append. If <tt>csq</tt> is * The character sequence to append. If {@code csq} is
* <tt>null</tt>, then the four characters <tt>"null"</tt> are * {@code null}, then the four characters {@code "null"} are
* appended to this character buffer. * appended to this character buffer.
* *
* @return This buffer * @return This buffer
@ -1491,8 +1490,8 @@ public abstract class $Type$Buffer
* Appends a subsequence of the specified character sequence to this * Appends a subsequence of the specified character sequence to this
* buffer&nbsp;&nbsp;<i>(optional operation)</i>. * buffer&nbsp;&nbsp;<i>(optional operation)</i>.
* *
* <p> An invocation of this method of the form <tt>dst.append(csq, start, * <p> An invocation of this method of the form {@code dst.append(csq, start,
* end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in exactly the * end)} when {@code csq} is not {@code null}, behaves in exactly the
* same way as the invocation * same way as the invocation
* *
* <pre> * <pre>
@ -1500,9 +1499,9 @@ public abstract class $Type$Buffer
* *
* @param csq * @param csq
* The character sequence from which a subsequence will be * The character sequence from which a subsequence will be
* appended. If <tt>csq</tt> is <tt>null</tt>, then characters * appended. If {@code csq} is {@code null}, then characters
* will be appended as if <tt>csq</tt> contained the four * will be appended as if {@code csq} contained the four
* characters <tt>"null"</tt>. * characters {@code "null"}.
* *
* @return This buffer * @return This buffer
* *
@ -1510,9 +1509,9 @@ public abstract class $Type$Buffer
* If there is insufficient space in this buffer * If there is insufficient space in this buffer
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> * If {@code start} or {@code end} are negative, {@code start}
* is greater than <tt>end</tt>, or <tt>end</tt> is greater than * is greater than {@code end}, or {@code end} is greater than
* <tt>csq.length()</tt> * {@code csq.length()}
* *
* @throws ReadOnlyBufferException * @throws ReadOnlyBufferException
* If this buffer is read-only * If this buffer is read-only
@ -1528,7 +1527,7 @@ public abstract class $Type$Buffer
* Appends the specified $type$ to this * Appends the specified $type$ to this
* buffer&nbsp;&nbsp;<i>(optional operation)</i>. * buffer&nbsp;&nbsp;<i>(optional operation)</i>.
* *
* <p> An invocation of this method of the form <tt>dst.append($x$)</tt> * <p> An invocation of this method of the form {@code dst.append($x$)}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
@ -1562,7 +1561,7 @@ public abstract class $Type$Buffer
* Retrieves this buffer's byte order. * Retrieves this buffer's byte order.
* *
* <p> The byte order of $a$ $type$ buffer created by allocation or by * <p> The byte order of $a$ $type$ buffer created by allocation or by
* wrapping an existing <tt>$type$</tt> array is the {@link * wrapping an existing {@code $type$} array is the {@link
* ByteOrder#nativeOrder native order} of the underlying * ByteOrder#nativeOrder native order} of the underlying
* hardware. The byte order of $a$ $type$ buffer created as a <a * hardware. The byte order of $a$ $type$ buffer created as a <a
* href="ByteBuffer.html#views">view</a> of a byte buffer is that of the * href="ByteBuffer.html#views">view</a> of a byte buffer is that of the

View file

@ -70,13 +70,13 @@ public interface AsynchronousByteChannel
* {@code 0} without initiating an I/O operation. * {@code 0} without initiating an I/O operation.
* *
* <p> Suppose that a byte sequence of length <i>n</i> is read, where * <p> Suppose that a byte sequence of length <i>n</i> is read, where
* <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>. * {@code 0}&nbsp;{@code <}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
* This byte sequence will be transferred into the buffer so that the first * This byte sequence will be transferred into the buffer so that the first
* byte in the sequence is at index <i>p</i> and the last byte is at index * byte in the sequence is at index <i>p</i> and the last byte is at index
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>, * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>&nbsp;{@code -}&nbsp;{@code 1},
* where <i>p</i> is the buffer's position at the moment the read is * where <i>p</i> is the buffer's position at the moment the read is
* performed. Upon completion the buffer's position will be equal to * performed. Upon completion the buffer's position will be equal to
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed. * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>; its limit will not have changed.
* *
* <p> Buffers are not safe for use by multiple concurrent threads so care * <p> Buffers are not safe for use by multiple concurrent threads so care
* should be taken to not access the buffer until the operation has * should be taken to not access the buffer until the operation has
@ -151,13 +151,13 @@ public interface AsynchronousByteChannel
* {@code 0} without initiating an I/O operation. * {@code 0} without initiating an I/O operation.
* *
* <p> Suppose that a byte sequence of length <i>n</i> is written, where * <p> Suppose that a byte sequence of length <i>n</i> is written, where
* <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>. * {@code 0}&nbsp;{@code <}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
* This byte sequence will be transferred from the buffer starting at index * This byte sequence will be transferred from the buffer starting at index
* <i>p</i>, where <i>p</i> is the buffer's position at the moment the * <i>p</i>, where <i>p</i> is the buffer's position at the moment the
* write is performed; the index of the last byte written will be * write is performed; the index of the last byte written will be
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>. * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>&nbsp;{@code -}&nbsp;{@code 1}.
* Upon completion the buffer's position will be equal to * Upon completion the buffer's position will be equal to
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed. * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>; its limit will not have changed.
* *
* <p> Buffers are not safe for use by multiple concurrent threads so care * <p> Buffers are not safe for use by multiple concurrent threads so care
* should be taken to not access the buffer until the operation has * should be taken to not access the buffer until the operation has

View file

@ -41,7 +41,7 @@ import java.io.IOException;
* by invoking the {@link #bind(SocketAddress,int) bind} method. Once bound, * by invoking the {@link #bind(SocketAddress,int) bind} method. Once bound,
* the {@link #accept(Object,CompletionHandler) accept} method * the {@link #accept(Object,CompletionHandler) accept} method
* is used to initiate the accepting of connections to the channel's socket. * is used to initiate the accepting of connections to the channel's socket.
* An attempt to invoke the <tt>accept</tt> method on an unbound channel will * An attempt to invoke the {@code accept} method on an unbound channel will
* cause a {@link NotYetBoundException} to be thrown. * cause a {@link NotYetBoundException} to be thrown.
* *
* <p> Channels of this type are safe for use by multiple concurrent threads * <p> Channels of this type are safe for use by multiple concurrent threads
@ -122,13 +122,13 @@ public abstract class AsynchronousServerSocketChannel
* java.nio.channels.spi.AsynchronousChannelProvider#openAsynchronousServerSocketChannel * java.nio.channels.spi.AsynchronousChannelProvider#openAsynchronousServerSocketChannel
* openAsynchronousServerSocketChannel} method on the {@link * openAsynchronousServerSocketChannel} method on the {@link
* java.nio.channels.spi.AsynchronousChannelProvider} object that created * java.nio.channels.spi.AsynchronousChannelProvider} object that created
* the given group. If the group parameter is <tt>null</tt> then the * the given group. If the group parameter is {@code null} then the
* resulting channel is created by the system-wide default provider, and * resulting channel is created by the system-wide default provider, and
* bound to the <em>default group</em>. * bound to the <em>default group</em>.
* *
* @param group * @param group
* The group to which the newly constructed channel should be bound, * The group to which the newly constructed channel should be bound,
* or <tt>null</tt> for the default group * or {@code null} for the default group
* *
* @return A new asynchronous server socket channel * @return A new asynchronous server socket channel
* *
@ -176,7 +176,7 @@ public abstract class AsynchronousServerSocketChannel
* </pre></blockquote> * </pre></blockquote>
* *
* @param local * @param local
* The local address to bind the socket, or <tt>null</tt> to bind * The local address to bind the socket, or {@code null} to bind
* to an automatically assigned socket address * to an automatically assigned socket address
* *
* @return This channel * @return This channel

View file

@ -452,11 +452,11 @@ public abstract class AsynchronousSocketChannel
* at the moment that the read is attempted. * at the moment that the read is attempted.
* *
* <p> Suppose that a byte sequence of length <i>n</i> is read, where * <p> Suppose that a byte sequence of length <i>n</i> is read, where
* <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>. * {@code 0}&nbsp;{@code <}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
* Up to the first <tt>dsts[offset].remaining()</tt> bytes of this sequence * Up to the first {@code dsts[offset].remaining()} bytes of this sequence
* are transferred into buffer <tt>dsts[offset]</tt>, up to the next * are transferred into buffer {@code dsts[offset]}, up to the next
* <tt>dsts[offset+1].remaining()</tt> bytes are transferred into buffer * {@code dsts[offset+1].remaining()} bytes are transferred into buffer
* <tt>dsts[offset+1]</tt>, and so forth, until the entire byte sequence * {@code dsts[offset+1]}, and so forth, until the entire byte sequence
* is transferred into the given buffers. As many bytes as possible are * is transferred into the given buffers. As many bytes as possible are
* transferred into each buffer, hence the final position of each updated * transferred into each buffer, hence the final position of each updated
* buffer, except the last updated buffer, is guaranteed to be equal to * buffer, except the last updated buffer, is guaranteed to be equal to
@ -606,11 +606,11 @@ public abstract class AsynchronousSocketChannel
* at the moment that the write is attempted. * at the moment that the write is attempted.
* *
* <p> Suppose that a byte sequence of length <i>n</i> is written, where * <p> Suppose that a byte sequence of length <i>n</i> is written, where
* <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>. * {@code 0}&nbsp;{@code <}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
* Up to the first <tt>srcs[offset].remaining()</tt> bytes of this sequence * Up to the first {@code srcs[offset].remaining()} bytes of this sequence
* are written from buffer <tt>srcs[offset]</tt>, up to the next * are written from buffer {@code srcs[offset]}, up to the next
* <tt>srcs[offset+1].remaining()</tt> bytes are written from buffer * {@code srcs[offset+1].remaining()} bytes are written from buffer
* <tt>srcs[offset+1]</tt>, and so forth, until the entire byte sequence is * {@code srcs[offset+1]}, and so forth, until the entire byte sequence is
* written. As many bytes as possible are written from each buffer, hence * written. As many bytes as possible are written from each buffer, hence
* the final position of each updated buffer, except the last updated * the final position of each updated buffer, except the last updated
* buffer, is guaranteed to be equal to that buffer's limit. The underlying * buffer, is guaranteed to be equal to that buffer's limit. The underlying

View file

@ -58,7 +58,7 @@ public interface Channel extends Closeable {
/** /**
* Tells whether or not this channel is open. * Tells whether or not this channel is open.
* *
* @return <tt>true</tt> if, and only if, this channel is open * @return {@code true} if, and only if, this channel is open
*/ */
public boolean isOpen(); public boolean isOpen();

View file

@ -187,8 +187,8 @@ public abstract class DatagramChannel
* operations. * operations.
* *
* <p> Datagram channels support reading and writing, so this method * <p> Datagram channels support reading and writing, so this method
* returns <tt>(</tt>{@link SelectionKey#OP_READ} <tt>|</tt>&nbsp;{@link * returns {@code (}{@link SelectionKey#OP_READ} {@code |}&nbsp;{@link
* SelectionKey#OP_WRITE}<tt>)</tt>. </p> * SelectionKey#OP_WRITE}{@code )}.
* *
* @return The valid-operation set * @return The valid-operation set
*/ */
@ -341,7 +341,7 @@ public abstract class DatagramChannel
* copied into the given byte buffer and its source address is returned. * copied into the given byte buffer and its source address is returned.
* If this channel is in non-blocking mode and a datagram is not * If this channel is in non-blocking mode and a datagram is not
* immediately available then this method immediately returns * immediately available then this method immediately returns
* <tt>null</tt>. * {@code null}.
* *
* <p> The datagram is transferred into the given byte buffer starting at * <p> The datagram is transferred into the given byte buffer starting at
* its current position, as if by a regular {@link * its current position, as if by a regular {@link
@ -371,7 +371,7 @@ public abstract class DatagramChannel
* The buffer into which the datagram is to be transferred * The buffer into which the datagram is to be transferred
* *
* @return The datagram's source address, * @return The datagram's source address,
* or <tt>null</tt> if this channel is in non-blocking mode * or {@code null} if this channel is in non-blocking mode
* and no datagram was immediately available * and no datagram was immediately available
* *
* @throws ClosedChannelException * @throws ClosedChannelException

View file

@ -63,7 +63,7 @@ import java.util.Collections;
* *
* <li><p> A region of a file may be {@link #map <i>mapped</i>} * <li><p> A region of a file may be {@link #map <i>mapped</i>}
* directly into memory; for large files this is often much more efficient * directly into memory; for large files this is often much more efficient
* than invoking the usual <tt>read</tt> or <tt>write</tt> methods. * than invoking the usual {@code read} or {@code write} methods.
* </p></li> * </p></li>
* *
* <li><p> Updates made to a file may be {@link #force <i>forced * <li><p> Updates made to a file may be {@link #force <i>forced
@ -107,10 +107,10 @@ import java.util.Collections;
* existing {@link java.io.FileInputStream#getChannel FileInputStream}, {@link * existing {@link java.io.FileInputStream#getChannel FileInputStream}, {@link
* java.io.FileOutputStream#getChannel FileOutputStream}, or {@link * java.io.FileOutputStream#getChannel FileOutputStream}, or {@link
* java.io.RandomAccessFile#getChannel RandomAccessFile} object by invoking * java.io.RandomAccessFile#getChannel RandomAccessFile} object by invoking
* that object's <tt>getChannel</tt> method, which returns a file channel that * that object's {@code getChannel} method, which returns a file channel that
* is connected to the same underlying file. Where the file channel is obtained * is connected to the same underlying file. Where the file channel is obtained
* from an existing stream or random access file then the state of the file * from an existing stream or random access file then the state of the file
* channel is intimately connected to that of the object whose <tt>getChannel</tt> * channel is intimately connected to that of the object whose {@code getChannel}
* method returned the channel. Changing the channel's position, whether * method returned the channel. Changing the channel's position, whether
* explicitly or by reading or writing bytes, will change the file position of * explicitly or by reading or writing bytes, will change the file position of
* the originating object, and vice versa. Changing the file's length via the * the originating object, and vice versa. Changing the file's length via the
@ -128,14 +128,14 @@ import java.util.Collections;
* writing. Finally, a channel obtained via the {@link * writing. Finally, a channel obtained via the {@link
* java.io.RandomAccessFile#getChannel getChannel} method of a {@link * java.io.RandomAccessFile#getChannel getChannel} method of a {@link
* java.io.RandomAccessFile} instance will be open for reading if the instance * java.io.RandomAccessFile} instance will be open for reading if the instance
* was created with mode <tt>"r"</tt> and will be open for reading and writing * was created with mode {@code "r"} and will be open for reading and writing
* if the instance was created with mode <tt>"rw"</tt>. * if the instance was created with mode {@code "rw"}.
* *
* <a name="append-mode"></a><p> A file channel that is open for writing may be in * <a name="append-mode"></a><p> A file channel that is open for writing may be in
* <i>append mode</i>, for example if it was obtained from a file-output stream * <i>append mode</i>, for example if it was obtained from a file-output stream
* that was created by invoking the {@link * that was created by invoking the {@link
* java.io.FileOutputStream#FileOutputStream(java.io.File,boolean) * java.io.FileOutputStream#FileOutputStream(java.io.File,boolean)
* FileOutputStream(File,boolean)} constructor and passing <tt>true</tt> for * FileOutputStream(File,boolean)} constructor and passing {@code true} for
* the second parameter. In this mode each invocation of a relative write * the second parameter. In this mode each invocation of a relative write
* operation first advances the position to the end of the file and then writes * operation first advances the position to the end of the file and then writes
* the requested data. Whether the advancement of the position and the writing * the requested data. Whether the advancement of the position and the writing
@ -516,10 +516,10 @@ public abstract class FileChannel
* <p> If the file does not reside on a local device then no such guarantee * <p> If the file does not reside on a local device then no such guarantee
* is made. * is made.
* *
* <p> The <tt>metaData</tt> parameter can be used to limit the number of * <p> The {@code metaData} parameter can be used to limit the number of
* I/O operations that this method is required to perform. Passing * I/O operations that this method is required to perform. Passing
* <tt>false</tt> for this parameter indicates that only updates to the * {@code false} for this parameter indicates that only updates to the
* file's content need be written to storage; passing <tt>true</tt> * file's content need be written to storage; passing {@code true}
* indicates that updates to both the file's content and metadata must be * indicates that updates to both the file's content and metadata must be
* written, which generally requires at least one more I/O operation. * written, which generally requires at least one more I/O operation.
* Whether this parameter actually has any effect is dependent upon the * Whether this parameter actually has any effect is dependent upon the
@ -540,7 +540,7 @@ public abstract class FileChannel
* force changes made to the buffer's content to be written. </p> * force changes made to the buffer's content to be written. </p>
* *
* @param metaData * @param metaData
* If <tt>true</tt> then this method is required to force changes * If {@code true} then this method is required to force changes
* to both the file's content and metadata to be written to * to both the file's content and metadata to be written to
* storage; otherwise, it need only force content changes to be * storage; otherwise, it need only force content changes to be
* written * written
@ -557,14 +557,14 @@ public abstract class FileChannel
* Transfers bytes from this channel's file to the given writable byte * Transfers bytes from this channel's file to the given writable byte
* channel. * channel.
* *
* <p> An attempt is made to read up to <tt>count</tt> bytes starting at * <p> An attempt is made to read up to {@code count} bytes starting at
* the given <tt>position</tt> in this channel's file and write them to the * the given {@code position} in this channel's file and write them to the
* target channel. An invocation of this method may or may not transfer * target channel. An invocation of this method may or may not transfer
* all of the requested bytes; whether or not it does so depends upon the * all of the requested bytes; whether or not it does so depends upon the
* natures and states of the channels. Fewer than the requested number of * natures and states of the channels. Fewer than the requested number of
* bytes are transferred if this channel's file contains fewer than * bytes are transferred if this channel's file contains fewer than
* <tt>count</tt> bytes starting at the given <tt>position</tt>, or if the * {@code count} bytes starting at the given {@code position}, or if the
* target channel is non-blocking and it has fewer than <tt>count</tt> * target channel is non-blocking and it has fewer than {@code count}
* bytes free in its output buffer. * bytes free in its output buffer.
* *
* <p> This method does not modify this channel's position. If the given * <p> This method does not modify this channel's position. If the given
@ -624,14 +624,14 @@ public abstract class FileChannel
* Transfers bytes into this channel's file from the given readable byte * Transfers bytes into this channel's file from the given readable byte
* channel. * channel.
* *
* <p> An attempt is made to read up to <tt>count</tt> bytes from the * <p> An attempt is made to read up to {@code count} bytes from the
* source channel and write them to this channel's file starting at the * source channel and write them to this channel's file starting at the
* given <tt>position</tt>. An invocation of this method may or may not * given {@code position}. An invocation of this method may or may not
* transfer all of the requested bytes; whether or not it does so depends * transfer all of the requested bytes; whether or not it does so depends
* upon the natures and states of the channels. Fewer than the requested * upon the natures and states of the channels. Fewer than the requested
* number of bytes will be transferred if the source channel has fewer than * number of bytes will be transferred if the source channel has fewer than
* <tt>count</tt> bytes remaining, or if the source channel is non-blocking * {@code count} bytes remaining, or if the source channel is non-blocking
* and has fewer than <tt>count</tt> bytes immediately available in its * and has fewer than {@code count} bytes immediately available in its
* input buffer. * input buffer.
* *
* <p> This method does not modify this channel's position. If the given * <p> This method does not modify this channel's position. If the given
@ -704,7 +704,7 @@ public abstract class FileChannel
* The file position at which the transfer is to begin; * The file position at which the transfer is to begin;
* must be non-negative * must be non-negative
* *
* @return The number of bytes read, possibly zero, or <tt>-1</tt> if the * @return The number of bytes read, possibly zero, or {@code -1} if the
* given position is greater than or equal to the file's current * given position is greater than or equal to the file's current
* size * size
* *
@ -855,7 +855,7 @@ public abstract class FileChannel
* *
* <p> The {@link MappedByteBuffer <i>mapped byte buffer</i>} * <p> The {@link MappedByteBuffer <i>mapped byte buffer</i>}
* returned by this method will have a position of zero and a limit and * returned by this method will have a position of zero and a limit and
* capacity of <tt>size</tt>; its mark will be undefined. The buffer and * capacity of {@code size}; its mark will be undefined. The buffer and
* the mapping that it represents will remain valid until the buffer itself * the mapping that it represents will remain valid until the buffer itself
* is garbage-collected. * is garbage-collected.
* *
@ -895,11 +895,11 @@ public abstract class FileChannel
* @return The mapped byte buffer * @return The mapped byte buffer
* *
* @throws NonReadableChannelException * @throws NonReadableChannelException
* If the <tt>mode</tt> is {@link MapMode#READ_ONLY READ_ONLY} but * If the {@code mode} is {@link MapMode#READ_ONLY READ_ONLY} but
* this channel was not opened for reading * this channel was not opened for reading
* *
* @throws NonWritableChannelException * @throws NonWritableChannelException
* If the <tt>mode</tt> is {@link MapMode#READ_WRITE READ_WRITE} or * If the {@code mode} is {@link MapMode#READ_WRITE READ_WRITE} or
* {@link MapMode#PRIVATE PRIVATE} but this channel was not opened * {@link MapMode#PRIVATE PRIVATE} but this channel was not opened
* for both reading and writing * for both reading and writing
* *
@ -936,7 +936,7 @@ public abstract class FileChannel
* will be thrown immediately; the thread's interrupt status will not be * will be thrown immediately; the thread's interrupt status will not be
* changed. * changed.
* *
* <p> The region specified by the <tt>position</tt> and <tt>size</tt> * <p> The region specified by the {@code position} and {@code size}
* parameters need not be contained within, or even overlap, the actual * parameters need not be contained within, or even overlap, the actual
* underlying file. Lock regions are fixed in size; if a locked region * underlying file. Lock regions are fixed in size; if a locked region
* initially contains the end of the file and the file grows beyond the * initially contains the end of the file and the file grows beyond the
@ -963,12 +963,12 @@ public abstract class FileChannel
* *
* @param size * @param size
* The size of the locked region; must be non-negative, and the sum * The size of the locked region; must be non-negative, and the sum
* <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative * {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
* *
* @param shared * @param shared
* <tt>true</tt> to request a shared lock, in which case this * {@code true} to request a shared lock, in which case this
* channel must be open for reading (and possibly writing); * channel must be open for reading (and possibly writing);
* <tt>false</tt> to request an exclusive lock, in which case this * {@code false} to request an exclusive lock, in which case this
* channel must be open for writing (and possibly reading) * channel must be open for writing (and possibly reading)
* *
* @return A lock object representing the newly-acquired lock * @return A lock object representing the newly-acquired lock
@ -994,11 +994,11 @@ public abstract class FileChannel
* region * region
* *
* @throws NonReadableChannelException * @throws NonReadableChannelException
* If <tt>shared</tt> is <tt>true</tt> this channel was not * If {@code shared} is {@code true} this channel was not
* opened for reading * opened for reading
* *
* @throws NonWritableChannelException * @throws NonWritableChannelException
* If <tt>shared</tt> is <tt>false</tt> but this channel was not * If {@code shared} is {@code false} but this channel was not
* opened for writing * opened for writing
* *
* @throws IOException * @throws IOException
@ -1014,7 +1014,7 @@ public abstract class FileChannel
/** /**
* Acquires an exclusive lock on this channel's file. * Acquires an exclusive lock on this channel's file.
* *
* <p> An invocation of this method of the form <tt>fc.lock()</tt> behaves * <p> An invocation of this method of the form {@code fc.lock()} behaves
* in exactly the same way as the invocation * in exactly the same way as the invocation
* *
* <pre> * <pre>
@ -1060,10 +1060,10 @@ public abstract class FileChannel
* immediately, either having acquired a lock on the requested region or * immediately, either having acquired a lock on the requested region or
* having failed to do so. If it fails to acquire a lock because an * having failed to do so. If it fails to acquire a lock because an
* overlapping lock is held by another program then it returns * overlapping lock is held by another program then it returns
* <tt>null</tt>. If it fails to acquire a lock for any other reason then * {@code null}. If it fails to acquire a lock for any other reason then
* an appropriate exception is thrown. * an appropriate exception is thrown.
* *
* <p> The region specified by the <tt>position</tt> and <tt>size</tt> * <p> The region specified by the {@code position} and {@code size}
* parameters need not be contained within, or even overlap, the actual * parameters need not be contained within, or even overlap, the actual
* underlying file. Lock regions are fixed in size; if a locked region * underlying file. Lock regions are fixed in size; if a locked region
* initially contains the end of the file and the file grows beyond the * initially contains the end of the file and the file grows beyond the
@ -1090,14 +1090,14 @@ public abstract class FileChannel
* *
* @param size * @param size
* The size of the locked region; must be non-negative, and the sum * The size of the locked region; must be non-negative, and the sum
* <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative * {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
* *
* @param shared * @param shared
* <tt>true</tt> to request a shared lock, * {@code true} to request a shared lock,
* <tt>false</tt> to request an exclusive lock * {@code false} to request an exclusive lock
* *
* @return A lock object representing the newly-acquired lock, * @return A lock object representing the newly-acquired lock,
* or <tt>null</tt> if the lock could not be acquired * or {@code null} if the lock could not be acquired
* because another program holds an overlapping lock * because another program holds an overlapping lock
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
@ -1125,14 +1125,14 @@ public abstract class FileChannel
/** /**
* Attempts to acquire an exclusive lock on this channel's file. * Attempts to acquire an exclusive lock on this channel's file.
* *
* <p> An invocation of this method of the form <tt>fc.tryLock()</tt> * <p> An invocation of this method of the form {@code fc.tryLock()}
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <pre> * <pre>
* fc.{@link #tryLock(long,long,boolean) tryLock}(0L, Long.MAX_VALUE, false) </pre> * fc.{@link #tryLock(long,long,boolean) tryLock}(0L, Long.MAX_VALUE, false) </pre>
* *
* @return A lock object representing the newly-acquired lock, * @return A lock object representing the newly-acquired lock,
* or <tt>null</tt> if the lock could not be acquired * or {@code null} if the lock could not be acquired
* because another program holds an overlapping lock * because another program holds an overlapping lock
* *
* @throws ClosedChannelException * @throws ClosedChannelException

View file

@ -136,11 +136,11 @@ public abstract class FileLock implements AutoCloseable {
* *
* @param size * @param size
* The size of the locked region; must be non-negative, and the sum * The size of the locked region; must be non-negative, and the sum
* <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative * {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
* *
* @param shared * @param shared
* <tt>true</tt> if this lock is shared, * {@code true} if this lock is shared,
* <tt>false</tt> if it is exclusive * {@code false} if it is exclusive
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the preconditions on the parameters do not hold * If the preconditions on the parameters do not hold
@ -173,11 +173,11 @@ public abstract class FileLock implements AutoCloseable {
* *
* @param size * @param size
* The size of the locked region; must be non-negative, and the sum * The size of the locked region; must be non-negative, and the sum
* <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative * {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
* *
* @param shared * @param shared
* <tt>true</tt> if this lock is shared, * {@code true} if this lock is shared,
* <tt>false</tt> if it is exclusive * {@code false} if it is exclusive
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the preconditions on the parameters do not hold * If the preconditions on the parameters do not hold
@ -254,8 +254,8 @@ public abstract class FileLock implements AutoCloseable {
/** /**
* Tells whether this lock is shared. * Tells whether this lock is shared.
* *
* @return <tt>true</tt> if lock is shared, * @return {@code true} if lock is shared,
* <tt>false</tt> if it is exclusive * {@code false} if it is exclusive
*/ */
public final boolean isShared() { public final boolean isShared() {
return shared; return shared;
@ -269,7 +269,7 @@ public abstract class FileLock implements AutoCloseable {
* @param size * @param size
* The size of the lock range * The size of the lock range
* *
* @return <tt>true</tt> if, and only if, this lock and the given lock * @return {@code true} if, and only if, this lock and the given lock
* range overlap by at least one byte * range overlap by at least one byte
*/ */
public final boolean overlaps(long position, long size) { public final boolean overlaps(long position, long size) {
@ -286,7 +286,7 @@ public abstract class FileLock implements AutoCloseable {
* <p> A lock object remains valid until it is released or the associated * <p> A lock object remains valid until it is released or the associated
* file channel is closed, whichever comes first. </p> * file channel is closed, whichever comes first. </p>
* *
* @return <tt>true</tt> if, and only if, this lock is valid * @return {@code true} if, and only if, this lock is valid
*/ */
public abstract boolean isValid(); public abstract boolean isValid();

View file

@ -66,11 +66,11 @@ public interface GatheringByteChannel
* at the moment that this method is invoked. * at the moment that this method is invoked.
* *
* <p> Suppose that a byte sequence of length <i>n</i> is written, where * <p> Suppose that a byte sequence of length <i>n</i> is written, where
* <tt>0</tt>&nbsp;<tt>&lt;=</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>. * {@code 0}&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
* Up to the first <tt>srcs[offset].remaining()</tt> bytes of this sequence * Up to the first {@code srcs[offset].remaining()} bytes of this sequence
* are written from buffer <tt>srcs[offset]</tt>, up to the next * are written from buffer {@code srcs[offset]}, up to the next
* <tt>srcs[offset+1].remaining()</tt> bytes are written from buffer * {@code srcs[offset+1].remaining()} bytes are written from buffer
* <tt>srcs[offset+1]</tt>, and so forth, until the entire byte sequence is * {@code srcs[offset+1]}, and so forth, until the entire byte sequence is
* written. As many bytes as possible are written from each buffer, hence * written. As many bytes as possible are written from each buffer, hence
* the final position of each updated buffer, except the last updated * the final position of each updated buffer, except the last updated
* buffer, is guaranteed to be equal to that buffer's limit. * buffer, is guaranteed to be equal to that buffer's limit.
@ -92,17 +92,17 @@ public interface GatheringByteChannel
* @param offset * @param offset
* The offset within the buffer array of the first buffer from * The offset within the buffer array of the first buffer from
* which bytes are to be retrieved; must be non-negative and no * which bytes are to be retrieved; must be non-negative and no
* larger than <tt>srcs.length</tt> * larger than {@code srcs.length}
* *
* @param length * @param length
* The maximum number of buffers to be accessed; must be * The maximum number of buffers to be accessed; must be
* non-negative and no larger than * non-negative and no larger than
* <tt>srcs.length</tt>&nbsp;-&nbsp;<tt>offset</tt> * {@code srcs.length}&nbsp;-&nbsp;{@code offset}
* *
* @return The number of bytes written, possibly zero * @return The number of bytes written, possibly zero
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on the <tt>offset</tt> and <tt>length</tt> * If the preconditions on the {@code offset} and {@code length}
* parameters do not hold * parameters do not hold
* *
* @throws NonWritableChannelException * @throws NonWritableChannelException
@ -131,7 +131,7 @@ public interface GatheringByteChannel
/** /**
* Writes a sequence of bytes to this channel from the given buffers. * Writes a sequence of bytes to this channel from the given buffers.
* *
* <p> An invocation of this method of the form <tt>c.write(srcs)</tt> * <p> An invocation of this method of the form {@code c.write(srcs)}
* behaves in exactly the same manner as the invocation * behaves in exactly the same manner as the invocation
* *
* <blockquote><pre> * <blockquote><pre>

View file

@ -54,7 +54,7 @@ import java.io.IOException;
* *
* <p> A channel supports asynchronous closing and interruption if, and only * <p> A channel supports asynchronous closing and interruption if, and only
* if, it implements this interface. This can be tested at runtime, if * if, it implements this interface. This can be tested at runtime, if
* necessary, via the <tt>instanceof</tt> operator. * necessary, via the {@code instanceof} operator.
* *
* *
* @author Mark Reinhold * @author Mark Reinhold

View file

@ -52,16 +52,16 @@ public interface ReadableByteChannel extends Channel {
* *
* <p> An attempt is made to read up to <i>r</i> bytes from the channel, * <p> An attempt is made to read up to <i>r</i> bytes from the channel,
* where <i>r</i> is the number of bytes remaining in the buffer, that is, * where <i>r</i> is the number of bytes remaining in the buffer, that is,
* <tt>dst.remaining()</tt>, at the moment this method is invoked. * {@code dst.remaining()}, at the moment this method is invoked.
* *
* <p> Suppose that a byte sequence of length <i>n</i> is read, where * <p> Suppose that a byte sequence of length <i>n</i> is read, where
* <tt>0</tt>&nbsp;<tt>&lt;=</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>. * {@code 0}&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
* This byte sequence will be transferred into the buffer so that the first * This byte sequence will be transferred into the buffer so that the first
* byte in the sequence is at index <i>p</i> and the last byte is at index * byte in the sequence is at index <i>p</i> and the last byte is at index
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>, * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>&nbsp;{@code -}&nbsp;{@code 1},
* where <i>p</i> is the buffer's position at the moment this method is * where <i>p</i> is the buffer's position at the moment this method is
* invoked. Upon return the buffer's position will be equal to * invoked. Upon return the buffer's position will be equal to
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed. * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>; its limit will not have changed.
* *
* <p> A read operation might not fill the buffer, and in fact it might not * <p> A read operation might not fill the buffer, and in fact it might not
* read any bytes at all. Whether or not it does so depends upon the * read any bytes at all. Whether or not it does so depends upon the
@ -81,7 +81,7 @@ public interface ReadableByteChannel extends Channel {
* @param dst * @param dst
* The buffer into which bytes are to be transferred * The buffer into which bytes are to be transferred
* *
* @return The number of bytes read, possibly zero, or <tt>-1</tt> if the * @return The number of bytes read, possibly zero, or {@code -1} if the
* channel has reached end-of-stream * channel has reached end-of-stream
* *
* @throws NonReadableChannelException * @throws NonReadableChannelException

View file

@ -66,11 +66,11 @@ public interface ScatteringByteChannel
* at the moment that this method is invoked. * at the moment that this method is invoked.
* *
* <p> Suppose that a byte sequence of length <i>n</i> is read, where * <p> Suppose that a byte sequence of length <i>n</i> is read, where
* <tt>0</tt>&nbsp;<tt>&lt;=</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>. * {@code 0}&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
* Up to the first <tt>dsts[offset].remaining()</tt> bytes of this sequence * Up to the first {@code dsts[offset].remaining()} bytes of this sequence
* are transferred into buffer <tt>dsts[offset]</tt>, up to the next * are transferred into buffer {@code dsts[offset]}, up to the next
* <tt>dsts[offset+1].remaining()</tt> bytes are transferred into buffer * {@code dsts[offset+1].remaining()} bytes are transferred into buffer
* <tt>dsts[offset+1]</tt>, and so forth, until the entire byte sequence * {@code dsts[offset+1]}, and so forth, until the entire byte sequence
* is transferred into the given buffers. As many bytes as possible are * is transferred into the given buffers. As many bytes as possible are
* transferred into each buffer, hence the final position of each updated * transferred into each buffer, hence the final position of each updated
* buffer, except the last updated buffer, is guaranteed to be equal to * buffer, except the last updated buffer, is guaranteed to be equal to
@ -87,18 +87,18 @@ public interface ScatteringByteChannel
* @param offset * @param offset
* The offset within the buffer array of the first buffer into * The offset within the buffer array of the first buffer into
* which bytes are to be transferred; must be non-negative and no * which bytes are to be transferred; must be non-negative and no
* larger than <tt>dsts.length</tt> * larger than {@code dsts.length}
* *
* @param length * @param length
* The maximum number of buffers to be accessed; must be * The maximum number of buffers to be accessed; must be
* non-negative and no larger than * non-negative and no larger than
* <tt>dsts.length</tt>&nbsp;-&nbsp;<tt>offset</tt> * {@code dsts.length}&nbsp;-&nbsp;{@code offset}
* *
* @return The number of bytes read, possibly zero, * @return The number of bytes read, possibly zero,
* or <tt>-1</tt> if the channel has reached end-of-stream * or {@code -1} if the channel has reached end-of-stream
* *
* @throws IndexOutOfBoundsException * @throws IndexOutOfBoundsException
* If the preconditions on the <tt>offset</tt> and <tt>length</tt> * If the preconditions on the {@code offset} and {@code length}
* parameters do not hold * parameters do not hold
* *
* @throws NonReadableChannelException * @throws NonReadableChannelException
@ -126,7 +126,7 @@ public interface ScatteringByteChannel
/** /**
* Reads a sequence of bytes from this channel into the given buffers. * Reads a sequence of bytes from this channel into the given buffers.
* *
* <p> An invocation of this method of the form <tt>c.read(dsts)</tt> * <p> An invocation of this method of the form {@code c.read(dsts)}
* behaves in exactly the same manner as the invocation * behaves in exactly the same manner as the invocation
* *
* <blockquote><pre> * <blockquote><pre>
@ -136,7 +136,7 @@ public interface ScatteringByteChannel
* The buffers into which bytes are to be transferred * The buffers into which bytes are to be transferred
* *
* @return The number of bytes read, possibly zero, * @return The number of bytes read, possibly zero,
* or <tt>-1</tt> if the channel has reached end-of-stream * or {@code -1} if the channel has reached end-of-stream
* *
* @throws NonReadableChannelException * @throws NonReadableChannelException
* If this channel was not opened for reading * If this channel was not opened for reading

View file

@ -132,7 +132,7 @@ public abstract class SelectableChannel
* of its keys have been cancelled. A channel may also remain registered * of its keys have been cancelled. A channel may also remain registered
* for some time after it is closed. </p> * for some time after it is closed. </p>
* *
* @return <tt>true</tt> if, and only if, this channel is registered * @return {@code true} if, and only if, this channel is registered
*/ */
public abstract boolean isRegistered(); public abstract boolean isRegistered();
// //
@ -146,7 +146,7 @@ public abstract class SelectableChannel
* The selector * The selector
* *
* @return The key returned when this channel was last registered with the * @return The key returned when this channel was last registered with the
* given selector, or <tt>null</tt> if this channel is not * given selector, or {@code null} if this channel is not
* currently registered with that selector * currently registered with that selector
*/ */
public abstract SelectionKey keyFor(Selector sel); public abstract SelectionKey keyFor(Selector sel);
@ -159,16 +159,16 @@ public abstract class SelectableChannel
* *
* <p> If this channel is currently registered with the given selector then * <p> If this channel is currently registered with the given selector then
* the selection key representing that registration is returned. The key's * the selection key representing that registration is returned. The key's
* interest set will have been changed to <tt>ops</tt>, as if by invoking * interest set will have been changed to {@code ops}, as if by invoking
* the {@link SelectionKey#interestOps(int) interestOps(int)} method. If * the {@link SelectionKey#interestOps(int) interestOps(int)} method. If
* the <tt>att</tt> argument is not <tt>null</tt> then the key's attachment * the {@code att} argument is not {@code null} then the key's attachment
* will have been set to that value. A {@link CancelledKeyException} will * will have been set to that value. A {@link CancelledKeyException} will
* be thrown if the key has already been cancelled. * be thrown if the key has already been cancelled.
* *
* <p> Otherwise this channel has not yet been registered with the given * <p> Otherwise this channel has not yet been registered with the given
* selector, so it is registered and the resulting new key is returned. * selector, so it is registered and the resulting new key is returned.
* The key's initial interest set will be <tt>ops</tt> and its attachment * The key's initial interest set will be {@code ops} and its attachment
* will be <tt>att</tt>. * will be {@code att}.
* *
* <p> This method may be invoked at any time. If this method is invoked * <p> This method may be invoked at any time. If this method is invoked
* while another invocation of this method or of the {@link * while another invocation of this method or of the {@link
@ -189,7 +189,7 @@ public abstract class SelectableChannel
* The interest set for the resulting key * The interest set for the resulting key
* *
* @param att * @param att
* The attachment for the resulting key; may be <tt>null</tt> * The attachment for the resulting key; may be {@code null}
* *
* @throws ClosedChannelException * @throws ClosedChannelException
* If this channel is closed * If this channel is closed
@ -209,7 +209,7 @@ public abstract class SelectableChannel
* but the corresponding key has already been cancelled * but the corresponding key has already been cancelled
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If a bit in the <tt>ops</tt> set does not correspond to an * If a bit in the {@code ops} set does not correspond to an
* operation that is supported by this channel, that is, if * operation that is supported by this channel, that is, if
* {@code set & ~validOps() != 0} * {@code set & ~validOps() != 0}
* *
@ -235,13 +235,13 @@ public abstract class SelectableChannel
* *
* <p> An invocation of this convenience method of the form * <p> An invocation of this convenience method of the form
* *
* <blockquote><tt>sc.register(sel, ops)</tt></blockquote> * <blockquote>{@code sc.register(sel, ops)}</blockquote>
* *
* behaves in exactly the same way as the invocation * behaves in exactly the same way as the invocation
* *
* <blockquote><tt>sc.{@link * <blockquote>{@code sc.}{@link
* #register(java.nio.channels.Selector,int,java.lang.Object) * #register(java.nio.channels.Selector,int,java.lang.Object)
* register}(sel, ops, null)</tt></blockquote> * register(sel, ops, null)}</blockquote>
* *
* @param sel * @param sel
* The selector with which this channel is to be registered * The selector with which this channel is to be registered
@ -267,7 +267,7 @@ public abstract class SelectableChannel
* but the corresponding key has already been cancelled * but the corresponding key has already been cancelled
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If a bit in <tt>ops</tt> does not correspond to an operation * If a bit in {@code ops} does not correspond to an operation
* that is supported by this channel, that is, if {@code set & * that is supported by this channel, that is, if {@code set &
* ~validOps() != 0} * ~validOps() != 0}
* *
@ -296,8 +296,8 @@ public abstract class SelectableChannel
* of the {@link #register(Selector, int) register} method is in progress * of the {@link #register(Selector, int) register} method is in progress
* then it will first block until the other operation is complete. </p> * then it will first block until the other operation is complete. </p>
* *
* @param block If <tt>true</tt> then this channel will be placed in * @param block If {@code true} then this channel will be placed in
* blocking mode; if <tt>false</tt> then it will be placed * blocking mode; if {@code false} then it will be placed
* non-blocking mode * non-blocking mode
* *
* @return This selectable channel * @return This selectable channel
@ -306,7 +306,7 @@ public abstract class SelectableChannel
* If this channel is closed * If this channel is closed
* *
* @throws IllegalBlockingModeException * @throws IllegalBlockingModeException
* If <tt>block</tt> is <tt>true</tt> and this channel is * If {@code block} is {@code true} and this channel is
* registered with one or more selectors * registered with one or more selectors
* *
* @throws IOException * @throws IOException
@ -327,7 +327,7 @@ public abstract class SelectableChannel
* <p> If this channel is closed then the value returned by this method is * <p> If this channel is closed then the value returned by this method is
* not specified. </p> * not specified. </p>
* *
* @return <tt>true</tt> if, and only if, this channel is in blocking mode * @return {@code true} if, and only if, this channel is in blocking mode
*/ */
public abstract boolean isBlocking(); public abstract boolean isBlocking();

View file

@ -139,7 +139,7 @@ public abstract class SelectionKey {
* <p> A key is valid upon creation and remains so until it is cancelled, * <p> A key is valid upon creation and remains so until it is cancelled,
* its channel is closed, or its selector is closed. </p> * its channel is closed, or its selector is closed. </p>
* *
* @return <tt>true</tt> if, and only if, this key is valid * @return {@code true} if, and only if, this key is valid
*/ */
public abstract boolean isValid(); public abstract boolean isValid();
@ -218,11 +218,11 @@ public abstract class SelectionKey {
* Operation-set bit for read operations. * Operation-set bit for read operations.
* *
* <p> Suppose that a selection key's interest set contains * <p> Suppose that a selection key's interest set contains
* <tt>OP_READ</tt> at the start of a <a * {@code OP_READ} at the start of a <a
* href="Selector.html#selop">selection operation</a>. If the selector * href="Selector.html#selop">selection operation</a>. If the selector
* detects that the corresponding channel is ready for reading, has reached * detects that the corresponding channel is ready for reading, has reached
* end-of-stream, has been remotely shut down for further reading, or has * end-of-stream, has been remotely shut down for further reading, or has
* an error pending, then it will add <tt>OP_READ</tt> to the key's * an error pending, then it will add {@code OP_READ} to the key's
* ready-operation set and add the key to its selected-key&nbsp;set. </p> * ready-operation set and add the key to its selected-key&nbsp;set. </p>
*/ */
public static final int OP_READ = 1 << 0; public static final int OP_READ = 1 << 0;
@ -231,11 +231,11 @@ public abstract class SelectionKey {
* Operation-set bit for write operations. * Operation-set bit for write operations.
* *
* <p> Suppose that a selection key's interest set contains * <p> Suppose that a selection key's interest set contains
* <tt>OP_WRITE</tt> at the start of a <a * {@code OP_WRITE} at the start of a <a
* href="Selector.html#selop">selection operation</a>. If the selector * href="Selector.html#selop">selection operation</a>. If the selector
* detects that the corresponding channel is ready for writing, has been * detects that the corresponding channel is ready for writing, has been
* remotely shut down for further writing, or has an error pending, then it * remotely shut down for further writing, or has an error pending, then it
* will add <tt>OP_WRITE</tt> to the key's ready set and add the key to its * will add {@code OP_WRITE} to the key's ready set and add the key to its
* selected-key&nbsp;set. </p> * selected-key&nbsp;set. </p>
*/ */
public static final int OP_WRITE = 1 << 2; public static final int OP_WRITE = 1 << 2;
@ -244,11 +244,11 @@ public abstract class SelectionKey {
* Operation-set bit for socket-connect operations. * Operation-set bit for socket-connect operations.
* *
* <p> Suppose that a selection key's interest set contains * <p> Suppose that a selection key's interest set contains
* <tt>OP_CONNECT</tt> at the start of a <a * {@code OP_CONNECT} at the start of a <a
* href="Selector.html#selop">selection operation</a>. If the selector * href="Selector.html#selop">selection operation</a>. If the selector
* detects that the corresponding socket channel is ready to complete its * detects that the corresponding socket channel is ready to complete its
* connection sequence, or has an error pending, then it will add * connection sequence, or has an error pending, then it will add
* <tt>OP_CONNECT</tt> to the key's ready set and add the key to its * {@code OP_CONNECT} to the key's ready set and add the key to its
* selected-key&nbsp;set. </p> * selected-key&nbsp;set. </p>
*/ */
public static final int OP_CONNECT = 1 << 3; public static final int OP_CONNECT = 1 << 3;
@ -257,11 +257,11 @@ public abstract class SelectionKey {
* Operation-set bit for socket-accept operations. * Operation-set bit for socket-accept operations.
* *
* <p> Suppose that a selection key's interest set contains * <p> Suppose that a selection key's interest set contains
* <tt>OP_ACCEPT</tt> at the start of a <a * {@code OP_ACCEPT} at the start of a <a
* href="Selector.html#selop">selection operation</a>. If the selector * href="Selector.html#selop">selection operation</a>. If the selector
* detects that the corresponding server-socket channel is ready to accept * detects that the corresponding server-socket channel is ready to accept
* another connection, or has an error pending, then it will add * another connection, or has an error pending, then it will add
* <tt>OP_ACCEPT</tt> to the key's ready set and add the key to its * {@code OP_ACCEPT} to the key's ready set and add the key to its
* selected-key&nbsp;set. </p> * selected-key&nbsp;set. </p>
*/ */
public static final int OP_ACCEPT = 1 << 4; public static final int OP_ACCEPT = 1 << 4;
@ -269,7 +269,7 @@ public abstract class SelectionKey {
/** /**
* Tests whether this key's channel is ready for reading. * Tests whether this key's channel is ready for reading.
* *
* <p> An invocation of this method of the form <tt>k.isReadable()</tt> * <p> An invocation of this method of the form {@code k.isReadable()}
* behaves in exactly the same way as the expression * behaves in exactly the same way as the expression
* *
* <blockquote><pre>{@code * <blockquote><pre>{@code
@ -277,9 +277,9 @@ public abstract class SelectionKey {
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p> If this key's channel does not support read operations then this * <p> If this key's channel does not support read operations then this
* method always returns <tt>false</tt>. </p> * method always returns {@code false}. </p>
* *
* @return <tt>true</tt> if, and only if, * @return {@code true} if, and only if,
{@code readyOps() & OP_READ} is nonzero {@code readyOps() & OP_READ} is nonzero
* *
* @throws CancelledKeyException * @throws CancelledKeyException
@ -292,7 +292,7 @@ public abstract class SelectionKey {
/** /**
* Tests whether this key's channel is ready for writing. * Tests whether this key's channel is ready for writing.
* *
* <p> An invocation of this method of the form <tt>k.isWritable()</tt> * <p> An invocation of this method of the form {@code k.isWritable()}
* behaves in exactly the same way as the expression * behaves in exactly the same way as the expression
* *
* <blockquote><pre>{@code * <blockquote><pre>{@code
@ -300,9 +300,9 @@ public abstract class SelectionKey {
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p> If this key's channel does not support write operations then this * <p> If this key's channel does not support write operations then this
* method always returns <tt>false</tt>. </p> * method always returns {@code false}. </p>
* *
* @return <tt>true</tt> if, and only if, * @return {@code true} if, and only if,
* {@code readyOps() & OP_WRITE} is nonzero * {@code readyOps() & OP_WRITE} is nonzero
* *
* @throws CancelledKeyException * @throws CancelledKeyException
@ -316,7 +316,7 @@ public abstract class SelectionKey {
* Tests whether this key's channel has either finished, or failed to * Tests whether this key's channel has either finished, or failed to
* finish, its socket-connection operation. * finish, its socket-connection operation.
* *
* <p> An invocation of this method of the form <tt>k.isConnectable()</tt> * <p> An invocation of this method of the form {@code k.isConnectable()}
* behaves in exactly the same way as the expression * behaves in exactly the same way as the expression
* *
* <blockquote><pre>{@code * <blockquote><pre>{@code
@ -324,9 +324,9 @@ public abstract class SelectionKey {
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p> If this key's channel does not support socket-connect operations * <p> If this key's channel does not support socket-connect operations
* then this method always returns <tt>false</tt>. </p> * then this method always returns {@code false}. </p>
* *
* @return <tt>true</tt> if, and only if, * @return {@code true} if, and only if,
* {@code readyOps() & OP_CONNECT} is nonzero * {@code readyOps() & OP_CONNECT} is nonzero
* *
* @throws CancelledKeyException * @throws CancelledKeyException
@ -340,7 +340,7 @@ public abstract class SelectionKey {
* Tests whether this key's channel is ready to accept a new socket * Tests whether this key's channel is ready to accept a new socket
* connection. * connection.
* *
* <p> An invocation of this method of the form <tt>k.isAcceptable()</tt> * <p> An invocation of this method of the form {@code k.isAcceptable()}
* behaves in exactly the same way as the expression * behaves in exactly the same way as the expression
* *
* <blockquote><pre>{@code * <blockquote><pre>{@code
@ -348,9 +348,9 @@ public abstract class SelectionKey {
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p> If this key's channel does not support socket-accept operations then * <p> If this key's channel does not support socket-accept operations then
* this method always returns <tt>false</tt>. </p> * this method always returns {@code false}. </p>
* *
* @return <tt>true</tt> if, and only if, * @return {@code true} if, and only if,
* {@code readyOps() & OP_ACCEPT} is nonzero * {@code readyOps() & OP_ACCEPT} is nonzero
* *
* @throws CancelledKeyException * @throws CancelledKeyException
@ -376,13 +376,13 @@ public abstract class SelectionKey {
* <p> An attached object may later be retrieved via the {@link #attachment() * <p> An attached object may later be retrieved via the {@link #attachment()
* attachment} method. Only one object may be attached at a time; invoking * attachment} method. Only one object may be attached at a time; invoking
* this method causes any previous attachment to be discarded. The current * this method causes any previous attachment to be discarded. The current
* attachment may be discarded by attaching <tt>null</tt>. </p> * attachment may be discarded by attaching {@code null}. </p>
* *
* @param ob * @param ob
* The object to be attached; may be <tt>null</tt> * The object to be attached; may be {@code null}
* *
* @return The previously-attached object, if any, * @return The previously-attached object, if any,
* otherwise <tt>null</tt> * otherwise {@code null}
*/ */
public final Object attach(Object ob) { public final Object attach(Object ob) {
return attachmentUpdater.getAndSet(this, ob); return attachmentUpdater.getAndSet(this, ob);
@ -392,7 +392,7 @@ public abstract class SelectionKey {
* Retrieves the current attachment. * Retrieves the current attachment.
* *
* @return The object currently attached to this key, * @return The object currently attached to this key,
* or <tt>null</tt> if there is no attachment * or {@code null} if there is no attachment
*/ */
public final Object attachment() { public final Object attachment() {
return attachment; return attachment;

View file

@ -230,7 +230,7 @@ public abstract class Selector implements Closeable {
/** /**
* Tells whether or not this selector is open. * Tells whether or not this selector is open.
* *
* @return <tt>true</tt> if, and only if, this selector is open * @return {@code true} if, and only if, this selector is open
*/ */
public abstract boolean isOpen(); public abstract boolean isOpen();
@ -309,7 +309,7 @@ public abstract class Selector implements Closeable {
* <p> This method does not offer real-time guarantees: It schedules the * <p> This method does not offer real-time guarantees: It schedules the
* timeout as if by invoking the {@link Object#wait(long)} method. </p> * timeout as if by invoking the {@link Object#wait(long)} method. </p>
* *
* @param timeout If positive, block for up to <tt>timeout</tt> * @param timeout If positive, block for up to {@code timeout}
* milliseconds, more or less, while waiting for a * milliseconds, more or less, while waiting for a
* channel to become ready; if zero, block indefinitely; * channel to become ready; if zero, block indefinitely;
* must not be negative * must not be negative

View file

@ -223,7 +223,7 @@ public abstract class ServerSocketChannel
* Accepts a connection made to this channel's socket. * Accepts a connection made to this channel's socket.
* *
* <p> If this channel is in non-blocking mode then this method will * <p> If this channel is in non-blocking mode then this method will
* immediately return <tt>null</tt> if there are no pending connections. * immediately return {@code null} if there are no pending connections.
* Otherwise it will block indefinitely until a new connection is available * Otherwise it will block indefinitely until a new connection is available
* or an I/O error occurs. * or an I/O error occurs.
* *
@ -239,7 +239,7 @@ public abstract class ServerSocketChannel
* java.lang.SecurityManager#checkAccept checkAccept} method. </p> * java.lang.SecurityManager#checkAccept checkAccept} method. </p>
* *
* @return The socket channel for the new connection, * @return The socket channel for the new connection,
* or <tt>null</tt> if this channel is in non-blocking mode * or {@code null} if this channel is in non-blocking mode
* and no connection is available to be accepted * and no connection is available to be accepted
* *
* @throws ClosedChannelException * @throws ClosedChannelException

View file

@ -58,7 +58,7 @@ import java.nio.channels.spi.SelectorProvider;
* If the input side of a socket is shut down by one thread while another * If the input side of a socket is shut down by one thread while another
* thread is blocked in a read operation on the socket's channel, then the read * thread is blocked in a read operation on the socket's channel, then the read
* operation in the blocked thread will complete without reading any bytes and * operation in the blocked thread will complete without reading any bytes and
* will return <tt>-1</tt>. If the output side of a socket is shut down by one * will return {@code -1}. If the output side of a socket is shut down by one
* thread while another thread is blocked in a write operation on the socket's * thread while another thread is blocked in a write operation on the socket's
* channel, then the blocked thread will receive an {@link * channel, then the blocked thread will receive an {@link
* AsynchronousCloseException}. * AsynchronousCloseException}.
@ -150,7 +150,7 @@ public abstract class SocketChannel
* *
* <p> This convenience method works as if by invoking the {@link #open()} * <p> This convenience method works as if by invoking the {@link #open()}
* method, invoking the {@link #connect(SocketAddress) connect} method upon * method, invoking the {@link #connect(SocketAddress) connect} method upon
* the resulting socket channel, passing it <tt>remote</tt>, and then * the resulting socket channel, passing it {@code remote}, and then
* returning that channel. </p> * returning that channel. </p>
* *
* @param remote * @param remote
@ -204,9 +204,9 @@ public abstract class SocketChannel
* operations. * operations.
* *
* <p> Socket channels support connecting, reading, and writing, so this * <p> Socket channels support connecting, reading, and writing, so this
* method returns <tt>(</tt>{@link SelectionKey#OP_CONNECT} * method returns {@code (}{@link SelectionKey#OP_CONNECT}
* <tt>|</tt>&nbsp;{@link SelectionKey#OP_READ} <tt>|</tt>&nbsp;{@link * {@code |}&nbsp;{@link SelectionKey#OP_READ} {@code |}&nbsp;{@link
* SelectionKey#OP_WRITE}<tt>)</tt>. </p> * SelectionKey#OP_WRITE}{@code )}.
* *
* @return The valid-operation set * @return The valid-operation set
*/ */
@ -304,7 +304,7 @@ public abstract class SocketChannel
/** /**
* Tells whether or not this channel's network socket is connected. * Tells whether or not this channel's network socket is connected.
* *
* @return <tt>true</tt> if, and only if, this channel's network socket * @return {@code true} if, and only if, this channel's network socket
* is {@link #isOpen open} and connected * is {@link #isOpen open} and connected
*/ */
public abstract boolean isConnected(); public abstract boolean isConnected();
@ -313,7 +313,7 @@ public abstract class SocketChannel
* Tells whether or not a connection operation is in progress on this * Tells whether or not a connection operation is in progress on this
* channel. * channel.
* *
* @return <tt>true</tt> if, and only if, a connection operation has been * @return {@code true} if, and only if, a connection operation has been
* initiated on this channel but not yet completed by invoking the * initiated on this channel but not yet completed by invoking the
* {@link #finishConnect finishConnect} method * {@link #finishConnect finishConnect} method
*/ */
@ -325,8 +325,8 @@ public abstract class SocketChannel
* <p> If this channel is in non-blocking mode then an invocation of this * <p> If this channel is in non-blocking mode then an invocation of this
* method initiates a non-blocking connection operation. If the connection * method initiates a non-blocking connection operation. If the connection
* is established immediately, as can happen with a local connection, then * is established immediately, as can happen with a local connection, then
* this method returns <tt>true</tt>. Otherwise this method returns * this method returns {@code true}. Otherwise this method returns
* <tt>false</tt> and the connection operation must later be completed by * {@code false} and the connection operation must later be completed by
* invoking the {@link #finishConnect finishConnect} method. * invoking the {@link #finishConnect finishConnect} method.
* *
* <p> If this channel is in blocking mode then an invocation of this * <p> If this channel is in blocking mode then an invocation of this
@ -349,8 +349,8 @@ public abstract class SocketChannel
* @param remote * @param remote
* The remote address to which this channel is to be connected * The remote address to which this channel is to be connected
* *
* @return <tt>true</tt> if a connection was established, * @return {@code true} if a connection was established,
* <tt>false</tt> if this channel is in non-blocking mode * {@code false} if this channel is in non-blocking mode
* and the connection operation is in progress * and the connection operation is in progress
* *
* @throws AlreadyConnectedException * @throws AlreadyConnectedException
@ -400,11 +400,11 @@ public abstract class SocketChannel
* {@link java.io.IOException} to be thrown. * {@link java.io.IOException} to be thrown.
* *
* <p> If this channel is already connected then this method will not block * <p> If this channel is already connected then this method will not block
* and will immediately return <tt>true</tt>. If this channel is in * and will immediately return {@code true}. If this channel is in
* non-blocking mode then this method will return <tt>false</tt> if the * non-blocking mode then this method will return {@code false} if the
* connection process is not yet complete. If this channel is in blocking * connection process is not yet complete. If this channel is in blocking
* mode then this method will block until the connection either completes * mode then this method will block until the connection either completes
* or fails, and will always either return <tt>true</tt> or throw a checked * or fails, and will always either return {@code true} or throw a checked
* exception describing the failure. * exception describing the failure.
* *
* <p> This method may be invoked at any time. If a read or write * <p> This method may be invoked at any time. If a read or write
@ -414,7 +414,7 @@ public abstract class SocketChannel
* invocation of this method throws a checked exception, then the channel * invocation of this method throws a checked exception, then the channel
* will be closed. </p> * will be closed. </p>
* *
* @return <tt>true</tt> if, and only if, this channel's socket is now * @return {@code true} if, and only if, this channel's socket is now
* connected * connected
* *
* @throws NoConnectionPendingException * @throws NoConnectionPendingException

View file

@ -54,16 +54,16 @@ public interface WritableByteChannel
* *
* <p> An attempt is made to write up to <i>r</i> bytes to the channel, * <p> An attempt is made to write up to <i>r</i> bytes to the channel,
* where <i>r</i> is the number of bytes remaining in the buffer, that is, * where <i>r</i> is the number of bytes remaining in the buffer, that is,
* <tt>src.remaining()</tt>, at the moment this method is invoked. * {@code src.remaining()}, at the moment this method is invoked.
* *
* <p> Suppose that a byte sequence of length <i>n</i> is written, where * <p> Suppose that a byte sequence of length <i>n</i> is written, where
* <tt>0</tt>&nbsp;<tt>&lt;=</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>. * {@code 0}&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
* This byte sequence will be transferred from the buffer starting at index * This byte sequence will be transferred from the buffer starting at index
* <i>p</i>, where <i>p</i> is the buffer's position at the moment this * <i>p</i>, where <i>p</i> is the buffer's position at the moment this
* method is invoked; the index of the last byte written will be * method is invoked; the index of the last byte written will be
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>. * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>&nbsp;{@code -}&nbsp;{@code 1}.
* Upon return the buffer's position will be equal to * Upon return the buffer's position will be equal to
* <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed. * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>; its limit will not have changed.
* *
* <p> Unless otherwise specified, a write operation will return only after * <p> Unless otherwise specified, a write operation will return only after
* writing all of the <i>r</i> requested bytes. Some types of channels, * writing all of the <i>r</i> requested bytes. Some types of channels,

View file

@ -32,29 +32,29 @@
* *
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists channels and their descriptions"> * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists channels and their descriptions">
* <tr><th align="left">Channels</th><th align="left">Description</th></tr> * <tr><th align="left">Channels</th><th align="left">Description</th></tr>
* <tr><td valign=top><tt><i>{@link java.nio.channels.Channel}</i></tt></td> * <tr><td valign=top><i>{@link java.nio.channels.Channel}</i></td>
* <td>A nexus for I/O operations</td></tr> * <td>A nexus for I/O operations</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></td>
* <td>Can read into a buffer</td></tr> * <td>Can read into a buffer</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></td>
* <td>Can read into a sequence of&nbsp;buffers</td></tr> * <td>Can read into a sequence of&nbsp;buffers</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></td>
* <td>Can write from a buffer</td></tr> * <td>Can write from a buffer</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></td>
* <td>Can write from a sequence of&nbsp;buffers</td></tr> * <td>Can write from a sequence of&nbsp;buffers</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></td>
* <td>Can read/write to/from a&nbsp;buffer</td></tr> * <td>Can read/write to/from a&nbsp;buffer</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></td>
* <td>A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes</td></tr> * <td>A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></td>
* <td>Supports asynchronous I/O operations.</td></tr> * <td>Supports asynchronous I/O operations.</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
* <td>Can read and write bytes asynchronously</td></tr> * <td>Can read and write bytes asynchronously</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></td>
* <td>A channel to a network socket</td></tr> * <td>A channel to a network socket</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></td>
* <td>Can join Internet Protocol (IP) multicast groups</td></tr> * <td>Can join Internet Protocol (IP) multicast groups</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.Channels}</tt></td> * <tr><td valign=top>{@link java.nio.channels.Channels}</td>
* <td>Utility methods for channel/stream interoperation</td></tr> * <td>Utility methods for channel/stream interoperation</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -99,8 +99,8 @@
* Internet Protocol (IP) multicast groups. * Internet Protocol (IP) multicast groups.
* *
* <p> The {@link java.nio.channels.Channels} utility class defines static methods * <p> The {@link java.nio.channels.Channels} utility class defines static methods
* that support the interoperation of the stream classes of the <tt>{@link * that support the interoperation of the stream classes of the {@link
* java.io}</tt> package with the channel classes of this package. An appropriate * java.io} package with the channel classes of this package. An appropriate
* channel can be constructed from an {@link java.io.InputStream} or an {@link * channel can be constructed from an {@link java.io.InputStream} or an {@link
* java.io.OutputStream}, and conversely an {@link java.io.InputStream} or an * java.io.OutputStream}, and conversely an {@link java.io.InputStream} or an
* {@link java.io.OutputStream} can be constructed from a channel. A {@link * {@link java.io.OutputStream} can be constructed from a channel. A {@link
@ -111,11 +111,11 @@
* *
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists file channels and their descriptions"> * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists file channels and their descriptions">
* <tr><th align="left">File channels</th><th align="left">Description</th></tr> * <tr><th align="left">File channels</th><th align="left">Description</th></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.FileChannel}</tt></td> * <tr><td valign=top>{@link java.nio.channels.FileChannel}</td>
* <td>Reads, writes, maps, and manipulates files</td></tr> * <td>Reads, writes, maps, and manipulates files</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.FileLock}</tt></td> * <tr><td valign=top>{@link java.nio.channels.FileLock}</td>
* <td>A lock on a (region of a) file</td></tr> * <td>A lock on a (region of a) file</td></tr>
* <tr><td valign=top><tt>{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</tt></td> * <tr><td valign=top>{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
* <td>A direct byte buffer mapped to a region of a&nbsp;file</td></tr> * <td>A direct byte buffer mapped to a region of a&nbsp;file</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -133,30 +133,30 @@
* java.nio.channels.FileChannel#open open} methods, or by invoking the {@code * java.nio.channels.FileChannel#open open} methods, or by invoking the {@code
* getChannel} method of a {@link java.io.FileInputStream}, {@link * getChannel} method of a {@link java.io.FileInputStream}, {@link
* java.io.FileOutputStream}, or {@link java.io.RandomAccessFile} to return a * java.io.FileOutputStream}, or {@link java.io.RandomAccessFile} to return a
* file channel connected to the same underlying file as the <tt>{@link java.io}</tt> * file channel connected to the same underlying file as the {@link java.io}
* class. * class.
* *
* <a name="multiplex"></a> * <a name="multiplex"></a>
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists multiplexed, non-blocking channels and their descriptions"> * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists multiplexed, non-blocking channels and their descriptions">
* <tr><th align="left">Multiplexed, non-blocking I/O</th><th align="left"><p>Description</th></tr> * <tr><th align="left">Multiplexed, non-blocking I/O</th><th align="left"><p>Description</th></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.SelectableChannel}</tt></td> * <tr><td valign=top>{@link java.nio.channels.SelectableChannel}</td>
* <td>A channel that can be multiplexed</td></tr> * <td>A channel that can be multiplexed</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</td>
* <td>A channel to a datagram-oriented socket</td></tr> * <td>A channel to a datagram-oriented socket</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</td>
* <td>The write end of a pipe</td></tr> * <td>The write end of a pipe</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</td>
* <td>The read end of a pipe</td></tr> * <td>The read end of a pipe</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</td>
* <td>A channel to a stream-oriented listening socket</td></tr> * <td>A channel to a stream-oriented listening socket</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</td>
* <td>A channel for a stream-oriented connecting socket</td></tr> * <td>A channel for a stream-oriented connecting socket</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.Selector}</tt></td> * <tr><td valign=top>{@link java.nio.channels.Selector}</td>
* <td>A multiplexor of selectable channels</td></tr> * <td>A multiplexor of selectable channels</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.SelectionKey}</tt></td> * <tr><td valign=top>{@link java.nio.channels.SelectionKey}</td>
* <td>A token representing the registration <br> of a channel * <td>A token representing the registration <br> of a channel
* with&nbsp;a&nbsp;selector</td></tr> * with&nbsp;a&nbsp;selector</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.Pipe}</tt></td> * <tr><td valign=top>{@link java.nio.channels.Pipe}</td>
* <td>Two channels that form a unidirectional&nbsp;pipe</td></tr> * <td>Two channels that form a unidirectional&nbsp;pipe</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -194,18 +194,18 @@
* *
* <p> This package defines selectable-channel classes corresponding to the {@link * <p> This package defines selectable-channel classes corresponding to the {@link
* java.net.DatagramSocket}, {@link java.net.ServerSocket}, and {@link * java.net.DatagramSocket}, {@link java.net.ServerSocket}, and {@link
* java.net.Socket} classes defined in the <tt>{@link java.net}</tt> package. * java.net.Socket} classes defined in the {@link java.net} package.
* Minor changes to these classes have been made in order to support sockets that * Minor changes to these classes have been made in order to support sockets that
* are associated with channels. This package also defines a simple class that * are associated with channels. This package also defines a simple class that
* implements unidirectional pipes. In all cases, a new selectable channel is * implements unidirectional pipes. In all cases, a new selectable channel is
* created by invoking the static <tt>open</tt> method of the corresponding class. * created by invoking the static {@code open} method of the corresponding class.
* If a channel needs an associated socket then a socket will be created as a side * If a channel needs an associated socket then a socket will be created as a side
* effect of this operation. * effect of this operation.
* *
* <p> The implementation of selectors, selectable channels, and selection keys * <p> The implementation of selectors, selectable channels, and selection keys
* can be replaced by "plugging in" an alternative definition or instance of the * can be replaced by "plugging in" an alternative definition or instance of the
* {@link java.nio.channels.spi.SelectorProvider} class defined in the <tt>{@link * {@link java.nio.channels.spi.SelectorProvider} class defined in the {@link
* java.nio.channels.spi}</tt> package. It is not expected that many developers * java.nio.channels.spi} package. It is not expected that many developers
* will actually make use of this facility; it is provided primarily so that * will actually make use of this facility; it is provided primarily so that
* sophisticated users can take advantage of operating-system-specific * sophisticated users can take advantage of operating-system-specific
* I/O-multiplexing mechanisms when very high performance is required. * I/O-multiplexing mechanisms when very high performance is required.
@ -215,8 +215,8 @@
* java.nio.channels.spi.AbstractInterruptibleChannel}, {@link * java.nio.channels.spi.AbstractInterruptibleChannel}, {@link
* java.nio.channels.spi.AbstractSelectableChannel}, {@link * java.nio.channels.spi.AbstractSelectableChannel}, {@link
* java.nio.channels.spi.AbstractSelectionKey}, and {@link * java.nio.channels.spi.AbstractSelectionKey}, and {@link
* java.nio.channels.spi.AbstractSelector} classes in the <tt>{@link * java.nio.channels.spi.AbstractSelector} classes in the {@link
* java.nio.channels.spi}</tt> package. When defining a custom selector provider, * java.nio.channels.spi} package. When defining a custom selector provider,
* only the {@link java.nio.channels.spi.AbstractSelector} and {@link * only the {@link java.nio.channels.spi.AbstractSelector} and {@link
* java.nio.channels.spi.AbstractSelectionKey} classes should be subclassed * java.nio.channels.spi.AbstractSelectionKey} classes should be subclassed
* directly; custom channel classes should extend the appropriate {@link * directly; custom channel classes should extend the appropriate {@link
@ -226,15 +226,15 @@
* *
* <blockquote><table cellspacing=1 cellpadding=0 summary="Lists asynchronous channels and their descriptions"> * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists asynchronous channels and their descriptions">
* <tr><th align="left">Asynchronous I/O</th><th align="left">Description</th></tr> * <tr><th align="left">Asynchronous I/O</th><th align="left">Description</th></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.AsynchronousFileChannel}</tt></td> * <tr><td valign=top>{@link java.nio.channels.AsynchronousFileChannel}</td>
* <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr> * <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.AsynchronousSocketChannel}</tt></td> * <tr><td valign=top>{@link java.nio.channels.AsynchronousSocketChannel}</td>
* <td>An asynchronous channel to a stream-oriented connecting socket</td></tr> * <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</tt></td> * <tr><td valign=top>{@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</td>
* <td>An asynchronous channel to a stream-oriented listening socket</td></tr> * <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.CompletionHandler}</tt></td> * <tr><td valign=top>{@link java.nio.channels.CompletionHandler}</td>
* <td>A handler for consuming the result of an asynchronous operation</td></tr> * <td>A handler for consuming the result of an asynchronous operation</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.AsynchronousChannelGroup}</tt></td> * <tr><td valign=top>{@link java.nio.channels.AsynchronousChannelGroup}</td>
* <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr> * <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -272,13 +272,13 @@
* <p> As with selectors, the implementation of asynchronous channels can be * <p> As with selectors, the implementation of asynchronous channels can be
* replaced by "plugging in" an alternative definition or instance of the {@link * replaced by "plugging in" an alternative definition or instance of the {@link
* java.nio.channels.spi.AsynchronousChannelProvider} class defined in the * java.nio.channels.spi.AsynchronousChannelProvider} class defined in the
* <tt>{@link java.nio.channels.spi}</tt> package. It is not expected that many * {@link java.nio.channels.spi} package. It is not expected that many
* developers will actually make use of this facility; it is provided primarily * developers will actually make use of this facility; it is provided primarily
* so that sophisticated users can take advantage of operating-system-specific * so that sophisticated users can take advantage of operating-system-specific
* asynchronous I/O mechanisms when very high performance is required. * asynchronous I/O mechanisms when very high performance is required.
* *
* <hr width="80%"> * <hr width="80%">
* <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in any class or interface in this package will cause a {@link * or method in any class or interface in this package will cause a {@link
* java.lang.NullPointerException NullPointerException} to be thrown. * java.lang.NullPointerException NullPointerException} to be thrown.
* *

View file

@ -46,7 +46,7 @@ import sun.nio.ch.Interruptible;
* before and after, respectively, invoking an I/O operation that might block * before and after, respectively, invoking an I/O operation that might block
* indefinitely. In order to ensure that the {@link #end end} method is always * indefinitely. In order to ensure that the {@link #end end} method is always
* invoked, these methods should be used within a * invoked, these methods should be used within a
* <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block: * {@code try}&nbsp;...&nbsp;{@code finally} block:
* *
* <blockquote><pre> * <blockquote><pre>
* boolean completed = false; * boolean completed = false;
@ -58,11 +58,11 @@ import sun.nio.ch.Interruptible;
* end(completed); * end(completed);
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p> The <tt>completed</tt> argument to the {@link #end end} method tells * <p> The {@code completed} argument to the {@link #end end} method tells
* whether or not the I/O operation actually completed, that is, whether it had * whether or not the I/O operation actually completed, that is, whether it had
* any effect that would be visible to the invoker. In the case of an * any effect that would be visible to the invoker. In the case of an
* operation that reads bytes, for example, this argument should be * operation that reads bytes, for example, this argument should be
* <tt>true</tt> if, and only if, some bytes were actually transferred into the * {@code true} if, and only if, some bytes were actually transferred into the
* invoker's target buffer. * invoker's target buffer.
* *
* <p> A concrete channel class must also implement the {@link * <p> A concrete channel class must also implement the {@link
@ -148,7 +148,7 @@ public abstract class AbstractInterruptibleChannel
* Marks the beginning of an I/O operation that might block indefinitely. * Marks the beginning of an I/O operation that might block indefinitely.
* *
* <p> This method should be invoked in tandem with the {@link #end end} * <p> This method should be invoked in tandem with the {@link #end end}
* method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block as * method, using a {@code try}&nbsp;...&nbsp;{@code finally} block as
* shown <a href="#be">above</a>, in order to implement asynchronous * shown <a href="#be">above</a>, in order to implement asynchronous
* closing and interruption for this channel. </p> * closing and interruption for this channel. </p>
*/ */
@ -177,12 +177,12 @@ public abstract class AbstractInterruptibleChannel
* Marks the end of an I/O operation that might block indefinitely. * Marks the end of an I/O operation that might block indefinitely.
* *
* <p> This method should be invoked in tandem with the {@link #begin * <p> This method should be invoked in tandem with the {@link #begin
* begin} method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block * begin} method, using a {@code try}&nbsp;...&nbsp;{@code finally} block
* as shown <a href="#be">above</a>, in order to implement asynchronous * as shown <a href="#be">above</a>, in order to implement asynchronous
* closing and interruption for this channel. </p> * closing and interruption for this channel. </p>
* *
* @param completed * @param completed
* <tt>true</tt> if, and only if, the I/O operation completed * {@code true} if, and only if, the I/O operation completed
* successfully, that is, had some effect that would be visible to * successfully, that is, had some effect that would be visible to
* the operation's invoker * the operation's invoker
* *

View file

@ -305,8 +305,8 @@ public abstract class AbstractSelectableChannel
* changing the blocking mode. This method is only invoked if the new mode * changing the blocking mode. This method is only invoked if the new mode
* is different from the current mode. </p> * is different from the current mode. </p>
* *
* @param block If <tt>true</tt> then this channel will be placed in * @param block If {@code true} then this channel will be placed in
* blocking mode; if <tt>false</tt> then it will be placed * blocking mode; if {@code false} then it will be placed
* non-blocking mode * non-blocking mode
* *
* @throws IOException * @throws IOException

View file

@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
* after, respectively, invoking an I/O operation that might block * after, respectively, invoking an I/O operation that might block
* indefinitely. In order to ensure that the {@link #end end} method is always * indefinitely. In order to ensure that the {@link #end end} method is always
* invoked, these methods should be used within a * invoked, these methods should be used within a
* <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block: * {@code try}&nbsp;...&nbsp;{@code finally} block:
* *
* <blockquote><pre> * <blockquote><pre>
* try { * try {
@ -197,7 +197,7 @@ public abstract class AbstractSelector
* Marks the beginning of an I/O operation that might block indefinitely. * Marks the beginning of an I/O operation that might block indefinitely.
* *
* <p> This method should be invoked in tandem with the {@link #end end} * <p> This method should be invoked in tandem with the {@link #end end}
* method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block as * method, using a {@code try}&nbsp;...&nbsp;{@code finally} block as
* shown <a href="#be">above</a>, in order to implement interruption for * shown <a href="#be">above</a>, in order to implement interruption for
* this selector. * this selector.
* *
@ -223,7 +223,7 @@ public abstract class AbstractSelector
* Marks the end of an I/O operation that might block indefinitely. * Marks the end of an I/O operation that might block indefinitely.
* *
* <p> This method should be invoked in tandem with the {@link #begin begin} * <p> This method should be invoked in tandem with the {@link #begin begin}
* method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block as * method, using a {@code try}&nbsp;...&nbsp;{@code finally} block as
* shown <a href="#be">above</a>, in order to implement interruption for * shown <a href="#be">above</a>, in order to implement interruption for
* this selector. </p> * this selector. </p>
*/ */

View file

@ -64,7 +64,7 @@ public abstract class AsynchronousChannelProvider {
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("asynchronousChannelProvider")</tt> * {@link RuntimePermission}{@code ("asynchronousChannelProvider")}
*/ */
protected AsynchronousChannelProvider() { protected AsynchronousChannelProvider() {
this(checkPermission()); this(checkPermission());
@ -137,7 +137,7 @@ public abstract class AsynchronousChannelProvider {
* <ol> * <ol>
* *
* <li><p> If the system property * <li><p> If the system property
* <tt>java.nio.channels.spi.AsynchronousChannelProvider</tt> is defined * {@code java.nio.channels.spi.AsynchronousChannelProvider} is defined
* then it is taken to be the fully-qualified name of a concrete provider class. * then it is taken to be the fully-qualified name of a concrete provider class.
* The class is loaded and instantiated; if this process fails then an * The class is loaded and instantiated; if this process fails then an
* unspecified error is thrown. </p></li> * unspecified error is thrown. </p></li>
@ -145,8 +145,8 @@ public abstract class AsynchronousChannelProvider {
* <li><p> If a provider class has been installed in a jar file that is * <li><p> If a provider class has been installed in a jar file that is
* visible to the system class loader, and that jar file contains a * visible to the system class loader, and that jar file contains a
* provider-configuration file named * provider-configuration file named
* <tt>java.nio.channels.spi.AsynchronousChannelProvider</tt> in the resource * {@code java.nio.channels.spi.AsynchronousChannelProvider} in the resource
* directory <tt>META-INF/services</tt>, then the first class name * directory {@code META-INF/services}, then the first class name
* specified in that file is taken. The class is loaded and * specified in that file is taken. The class is loaded and
* instantiated; if this process fails then an unspecified error is * instantiated; if this process fails then an unspecified error is
* thrown. </p></li> * thrown. </p></li>

View file

@ -46,7 +46,7 @@ import sun.security.action.GetPropertyAction;
* #provider() provider} method. The first invocation of that method will locate * #provider() provider} method. The first invocation of that method will locate
* the default provider as specified below. * the default provider as specified below.
* *
* <p> The system-wide default provider is used by the static <tt>open</tt> * <p> The system-wide default provider is used by the static {@code open}
* methods of the {@link java.nio.channels.DatagramChannel#open * methods of the {@link java.nio.channels.DatagramChannel#open
* DatagramChannel}, {@link java.nio.channels.Pipe#open Pipe}, {@link * DatagramChannel}, {@link java.nio.channels.Pipe#open Pipe}, {@link
* java.nio.channels.Selector#open Selector}, {@link * java.nio.channels.Selector#open Selector}, {@link
@ -54,7 +54,7 @@ import sun.security.action.GetPropertyAction;
* java.nio.channels.SocketChannel#open SocketChannel} classes. It is also * java.nio.channels.SocketChannel#open SocketChannel} classes. It is also
* used by the {@link java.lang.System#inheritedChannel System.inheritedChannel()} * used by the {@link java.lang.System#inheritedChannel System.inheritedChannel()}
* method. A program may make use of a provider other than the default provider * method. A program may make use of a provider other than the default provider
* by instantiating that provider and then directly invoking the <tt>open</tt> * by instantiating that provider and then directly invoking the {@code open}
* methods defined in this class. * methods defined in this class.
* *
* <p> All of the methods in this class are safe for use by multiple concurrent * <p> All of the methods in this class are safe for use by multiple concurrent
@ -84,7 +84,7 @@ public abstract class SelectorProvider {
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("selectorProvider")</tt> * {@link RuntimePermission}{@code ("selectorProvider")}
*/ */
protected SelectorProvider() { protected SelectorProvider() {
this(checkPermission()); this(checkPermission());
@ -142,7 +142,7 @@ public abstract class SelectorProvider {
* <ol> * <ol>
* *
* <li><p> If the system property * <li><p> If the system property
* <tt>java.nio.channels.spi.SelectorProvider</tt> is defined then it is * {@code java.nio.channels.spi.SelectorProvider} is defined then it is
* taken to be the fully-qualified name of a concrete provider class. * taken to be the fully-qualified name of a concrete provider class.
* The class is loaded and instantiated; if this process fails then an * The class is loaded and instantiated; if this process fails then an
* unspecified error is thrown. </p></li> * unspecified error is thrown. </p></li>
@ -150,8 +150,8 @@ public abstract class SelectorProvider {
* <li><p> If a provider class has been installed in a jar file that is * <li><p> If a provider class has been installed in a jar file that is
* visible to the system class loader, and that jar file contains a * visible to the system class loader, and that jar file contains a
* provider-configuration file named * provider-configuration file named
* <tt>java.nio.channels.spi.SelectorProvider</tt> in the resource * {@code java.nio.channels.spi.SelectorProvider} in the resource
* directory <tt>META-INF/services</tt>, then the first class name * directory {@code META-INF/services}, then the first class name
* specified in that file is taken. The class is loaded and * specified in that file is taken. The class is loaded and
* instantiated; if this process fails then an unspecified error is * instantiated; if this process fails then an unspecified error is
* thrown. </p></li> * thrown. </p></li>
@ -305,14 +305,14 @@ public abstract class SelectorProvider {
* returned. Subsequent invocations of this method return the same * returned. Subsequent invocations of this method return the same
* channel. </p> * channel. </p>
* *
* @return The inherited channel, if any, otherwise <tt>null</tt>. * @return The inherited channel, if any, otherwise {@code null}.
* *
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("inheritedChannel")</tt> * {@link RuntimePermission}{@code ("inheritedChannel")}
* *
* @since 1.5 * @since 1.5
*/ */

View file

@ -55,12 +55,12 @@ import java.util.Arrays;
* has not been used before; </p></li> * has not been used before; </p></li>
* *
* <li><p> Invoke the {@link #$code$ $code$} method zero or more times, as * <li><p> Invoke the {@link #$code$ $code$} method zero or more times, as
* long as additional input may be available, passing <tt>false</tt> for the * long as additional input may be available, passing {@code false} for the
* <tt>endOfInput</tt> argument and filling the input buffer and flushing the * {@code endOfInput} argument and filling the input buffer and flushing the
* output buffer between invocations; </p></li> * output buffer between invocations; </p></li>
* *
* <li><p> Invoke the {@link #$code$ $code$} method one final time, passing * <li><p> Invoke the {@link #$code$ $code$} method one final time, passing
* <tt>true</tt> for the <tt>endOfInput</tt> argument; and then </p></li> * {@code true} for the {@code endOfInput} argument; and then </p></li>
* *
* <li><p> Invoke the {@link #flush flush} method so that the $coder$ can * <li><p> Invoke the {@link #flush flush} method so that the $coder$ can
* flush any internal state to the output buffer. </p></li> * flush any internal state to the output buffer. </p></li>
@ -175,7 +175,7 @@ public abstract class Charset$Coder$ {
* $otype$s that will be produced for each input $itype$ * $otype$s that will be produced for each input $itype$
* *
* @param replacement * @param replacement
* The initial replacement; must not be <tt>null</tt>, must have * The initial replacement; must not be {@code null}, must have
* non-zero length, must not be longer than max$ItypesPerOtype$, * non-zero length, must not be longer than max$ItypesPerOtype$,
* and must be {@linkplain #isLegalReplacement legal} * and must be {@linkplain #isLegalReplacement legal}
* *
@ -248,7 +248,7 @@ public abstract class Charset$Coder$ {
* Returns this $coder$'s replacement value. * Returns this $coder$'s replacement value.
* *
* @return This $coder$'s current replacement, * @return This $coder$'s current replacement,
* which is never <tt>null</tt> and is never empty * which is never {@code null} and is never empty
*/ */
public final $replType$ replacement() { public final $replType$ replacement() {
#if[decoder] #if[decoder]
@ -267,7 +267,7 @@ public abstract class Charset$Coder$ {
* replacement is acceptable. </p> * replacement is acceptable. </p>
* *
* @param newReplacement The new replacement; must not be * @param newReplacement The new replacement; must not be
* <tt>null</tt>, must have non-zero length, * {@code null}, must have non-zero length,
#if[decoder] #if[decoder]
* and must not be longer than the value returned by the * and must not be longer than the value returned by the
* {@link #max$ItypesPerOtype$() max$ItypesPerOtype$} method * {@link #max$ItypesPerOtype$() max$ItypesPerOtype$} method
@ -332,7 +332,7 @@ public abstract class Charset$Coder$ {
* *
* @param repl The byte array to be tested * @param repl The byte array to be tested
* *
* @return <tt>true</tt> if, and only if, the given byte array * @return {@code true} if, and only if, the given byte array
* is a legal replacement value for this encoder * is a legal replacement value for this encoder
*/ */
public boolean isLegalReplacement(byte[] repl) { public boolean isLegalReplacement(byte[] repl) {
@ -358,7 +358,7 @@ public abstract class Charset$Coder$ {
/** /**
* Returns this $coder$'s current action for malformed-input errors. * Returns this $coder$'s current action for malformed-input errors.
* *
* @return The current malformed-input action, which is never <tt>null</tt> * @return The current malformed-input action, which is never {@code null}
*/ */
public CodingErrorAction malformedInputAction() { public CodingErrorAction malformedInputAction() {
return malformedInputAction; return malformedInputAction;
@ -370,7 +370,7 @@ public abstract class Charset$Coder$ {
* <p> This method invokes the {@link #implOnMalformedInput * <p> This method invokes the {@link #implOnMalformedInput
* implOnMalformedInput} method, passing the new action. </p> * implOnMalformedInput} method, passing the new action. </p>
* *
* @param newAction The new action; must not be <tt>null</tt> * @param newAction The new action; must not be {@code null}
* *
* @return This $coder$ * @return This $coder$
* *
@ -400,7 +400,7 @@ public abstract class Charset$Coder$ {
* Returns this $coder$'s current action for unmappable-character errors. * Returns this $coder$'s current action for unmappable-character errors.
* *
* @return The current unmappable-character action, which is never * @return The current unmappable-character action, which is never
* <tt>null</tt> * {@code null}
*/ */
public CodingErrorAction unmappableCharacterAction() { public CodingErrorAction unmappableCharacterAction() {
return unmappableCharacterAction; return unmappableCharacterAction;
@ -412,7 +412,7 @@ public abstract class Charset$Coder$ {
* <p> This method invokes the {@link #implOnUnmappableCharacter * <p> This method invokes the {@link #implOnUnmappableCharacter
* implOnUnmappableCharacter} method, passing the new action. </p> * implOnUnmappableCharacter} method, passing the new action. </p>
* *
* @param newAction The new action; must not be <tt>null</tt> * @param newAction The new action; must not be {@code null}
* *
* @return This $coder$ * @return This $coder$
* *
@ -521,16 +521,16 @@ public abstract class Charset$Coder$ {
* operation then care should be taken to preserve any $itype$s remaining * operation then care should be taken to preserve any $itype$s remaining
* in the input buffer so that they are available to the next invocation. * in the input buffer so that they are available to the next invocation.
* *
* <p> The <tt>endOfInput</tt> parameter advises this method as to whether * <p> The {@code endOfInput} parameter advises this method as to whether
* the invoker can provide further input beyond that contained in the given * the invoker can provide further input beyond that contained in the given
* input buffer. If there is a possibility of providing additional input * input buffer. If there is a possibility of providing additional input
* then the invoker should pass <tt>false</tt> for this parameter; if there * then the invoker should pass {@code false} for this parameter; if there
* is no possibility of providing further input then the invoker should * is no possibility of providing further input then the invoker should
* pass <tt>true</tt>. It is not erroneous, and in fact it is quite * pass {@code true}. It is not erroneous, and in fact it is quite
* common, to pass <tt>false</tt> in one invocation and later discover that * common, to pass {@code false} in one invocation and later discover that
* no further input was actually available. It is critical, however, that * no further input was actually available. It is critical, however, that
* the final invocation of this method in a sequence of invocations always * the final invocation of this method in a sequence of invocations always
* pass <tt>true</tt> so that any remaining un$code$d input will be treated * pass {@code true} so that any remaining un$code$d input will be treated
* as being malformed. * as being malformed.
* *
* <p> This method works by invoking the {@link #$code$Loop $code$Loop} * <p> This method works by invoking the {@link #$code$Loop $code$Loop}
@ -545,7 +545,7 @@ public abstract class Charset$Coder$ {
* The output $otype$ buffer * The output $otype$ buffer
* *
* @param endOfInput * @param endOfInput
* <tt>true</tt> if, and only if, the invoker can provide no * {@code true} if, and only if, the invoker can provide no
* additional input $itype$s beyond those in the given buffer * additional input $itype$s beyond those in the given buffer
* *
* @return A coder-result object describing the reason for termination * @return A coder-result object describing the reason for termination
@ -553,9 +553,9 @@ public abstract class Charset$Coder$ {
* @throws IllegalStateException * @throws IllegalStateException
* If $a$ $coding$ operation is already in progress and the previous * If $a$ $coding$ operation is already in progress and the previous
* step was an invocation neither of the {@link #reset reset} * step was an invocation neither of the {@link #reset reset}
* method, nor of this method with a value of <tt>false</tt> for * method, nor of this method with a value of {@code false} for
* the <tt>endOfInput</tt> parameter, nor of this method with a * the {@code endOfInput} parameter, nor of this method with a
* value of <tt>true</tt> for the <tt>endOfInput</tt> parameter * value of {@code true} for the {@code endOfInput} parameter
* but a return value indicating an incomplete $coding$ operation * but a return value indicating an incomplete $coding$ operation
* *
* @throws CoderMalfunctionError * @throws CoderMalfunctionError
@ -659,7 +659,7 @@ public abstract class Charset$Coder$ {
* invocation neither of the {@link #flush flush} method nor of * invocation neither of the {@link #flush flush} method nor of
* the three-argument {@link * the three-argument {@link
* #$code$($Itype$Buffer,$Otype$Buffer,boolean) $code$} method * #$code$($Itype$Buffer,$Otype$Buffer,boolean) $code$} method
* with a value of <tt>true</tt> for the <tt>endOfInput</tt> * with a value of {@code true} for the {@code endOfInput}
* parameter * parameter
*/ */
public final CoderResult flush($Otype$Buffer out) { public final CoderResult flush($Otype$Buffer out) {
@ -824,10 +824,10 @@ public abstract class Charset$Coder$ {
* Tells whether or not this decoder implements an auto-detecting charset. * Tells whether or not this decoder implements an auto-detecting charset.
* *
* <p> The default implementation of this method always returns * <p> The default implementation of this method always returns
* <tt>false</tt>; it should be overridden by auto-detecting decoders to * {@code false}; it should be overridden by auto-detecting decoders to
* return <tt>true</tt>. </p> * return {@code true}. </p>
* *
* @return <tt>true</tt> if, and only if, this decoder implements an * @return {@code true} if, and only if, this decoder implements an
* auto-detecting charset * auto-detecting charset
*/ */
public boolean isAutoDetecting() { public boolean isAutoDetecting() {
@ -840,21 +840,21 @@ public abstract class Charset$Coder$ {
* *
* <p> If this decoder implements an auto-detecting charset then at a * <p> If this decoder implements an auto-detecting charset then at a
* single point during a decoding operation this method may start returning * single point during a decoding operation this method may start returning
* <tt>true</tt> to indicate that a specific charset has been detected in * {@code true} to indicate that a specific charset has been detected in
* the input byte sequence. Once this occurs, the {@link #detectedCharset * the input byte sequence. Once this occurs, the {@link #detectedCharset
* detectedCharset} method may be invoked to retrieve the detected charset. * detectedCharset} method may be invoked to retrieve the detected charset.
* *
* <p> That this method returns <tt>false</tt> does not imply that no bytes * <p> That this method returns {@code false} does not imply that no bytes
* have yet been decoded. Some auto-detecting decoders are capable of * have yet been decoded. Some auto-detecting decoders are capable of
* decoding some, or even all, of an input byte sequence without fixing on * decoding some, or even all, of an input byte sequence without fixing on
* a particular charset. * a particular charset.
* *
* <p> The default implementation of this method always throws an {@link * <p> The default implementation of this method always throws an {@link
* UnsupportedOperationException}; it should be overridden by * UnsupportedOperationException}; it should be overridden by
* auto-detecting decoders to return <tt>true</tt> once the input charset * auto-detecting decoders to return {@code true} once the input charset
* has been determined. </p> * has been determined. </p>
* *
* @return <tt>true</tt> if, and only if, this decoder has detected a * @return {@code true} if, and only if, this decoder has detected a
* specific charset * specific charset
* *
* @throws UnsupportedOperationException * @throws UnsupportedOperationException
@ -880,7 +880,7 @@ public abstract class Charset$Coder$ {
* auto-detecting decoders to return the appropriate value. </p> * auto-detecting decoders to return the appropriate value. </p>
* *
* @return The charset detected by this auto-detecting decoder, * @return The charset detected by this auto-detecting decoder,
* or <tt>null</tt> if the charset has not yet been determined * or {@code null} if the charset has not yet been determined
* *
* @throws IllegalStateException * @throws IllegalStateException
* If insufficient bytes have been read to determine a charset * If insufficient bytes have been read to determine a charset
@ -920,7 +920,7 @@ public abstract class Charset$Coder$ {
/** /**
* Tells whether or not this encoder can encode the given character. * Tells whether or not this encoder can encode the given character.
* *
* <p> This method returns <tt>false</tt> if the given character is a * <p> This method returns {@code false} if the given character is a
* surrogate character; such characters can be interpreted only when they * surrogate character; such characters can be interpreted only when they
* are members of a pair consisting of a high surrogate followed by a low * are members of a pair consisting of a high surrogate followed by a low
* surrogate. The {@link #canEncode(java.lang.CharSequence) * surrogate. The {@link #canEncode(java.lang.CharSequence)
@ -937,7 +937,7 @@ public abstract class Charset$Coder$ {
* @param c * @param c
* The given character * The given character
* *
* @return <tt>true</tt> if, and only if, this encoder can encode * @return {@code true} if, and only if, this encoder can encode
* the given character * the given character
* *
* @throws IllegalStateException * @throws IllegalStateException
@ -954,7 +954,7 @@ public abstract class Charset$Coder$ {
* Tells whether or not this encoder can encode the given character * Tells whether or not this encoder can encode the given character
* sequence. * sequence.
* *
* <p> If this method returns <tt>false</tt> for a particular character * <p> If this method returns {@code false} for a particular character
* sequence then more information about why the sequence cannot be encoded * sequence then more information about why the sequence cannot be encoded
* may be obtained by performing a full <a href="#steps">encoding * may be obtained by performing a full <a href="#steps">encoding
* operation</a>. * operation</a>.
@ -968,7 +968,7 @@ public abstract class Charset$Coder$ {
* @param cs * @param cs
* The given character sequence * The given character sequence
* *
* @return <tt>true</tt> if, and only if, this encoder can encode * @return {@code true} if, and only if, this encoder can encode
* the given character without throwing any exceptions and without * the given character without throwing any exceptions and without
* performing any replacements * performing any replacements
* *

View file

@ -73,29 +73,29 @@ import sun.security.action.GetPropertyAction;
* *
* <ul> * <ul>
* *
* <li> The uppercase letters <tt>'A'</tt> through <tt>'Z'</tt> * <li> The uppercase letters {@code 'A'} through {@code 'Z'}
* (<tt>'&#92;u0041'</tt>&nbsp;through&nbsp;<tt>'&#92;u005a'</tt>), * (<code>'&#92;u0041'</code>&nbsp;through&nbsp;<code>'&#92;u005a'</code>),
* *
* <li> The lowercase letters <tt>'a'</tt> through <tt>'z'</tt> * <li> The lowercase letters {@code 'a'} through {@code 'z'}
* (<tt>'&#92;u0061'</tt>&nbsp;through&nbsp;<tt>'&#92;u007a'</tt>), * (<code>'&#92;u0061'</code>&nbsp;through&nbsp;<code>'&#92;u007a'</code>),
* *
* <li> The digits <tt>'0'</tt> through <tt>'9'</tt> * <li> The digits {@code '0'} through {@code '9'}
* (<tt>'&#92;u0030'</tt>&nbsp;through&nbsp;<tt>'&#92;u0039'</tt>), * (<code>'&#92;u0030'</code>&nbsp;through&nbsp;<code>'&#92;u0039'</code>),
* *
* <li> The dash character <tt>'-'</tt> * <li> The dash character {@code '-'}
* (<tt>'&#92;u002d'</tt>,&nbsp;<small>HYPHEN-MINUS</small>), * (<code>'&#92;u002d'</code>,&nbsp;<small>HYPHEN-MINUS</small>),
* *
* <li> The plus character <tt>'+'</tt> * <li> The plus character {@code '+'}
* (<tt>'&#92;u002b'</tt>,&nbsp;<small>PLUS SIGN</small>), * (<code>'&#92;u002b'</code>,&nbsp;<small>PLUS SIGN</small>),
* *
* <li> The period character <tt>'.'</tt> * <li> The period character {@code '.'}
* (<tt>'&#92;u002e'</tt>,&nbsp;<small>FULL STOP</small>), * (<code>'&#92;u002e'</code>,&nbsp;<small>FULL STOP</small>),
* *
* <li> The colon character <tt>':'</tt> * <li> The colon character {@code ':'}
* (<tt>'&#92;u003a'</tt>,&nbsp;<small>COLON</small>), and * (<code>'&#92;u003a'</code>,&nbsp;<small>COLON</small>), and
* *
* <li> The underscore character <tt>'_'</tt> * <li> The underscore character {@code '_'}
* (<tt>'&#92;u005f'</tt>,&nbsp;<small>LOW&nbsp;LINE</small>). * (<code>'&#92;u005f'</code>,&nbsp;<small>LOW&nbsp;LINE</small>).
* *
* </ul> * </ul>
* *
@ -115,7 +115,7 @@ import sun.security.action.GetPropertyAction;
* <p><a name="hn">Some charsets have an <i>historical name</i> that is defined for * <p><a name="hn">Some charsets have an <i>historical name</i> that is defined for
* compatibility with previous versions of the Java platform.</a> A charset's * compatibility with previous versions of the Java platform.</a> A charset's
* historical name is either its canonical name or one of its aliases. The * historical name is either its canonical name or one of its aliases. The
* historical name is returned by the <tt>getEncoding()</tt> methods of the * historical name is returned by the {@code getEncoding()} methods of the
* {@link java.io.InputStreamReader#getEncoding InputStreamReader} and {@link * {@link java.io.InputStreamReader#getEncoding InputStreamReader} and {@link
* java.io.OutputStreamWriter#getEncoding OutputStreamWriter} classes. * java.io.OutputStreamWriter#getEncoding OutputStreamWriter} classes.
* *
@ -128,7 +128,7 @@ import sun.security.action.GetPropertyAction;
* than one registry name then its canonical name must be the MIME-preferred * than one registry name then its canonical name must be the MIME-preferred
* name and the other names in the registry must be valid aliases. If a * name and the other names in the registry must be valid aliases. If a
* supported charset is not listed in the IANA registry then its canonical name * supported charset is not listed in the IANA registry then its canonical name
* must begin with one of the strings <tt>"X-"</tt> or <tt>"x-"</tt>. * must begin with one of the strings {@code "X-"} or {@code "x-"}.
* *
* <p> The IANA charset registry does change over time, and so the canonical * <p> The IANA charset registry does change over time, and so the canonical
* name and the aliases of a particular charset may also change over time. To * name and the aliases of a particular charset may also change over time. To
@ -148,53 +148,53 @@ import sun.security.action.GetPropertyAction;
* *
* <blockquote><table width="80%" summary="Description of standard charsets"> * <blockquote><table width="80%" summary="Description of standard charsets">
* <tr><th align="left">Charset</th><th align="left">Description</th></tr> * <tr><th align="left">Charset</th><th align="left">Description</th></tr>
* <tr><td valign=top><tt>US-ASCII</tt></td> * <tr><td valign=top>{@code US-ASCII}</td>
* <td>Seven-bit ASCII, a.k.a. <tt>ISO646-US</tt>, * <td>Seven-bit ASCII, a.k.a. {@code ISO646-US},
* a.k.a. the Basic Latin block of the Unicode character set</td></tr> * a.k.a. the Basic Latin block of the Unicode character set</td></tr>
* <tr><td valign=top><tt>ISO-8859-1&nbsp;&nbsp;</tt></td> * <tr><td valign=top><code>ISO-8859-1&nbsp;&nbsp;</code></td>
* <td>ISO Latin Alphabet No. 1, a.k.a. <tt>ISO-LATIN-1</tt></td></tr> * <td>ISO Latin Alphabet No. 1, a.k.a. {@code ISO-LATIN-1}</td></tr>
* <tr><td valign=top><tt>UTF-8</tt></td> * <tr><td valign=top>{@code UTF-8}</td>
* <td>Eight-bit UCS Transformation Format</td></tr> * <td>Eight-bit UCS Transformation Format</td></tr>
* <tr><td valign=top><tt>UTF-16BE</tt></td> * <tr><td valign=top>{@code UTF-16BE}</td>
* <td>Sixteen-bit UCS Transformation Format, * <td>Sixteen-bit UCS Transformation Format,
* big-endian byte&nbsp;order</td></tr> * big-endian byte&nbsp;order</td></tr>
* <tr><td valign=top><tt>UTF-16LE</tt></td> * <tr><td valign=top>{@code UTF-16LE}</td>
* <td>Sixteen-bit UCS Transformation Format, * <td>Sixteen-bit UCS Transformation Format,
* little-endian byte&nbsp;order</td></tr> * little-endian byte&nbsp;order</td></tr>
* <tr><td valign=top><tt>UTF-16</tt></td> * <tr><td valign=top>{@code UTF-16}</td>
* <td>Sixteen-bit UCS Transformation Format, * <td>Sixteen-bit UCS Transformation Format,
* byte&nbsp;order identified by an optional byte-order mark</td></tr> * byte&nbsp;order identified by an optional byte-order mark</td></tr>
* </table></blockquote> * </table></blockquote>
* *
* <p> The <tt>UTF-8</tt> charset is specified by <a * <p> The {@code UTF-8} charset is specified by <a
* href="http://www.ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279</i></a>; the * href="http://www.ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279</i></a>; the
* transformation format upon which it is based is specified in * transformation format upon which it is based is specified in
* Amendment&nbsp;2 of ISO&nbsp;10646-1 and is also described in the <a * Amendment&nbsp;2 of ISO&nbsp;10646-1 and is also described in the <a
* href="http://www.unicode.org/unicode/standard/standard.html"><i>Unicode * href="http://www.unicode.org/unicode/standard/standard.html"><i>Unicode
* Standard</i></a>. * Standard</i></a>.
* *
* <p> The <tt>UTF-16</tt> charsets are specified by <a * <p> The {@code UTF-16} charsets are specified by <a
* href="http://www.ietf.org/rfc/rfc2781.txt"><i>RFC&nbsp;2781</i></a>; the * href="http://www.ietf.org/rfc/rfc2781.txt"><i>RFC&nbsp;2781</i></a>; the
* transformation formats upon which they are based are specified in * transformation formats upon which they are based are specified in
* Amendment&nbsp;1 of ISO&nbsp;10646-1 and are also described in the <a * Amendment&nbsp;1 of ISO&nbsp;10646-1 and are also described in the <a
* href="http://www.unicode.org/unicode/standard/standard.html"><i>Unicode * href="http://www.unicode.org/unicode/standard/standard.html"><i>Unicode
* Standard</i></a>. * Standard</i></a>.
* *
* <p> The <tt>UTF-16</tt> charsets use sixteen-bit quantities and are * <p> The {@code UTF-16} charsets use sixteen-bit quantities and are
* therefore sensitive to byte order. In these encodings the byte order of a * therefore sensitive to byte order. In these encodings the byte order of a
* stream may be indicated by an initial <i>byte-order mark</i> represented by * stream may be indicated by an initial <i>byte-order mark</i> represented by
* the Unicode character <tt>'&#92;uFEFF'</tt>. Byte-order marks are handled * the Unicode character <code>'&#92;uFEFF'</code>. Byte-order marks are handled
* as follows: * as follows:
* *
* <ul> * <ul>
* *
* <li><p> When decoding, the <tt>UTF-16BE</tt> and <tt>UTF-16LE</tt> * <li><p> When decoding, the {@code UTF-16BE} and {@code UTF-16LE}
* charsets interpret the initial byte-order marks as a <small>ZERO-WIDTH * charsets interpret the initial byte-order marks as a <small>ZERO-WIDTH
* NON-BREAKING SPACE</small>; when encoding, they do not write * NON-BREAKING SPACE</small>; when encoding, they do not write
* byte-order marks. </p></li> * byte-order marks. </p></li>
* *
* <li><p> When decoding, the <tt>UTF-16</tt> charset interprets the * <li><p> When decoding, the {@code UTF-16} charset interprets the
* byte-order mark at the beginning of the input stream to indicate the * byte-order mark at the beginning of the input stream to indicate the
* byte-order of the stream but defaults to big-endian if there is no * byte-order of the stream but defaults to big-endian if there is no
* byte-order mark; when encoding, it uses big-endian byte order and writes * byte-order mark; when encoding, it uses big-endian byte order and writes
@ -247,9 +247,9 @@ import sun.security.action.GetPropertyAction;
* character-encoding scheme then the corresponding charset is usually * character-encoding scheme then the corresponding charset is usually
* named for the coded character set; otherwise a charset is usually named * named for the coded character set; otherwise a charset is usually named
* for the encoding scheme and, possibly, the locale of the coded * for the encoding scheme and, possibly, the locale of the coded
* character sets that it supports. Hence <tt>US-ASCII</tt> is both the * character sets that it supports. Hence {@code US-ASCII} is both the
* name of a coded character set and of the charset that encodes it, while * name of a coded character set and of the charset that encodes it, while
* <tt>EUC-JP</tt> is the name of the charset that encodes the * {@code EUC-JP} is the name of the charset that encodes the
* JIS&nbsp;X&nbsp;0201, JIS&nbsp;X&nbsp;0208, and JIS&nbsp;X&nbsp;0212 * JIS&nbsp;X&nbsp;0201, JIS&nbsp;X&nbsp;0208, and JIS&nbsp;X&nbsp;0212
* coded character sets for the Japanese language. * coded character sets for the Japanese language.
* *
@ -495,14 +495,14 @@ public abstract class Charset
* The name of the requested charset; may be either * The name of the requested charset; may be either
* a canonical name or an alias * a canonical name or an alias
* *
* @return <tt>true</tt> if, and only if, support for the named charset * @return {@code true} if, and only if, support for the named charset
* is available in the current Java virtual machine * is available in the current Java virtual machine
* *
* @throws IllegalCharsetNameException * @throws IllegalCharsetNameException
* If the given charset name is illegal * If the given charset name is illegal
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the given <tt>charsetName</tt> is null * If the given {@code charsetName} is null
*/ */
public static boolean isSupported(String charsetName) { public static boolean isSupported(String charsetName) {
return (lookup(charsetName) != null); return (lookup(charsetName) != null);
@ -521,7 +521,7 @@ public abstract class Charset
* If the given charset name is illegal * If the given charset name is illegal
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the given <tt>charsetName</tt> is null * If the given {@code charsetName} is null
* *
* @throws UnsupportedCharsetException * @throws UnsupportedCharsetException
* If no support for the named charset is available * If no support for the named charset is available
@ -692,7 +692,7 @@ public abstract class Charset
* href="http://www.iana.org/assignments/character-sets">IANA Charset * href="http://www.iana.org/assignments/character-sets">IANA Charset
* Registry</a>. * Registry</a>.
* *
* @return <tt>true</tt> if, and only if, this charset is known by its * @return {@code true} if, and only if, this charset is known by its
* implementor to be registered with the IANA * implementor to be registered with the IANA
*/ */
public final boolean isRegistered() { public final boolean isRegistered() {
@ -732,15 +732,15 @@ public abstract class Charset
* <p> Every charset contains itself. * <p> Every charset contains itself.
* *
* <p> This method computes an approximation of the containment relation: * <p> This method computes an approximation of the containment relation:
* If it returns <tt>true</tt> then the given charset is known to be * If it returns {@code true} then the given charset is known to be
* contained by this charset; if it returns <tt>false</tt>, however, then * contained by this charset; if it returns {@code false}, however, then
* it is not necessarily the case that the given charset is not contained * it is not necessarily the case that the given charset is not contained
* in this charset. * in this charset.
* *
* @param cs * @param cs
* The given charset * The given charset
* *
* @return <tt>true</tt> if the given charset is contained in this charset * @return {@code true} if the given charset is contained in this charset
*/ */
public abstract boolean contains(Charset cs); public abstract boolean contains(Charset cs);
@ -770,9 +770,9 @@ public abstract class Charset
* input byte sequence. Such charsets do not support encoding because * input byte sequence. Such charsets do not support encoding because
* there is no way to determine which encoding should be used on output. * there is no way to determine which encoding should be used on output.
* Implementations of such charsets should override this method to return * Implementations of such charsets should override this method to return
* <tt>false</tt>. </p> * {@code false}. </p>
* *
* @return <tt>true</tt> if, and only if, this charset supports encoding * @return {@code true} if, and only if, this charset supports encoding
*/ */
public boolean canEncode() { public boolean canEncode() {
return true; return true;
@ -782,7 +782,7 @@ public abstract class Charset
* Convenience method that decodes bytes in this charset into Unicode * Convenience method that decodes bytes in this charset into Unicode
* characters. * characters.
* *
* <p> An invocation of this method upon a charset <tt>cs</tt> returns the * <p> An invocation of this method upon a charset {@code cs} returns the
* same result as the expression * same result as the expression
* *
* <pre> * <pre>
@ -818,7 +818,7 @@ public abstract class Charset
* Convenience method that encodes Unicode characters into bytes in this * Convenience method that encodes Unicode characters into bytes in this
* charset. * charset.
* *
* <p> An invocation of this method upon a charset <tt>cs</tt> returns the * <p> An invocation of this method upon a charset {@code cs} returns the
* same result as the expression * same result as the expression
* *
* <pre> * <pre>
@ -853,7 +853,7 @@ public abstract class Charset
/** /**
* Convenience method that encodes a string into bytes in this charset. * Convenience method that encodes a string into bytes in this charset.
* *
* <p> An invocation of this method upon a charset <tt>cs</tt> returns the * <p> An invocation of this method upon a charset {@code cs} returns the
* same result as the expression * same result as the expression
* *
* <pre> * <pre>
@ -898,7 +898,7 @@ public abstract class Charset
* <p> Two charsets are equal if, and only if, they have the same canonical * <p> Two charsets are equal if, and only if, they have the same canonical
* names. A charset is never equal to any other type of object. </p> * names. A charset is never equal to any other type of object. </p>
* *
* @return <tt>true</tt> if, and only if, this charset is equal to the * @return {@code true} if, and only if, this charset is equal to the
* given object * given object
*/ */
public final boolean equals(Object ob) { public final boolean equals(Object ob) {

View file

@ -46,24 +46,24 @@ import java.util.HashMap;
* processed, or there is insufficient input and additional input is * processed, or there is insufficient input and additional input is
* required. This condition is represented by the unique result object * required. This condition is represented by the unique result object
* {@link #UNDERFLOW}, whose {@link #isUnderflow() isUnderflow} method * {@link #UNDERFLOW}, whose {@link #isUnderflow() isUnderflow} method
* returns <tt>true</tt>. </p></li> * returns {@code true}. </p></li>
* *
* <li><p> <i>Overflow</i> is reported when there is insufficient room * <li><p> <i>Overflow</i> is reported when there is insufficient room
* remaining in the output buffer. This condition is represented by the * remaining in the output buffer. This condition is represented by the
* unique result object {@link #OVERFLOW}, whose {@link #isOverflow() * unique result object {@link #OVERFLOW}, whose {@link #isOverflow()
* isOverflow} method returns <tt>true</tt>. </p></li> * isOverflow} method returns {@code true}. </p></li>
* *
* <li><p> A <i>malformed-input error</i> is reported when a sequence of * <li><p> A <i>malformed-input error</i> is reported when a sequence of
* input units is not well-formed. Such errors are described by instances of * input units is not well-formed. Such errors are described by instances of
* this class whose {@link #isMalformed() isMalformed} method returns * this class whose {@link #isMalformed() isMalformed} method returns
* <tt>true</tt> and whose {@link #length() length} method returns the length * {@code true} and whose {@link #length() length} method returns the length
* of the malformed sequence. There is one unique instance of this class for * of the malformed sequence. There is one unique instance of this class for
* all malformed-input errors of a given length. </p></li> * all malformed-input errors of a given length. </p></li>
* *
* <li><p> An <i>unmappable-character error</i> is reported when a sequence * <li><p> An <i>unmappable-character error</i> is reported when a sequence
* of input units denotes a character that cannot be represented in the * of input units denotes a character that cannot be represented in the
* output charset. Such errors are described by instances of this class * output charset. Such errors are described by instances of this class
* whose {@link #isUnmappable() isUnmappable} method returns <tt>true</tt> and * whose {@link #isUnmappable() isUnmappable} method returns {@code true} and
* whose {@link #length() length} method returns the length of the input * whose {@link #length() length} method returns the length of the input
* sequence denoting the unmappable character. There is one unique instance * sequence denoting the unmappable character. There is one unique instance
* of this class for all unmappable-character errors of a given length. * of this class for all unmappable-character errors of a given length.
@ -71,9 +71,9 @@ import java.util.HashMap;
* *
* </ul> * </ul>
* *
* <p> For convenience, the {@link #isError() isError} method returns <tt>true</tt> * <p> For convenience, the {@link #isError() isError} method returns {@code true}
* for result objects that describe malformed-input and unmappable-character * for result objects that describe malformed-input and unmappable-character
* errors but <tt>false</tt> for those that describe underflow or overflow * errors but {@code false} for those that describe underflow or overflow
* conditions. </p> * conditions. </p>
* *
* *
@ -114,7 +114,7 @@ public class CoderResult {
/** /**
* Tells whether or not this object describes an underflow condition. * Tells whether or not this object describes an underflow condition.
* *
* @return <tt>true</tt> if, and only if, this object denotes underflow * @return {@code true} if, and only if, this object denotes underflow
*/ */
public boolean isUnderflow() { public boolean isUnderflow() {
return (type == CR_UNDERFLOW); return (type == CR_UNDERFLOW);
@ -123,7 +123,7 @@ public class CoderResult {
/** /**
* Tells whether or not this object describes an overflow condition. * Tells whether or not this object describes an overflow condition.
* *
* @return <tt>true</tt> if, and only if, this object denotes overflow * @return {@code true} if, and only if, this object denotes overflow
*/ */
public boolean isOverflow() { public boolean isOverflow() {
return (type == CR_OVERFLOW); return (type == CR_OVERFLOW);
@ -132,7 +132,7 @@ public class CoderResult {
/** /**
* Tells whether or not this object describes an error condition. * Tells whether or not this object describes an error condition.
* *
* @return <tt>true</tt> if, and only if, this object denotes either a * @return {@code true} if, and only if, this object denotes either a
* malformed-input error or an unmappable-character error * malformed-input error or an unmappable-character error
*/ */
public boolean isError() { public boolean isError() {
@ -142,7 +142,7 @@ public class CoderResult {
/** /**
* Tells whether or not this object describes a malformed-input error. * Tells whether or not this object describes a malformed-input error.
* *
* @return <tt>true</tt> if, and only if, this object denotes a * @return {@code true} if, and only if, this object denotes a
* malformed-input error * malformed-input error
*/ */
public boolean isMalformed() { public boolean isMalformed() {
@ -153,7 +153,7 @@ public class CoderResult {
* Tells whether or not this object describes an unmappable-character * Tells whether or not this object describes an unmappable-character
* error. * error.
* *
* @return <tt>true</tt> if, and only if, this object denotes an * @return {@code true} if, and only if, this object denotes an
* unmappable-character error * unmappable-character error
*/ */
public boolean isUnmappable() { public boolean isUnmappable() {
@ -168,7 +168,7 @@ public class CoderResult {
* *
* @throws UnsupportedOperationException * @throws UnsupportedOperationException
* If this object does not describe an error condition, that is, * If this object does not describe an error condition, that is,
* if the {@link #isError() isError} does not return <tt>true</tt> * if the {@link #isError() isError} does not return {@code true}
*/ */
public int length() { public int length() {
if (!isError()) if (!isError())

View file

@ -74,10 +74,10 @@
* *
* <p> Support for new charsets can be made available via the * <p> Support for new charsets can be made available via the
* interface defined in the {@link * interface defined in the {@link
* java.nio.charset.spi.CharsetProvider} class in the <tt>{@link * java.nio.charset.spi.CharsetProvider} class in the {@link
* java.nio.charset.spi}</tt> package. * java.nio.charset.spi} package.
* *
* <p> Unless otherwise noted, passing a <tt>null</tt> argument to a * <p> Unless otherwise noted, passing a {@code null} argument to a
* constructor or method in any class or interface in this package * constructor or method in any class or interface in this package
* will cause a {@link java.lang.NullPointerException * will cause a {@link java.lang.NullPointerException
* NullPointerException} to be thrown. * NullPointerException} to be thrown.

View file

@ -42,13 +42,13 @@ import java.util.Iterator;
* loader}. * loader}.
* *
* <p> A charset provider identifies itself with a provider-configuration file * <p> A charset provider identifies itself with a provider-configuration file
* named <tt>java.nio.charset.spi.CharsetProvider</tt> in the resource * named {@code java.nio.charset.spi.CharsetProvider} in the resource
* directory <tt>META-INF/services</tt>. The file should contain a list of * directory {@code META-INF/services}. The file should contain a list of
* fully-qualified concrete charset-provider class names, one per line. A line * fully-qualified concrete charset-provider class names, one per line. A line
* is terminated by any one of a line feed (<tt>'\n'</tt>), a carriage return * is terminated by any one of a line feed ({@code '\n'}), a carriage return
* (<tt>'\r'</tt>), or a carriage return followed immediately by a line feed. * ({@code '\r'}), or a carriage return followed immediately by a line feed.
* Space and tab characters surrounding each name, as well as blank lines, are * Space and tab characters surrounding each name, as well as blank lines, are
* ignored. The comment character is <tt>'#'</tt> (<tt>'&#92;u0023'</tt>); on * ignored. The comment character is {@code '#'} (<code>'&#92;u0023'</code>); on
* each line all characters following the first comment character are ignored. * each line all characters following the first comment character are ignored.
* The file must be encoded in UTF-8. * The file must be encoded in UTF-8.
* *
@ -83,7 +83,7 @@ public abstract class CharsetProvider {
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("charsetProvider")</tt> * {@link RuntimePermission}{@code ("charsetProvider")}
*/ */
protected CharsetProvider() { protected CharsetProvider() {
this(checkPermission()); this(checkPermission());
@ -107,7 +107,7 @@ public abstract class CharsetProvider {
* a canonical name or an alias * a canonical name or an alias
* *
* @return A charset object for the named charset, * @return A charset object for the named charset,
* or <tt>null</tt> if the named charset * or {@code null} if the named charset
* is not supported by this provider * is not supported by this provider
*/ */
public abstract Charset charsetForName(String charsetName); public abstract Charset charsetForName(String charsetName);

View file

@ -56,5 +56,5 @@ SUPER=UnsupportedOperationException
gen ReadOnlyBufferException " gen ReadOnlyBufferException "
* Unchecked exception thrown when a content-mutation method such as * Unchecked exception thrown when a content-mutation method such as
* <tt>put</tt> or <tt>compact</tt> is invoked upon a read-only buffer." \ * <code>put</code> or <code>compact</code> is invoked upon a read-only buffer." \
-1210063976496234090L -1210063976496234090L

View file

@ -202,7 +202,7 @@ public abstract class FileSystem
* *
* <p> In the case of the default provider, and a security manager is * <p> In the case of the default provider, and a security manager is
* installed, the security manager is invoked to check {@link * installed, the security manager is invoked to check {@link
* RuntimePermission}<tt>("getFileStoreAttributes")</tt>. If denied, then * RuntimePermission}{@code ("getFileStoreAttributes")}. If denied, then
* no file stores are returned by the iterator. In addition, the security * no file stores are returned by the iterator. In addition, the security
* manager's {@link SecurityManager#checkRead(String)} method is invoked to * manager's {@link SecurityManager#checkRead(String)} method is invoked to
* check read access to the file store's <em>top-most</em> directory. If * check read access to the file store's <em>top-most</em> directory. If
@ -334,19 +334,19 @@ public abstract class FileSystem
* character extension</td> * character extension</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><tt>&#47;home&#47;*&#47;*</tt> * <td><code>&#47;home&#47;*&#47;*</code>
* <td>Matches <tt>&#47;home&#47;gus&#47;data</tt> on UNIX platforms</td> * <td>Matches <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><tt>&#47;home&#47;**</tt> * <td><code>&#47;home&#47;**</code>
* <td>Matches <tt>&#47;home&#47;gus</tt> and * <td>Matches <code>&#47;home&#47;gus</code> and
* <tt>&#47;home&#47;gus&#47;data</tt> on UNIX platforms</td> * <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><tt>C:&#92;&#92;*</tt> * <td><code>C:&#92;&#92;*</code>
* <td>Matches <tt>C:&#92;foo</tt> and <tt>C:&#92;bar</tt> on the Windows * <td>Matches <code>C:&#92;foo</code> and <code>C:&#92;bar</code> on the Windows
* platform (note that the backslash is escaped; as a string literal in the * platform (note that the backslash is escaped; as a string literal in the
* Java Language the pattern would be <tt>"C:&#92;&#92;&#92;&#92;*"</tt>) </td> * Java Language the pattern would be <code>"C:&#92;&#92;&#92;&#92;*"</code>) </td>
* </tr> * </tr>
* *
* </table> * </table>
@ -390,7 +390,7 @@ public abstract class FileSystem
* character is used to separate the subpatterns. Groups cannot be nested. * character is used to separate the subpatterns. Groups cannot be nested.
* </p></li> * </p></li>
* *
* <li><p> Leading period<tt>&#47;</tt>dot characters in file name are * <li><p> Leading period<code>&#47;</code>dot characters in file name are
* treated as regular characters in match operations. For example, * treated as regular characters in match operations. For example,
* the {@code "*"} glob pattern matches file name {@code ".login"}. * the {@code "*"} glob pattern matches file name {@code ".login"}.
* The {@link Files#isHidden} method may be used to test whether a file * The {@link Files#isHidden} method may be used to test whether a file

View file

@ -1033,7 +1033,7 @@ public final class Files {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager * In the case of the default provider, and a security manager
* is installed, it denies {@link LinkPermission}<tt>("symbolic")</tt> * is installed, it denies {@link LinkPermission}{@code ("symbolic")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the path of the symbolic link. * method denies write access to the path of the symbolic link.
*/ */
@ -1078,7 +1078,7 @@ public final class Files {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager * In the case of the default provider, and a security manager
* is installed, it denies {@link LinkPermission}<tt>("hard")</tt> * is installed, it denies {@link LinkPermission}{@code ("hard")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to either the link or the * method denies write access to either the link or the
* existing file. * existing file.
@ -1455,8 +1455,8 @@ public final class Files {
* In the case of the default provider, and a security manager is * In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkRead(String) checkRead} * installed, the {@link SecurityManager#checkRead(String) checkRead}
* method is invoked to check read access to the file, and in * method is invoked to check read access to the file, and in
* addition it checks {@link RuntimePermission}<tt> * addition it checks
* ("getFileStoreAttributes")</tt> * {@link RuntimePermission}{@code ("getFileStoreAttributes")}
*/ */
public static FileStore getFileStore(Path path) throws IOException { public static FileStore getFileStore(Path path) throws IOException {
return provider(path).getFileStore(path); return provider(path).getFileStore(path);
@ -1995,7 +1995,8 @@ public final class Files {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, and it denies
* {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkRead(String) checkRead} method * or its {@link SecurityManager#checkRead(String) checkRead} method
* denies read access to the file. * denies read access to the file.
*/ */
@ -2032,7 +2033,8 @@ public final class Files {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager is * In the case of the default provider, and a security manager is
* installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, it denies
* {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the file. * method denies write access to the file.
*/ */
@ -2069,7 +2071,8 @@ public final class Files {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager is * In the case of the default provider, and a security manager is
* installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, it denies
* {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkRead(String) checkRead} method * or its {@link SecurityManager#checkRead(String) checkRead} method
* denies read access to the file. * denies read access to the file.
*/ */
@ -2112,7 +2115,8 @@ public final class Files {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager is * In the case of the default provider, and a security manager is
* installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, it denies
* {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the file. * method denies write access to the file.
* *

View file

@ -46,13 +46,13 @@ public class InvalidPathException
* @param input the input string * @param input the input string
* @param reason a string explaining why the input was rejected * @param reason a string explaining why the input was rejected
* @param index the index at which the error occurred, * @param index the index at which the error occurred,
* or <tt>-1</tt> if the index is not known * or {@code -1} if the index is not known
* *
* @throws NullPointerException * @throws NullPointerException
* if either the input or reason strings are <tt>null</tt> * if either the input or reason strings are {@code null}
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* if the error index is less than <tt>-1</tt> * if the error index is less than {@code -1}
*/ */
public InvalidPathException(String input, String reason, int index) { public InvalidPathException(String input, String reason, int index) {
super(reason); super(reason);
@ -66,13 +66,13 @@ public class InvalidPathException
/** /**
* Constructs an instance from the given input string and reason. The * Constructs an instance from the given input string and reason. The
* resulting object will have an error index of <tt>-1</tt>. * resulting object will have an error index of {@code -1}.
* *
* @param input the input string * @param input the input string
* @param reason a string explaining why the input was rejected * @param reason a string explaining why the input was rejected
* *
* @throws NullPointerException * @throws NullPointerException
* if either the input or reason strings are <tt>null</tt> * if either the input or reason strings are {@code null}
*/ */
public InvalidPathException(String input, String reason) { public InvalidPathException(String input, String reason) {
this(input, reason, -1); this(input, reason, -1);
@ -98,7 +98,7 @@ public class InvalidPathException
/** /**
* Returns an index into the input string of the position at which the * Returns an index into the input string of the position at which the
* error occurred, or <tt>-1</tt> if this position is not known. * error occurred, or {@code -1} if this position is not known.
* *
* @return the error index * @return the error index
*/ */
@ -109,8 +109,8 @@ public class InvalidPathException
/** /**
* Returns a string describing the error. The resulting string * Returns a string describing the error. The resulting string
* consists of the reason string followed by a colon character * consists of the reason string followed by a colon character
* (<tt>':'</tt>), a space, and the input string. If the error index is * ({@code ':'}), a space, and the input string. If the error index is
* defined then the string <tt>" at index "</tt> followed by the index, in * defined then the string {@code " at index "} followed by the index, in
* decimal, is inserted after the reason string and before the colon * decimal, is inserted after the reason string and before the colon
* character. * character.
* *

View file

@ -480,7 +480,8 @@ public interface Path
* <p> For any two {@link #normalize normalized} paths <i>p</i> and * <p> For any two {@link #normalize normalized} paths <i>p</i> and
* <i>q</i>, where <i>q</i> does not have a root component, * <i>q</i>, where <i>q</i> does not have a root component,
* <blockquote> * <blockquote>
* <i>p</i><tt>.relativize(</tt><i>p</i><tt>.resolve(</tt><i>q</i><tt>)).equals(</tt><i>q</i><tt>)</tt> * <i>p</i>{@code .relativize(}<i>p</i>
* {@code .resolve(}<i>q</i>{@code )).equals(}<i>q</i>{@code )}
* </blockquote> * </blockquote>
* *
* <p> When symbolic links are supported, then whether the resulting path, * <p> When symbolic links are supported, then whether the resulting path,
@ -525,9 +526,9 @@ public interface Path
* <p> The default provider provides a similar <em>round-trip</em> guarantee * <p> The default provider provides a similar <em>round-trip</em> guarantee
* to the {@link java.io.File} class. For a given {@code Path} <i>p</i> it * to the {@link java.io.File} class. For a given {@code Path} <i>p</i> it
* is guaranteed that * is guaranteed that
* <blockquote><tt> * <blockquote>
* {@link Paths#get(URI) Paths.get}(</tt><i>p</i><tt>.toUri()).equals(</tt><i>p</i> * {@link Paths#get(URI) Paths.get}{@code (}<i>p</i>{@code .toUri()).equals(}<i>p</i>
* <tt>.{@link #toAbsolutePath() toAbsolutePath}())</tt> * {@code .}{@link #toAbsolutePath() toAbsolutePath}{@code ())}
* </blockquote> * </blockquote>
* so long as the original {@code Path}, the {@code URI}, and the new {@code * so long as the original {@code Path}, the {@code URI}, and the new {@code
* Path} are all created in (possibly different invocations of) the same * Path} are all created in (possibly different invocations of) the same

View file

@ -103,9 +103,9 @@ public final class Paths {
* <p> The default provider provides a similar <em>round-trip</em> guarantee * <p> The default provider provides a similar <em>round-trip</em> guarantee
* to the {@link java.io.File} class. For a given {@code Path} <i>p</i> it * to the {@link java.io.File} class. For a given {@code Path} <i>p</i> it
* is guaranteed that * is guaranteed that
* <blockquote><tt> * <blockquote>{@code
* Paths.get(</tt><i>p</i><tt>.{@link Path#toUri() toUri}()).equals(</tt> * Paths.get(}<i>p</i>{@code .}{@link Path#toUri() toUri}{@code ()).equals(}
* <i>p</i><tt>.{@link Path#toAbsolutePath() toAbsolutePath}())</tt> * <i>p</i>{@code .}{@link Path#toAbsolutePath() toAbsolutePath}{@code ())}
* </blockquote> * </blockquote>
* so long as the original {@code Path}, the {@code URI}, and the new {@code * so long as the original {@code Path}, the {@code URI}, and the new {@code
* Path} are all created in (possibly different invocations of) the same * Path} are all created in (possibly different invocations of) the same

View file

@ -165,7 +165,7 @@ public interface AclFileAttributeView
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, and it denies {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkRead(String) checkRead} method * or its {@link SecurityManager#checkRead(String) checkRead} method
* denies read access to the file. * denies read access to the file.
*/ */
@ -201,7 +201,7 @@ public interface AclFileAttributeView
* if an I/O error occurs or the ACL is invalid * if an I/O error occurs or the ACL is invalid
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, it denies {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the file. * method denies write access to the file.
*/ */

View file

@ -69,7 +69,7 @@ public interface FileOwnerAttributeView
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link * installed, and it denies {@link
* RuntimePermission}<tt>("accessUserInformation")</tt> or its * RuntimePermission}{@code ("accessUserInformation")} or its
* {@link SecurityManager#checkRead(String) checkRead} method * {@link SecurityManager#checkRead(String) checkRead} method
* denies read access to the file. * denies read access to the file.
*/ */
@ -93,7 +93,7 @@ public interface FileOwnerAttributeView
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link * installed, and it denies {@link
* RuntimePermission}<tt>("accessUserInformation")</tt> or its * RuntimePermission}{@code ("accessUserInformation")} or its
* {@link SecurityManager#checkWrite(String) checkWrite} method * {@link SecurityManager#checkWrite(String) checkWrite} method
* denies write access to the file. * denies write access to the file.
*/ */

View file

@ -149,7 +149,8 @@ public interface PosixFileAttributeView
* @throws IOException {@inheritDoc} * @throws IOException {@inheritDoc}
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, and it denies
* {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkRead(String) checkRead} method * or its {@link SecurityManager#checkRead(String) checkRead} method
* denies read access to the file. * denies read access to the file.
*/ */
@ -169,7 +170,8 @@ public interface PosixFileAttributeView
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, and it denies
* {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the file. * method denies write access to the file.
*/ */
@ -185,7 +187,8 @@ public interface PosixFileAttributeView
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager is * In the case of the default provider, and a security manager is
* installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt> * installed, it denies
* {@link RuntimePermission}{@code ("accessUserInformation")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the file. * method denies write access to the file.
*/ */

View file

@ -89,7 +89,7 @@ public interface UserDefinedFileAttributeView
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link * installed, and it denies {@link
* RuntimePermission}<tt>("accessUserDefinedAttributes")</tt> * RuntimePermission}{@code ("accessUserDefinedAttributes")}
* or its {@link SecurityManager#checkRead(String) checkRead} method * or its {@link SecurityManager#checkRead(String) checkRead} method
* denies read access to the file. * denies read access to the file.
*/ */
@ -110,7 +110,7 @@ public interface UserDefinedFileAttributeView
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link * installed, and it denies {@link
* RuntimePermission}<tt>("accessUserDefinedAttributes")</tt> * RuntimePermission}{@code ("accessUserDefinedAttributes")}
* or its {@link SecurityManager#checkRead(String) checkRead} method * or its {@link SecurityManager#checkRead(String) checkRead} method
* denies read access to the file. * denies read access to the file.
*/ */
@ -156,7 +156,7 @@ public interface UserDefinedFileAttributeView
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link * installed, and it denies {@link
* RuntimePermission}<tt>("accessUserDefinedAttributes")</tt> * RuntimePermission}{@code ("accessUserDefinedAttributes")}
* or its {@link SecurityManager#checkRead(String) checkRead} method * or its {@link SecurityManager#checkRead(String) checkRead} method
* denies read access to the file. * denies read access to the file.
* *
@ -206,7 +206,7 @@ public interface UserDefinedFileAttributeView
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link * installed, and it denies {@link
* RuntimePermission}<tt>("accessUserDefinedAttributes")</tt> * RuntimePermission}{@code ("accessUserDefinedAttributes")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the file. * method denies write access to the file.
*/ */
@ -223,7 +223,7 @@ public interface UserDefinedFileAttributeView
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, a security manager is * In the case of the default provider, a security manager is
* installed, and it denies {@link * installed, and it denies {@link
* RuntimePermission}<tt>("accessUserDefinedAttributes")</tt> * RuntimePermission}{@code ("accessUserDefinedAttributes")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the file. * method denies write access to the file.
*/ */

View file

@ -72,7 +72,8 @@ public abstract class UserPrincipalLookupService {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager is * In the case of the default provider, and a security manager is
* installed, it checks {@link RuntimePermission}<tt>("lookupUserInformation")</tt> * installed, it checks
* {@link RuntimePermission}{@code ("lookupUserInformation")}
*/ */
public abstract UserPrincipal lookupPrincipalByName(String name) public abstract UserPrincipal lookupPrincipalByName(String name)
throws IOException; throws IOException;
@ -97,7 +98,8 @@ public abstract class UserPrincipalLookupService {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager is * In the case of the default provider, and a security manager is
* installed, it checks {@link RuntimePermission}<tt>("lookupUserInformation")</tt> * installed, it checks
* {@link RuntimePermission}{@code ("lookupUserInformation")}
*/ */
public abstract GroupPrincipal lookupPrincipalByGroupName(String group) public abstract GroupPrincipal lookupPrincipalByGroupName(String group)
throws IOException; throws IOException;

View file

@ -54,7 +54,7 @@ public class UserPrincipalNotFoundException
/** /**
* Returns the user principal name if this exception was created with the * Returns the user principal name if this exception was created with the
* user principal name that was not found, otherwise <tt>null</tt>. * user principal name that was not found, otherwise {@code null}.
* *
* @return the user principal name or {@code null} * @return the user principal name or {@code null}
*/ */

View file

@ -28,23 +28,23 @@
* *
* <blockquote><table cellspacing=1 cellpadding=0 summary="Attribute views"> * <blockquote><table cellspacing=1 cellpadding=0 summary="Attribute views">
* <tr><th align="left">Attribute views</th><th align="left">Description</th></tr> * <tr><th align="left">Attribute views</th><th align="left">Description</th></tr>
* <tr><td valign=top><tt><i>{@link java.nio.file.attribute.AttributeView}</i></tt></td> * <tr><td valign=top><i>{@link java.nio.file.attribute.AttributeView}</i></td>
* <td>Can read or update non-opaque values associated with objects in a file system</td></tr> * <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
* <td>Can read or update file attributes</td></tr> * <td>Can read or update file attributes</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update a basic set of file attributes</td></tr> * <td>Can read or update a basic set of file attributes</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update POSIX defined file attributes</td></tr> * <td>Can read or update POSIX defined file attributes</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update FAT file attributes</td></tr> * <td>Can read or update FAT file attributes</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update the owner of a file</td></tr> * <td>Can read or update the owner of a file</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update Access Control Lists</td></tr> * <td>Can read or update Access Control Lists</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td>
* <td>Can read or update user-defined file attributes</td></tr> * <td>Can read or update user-defined file attributes</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></tt></td> * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
* <td>Can read or update file system attributes</td></tr> * <td>Can read or update file system attributes</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -100,7 +100,7 @@
* </ul> * </ul>
* *
* *
* <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in any class or interface in this package will cause a {@link * or method in any class or interface in this package will cause a {@link
* java.lang.NullPointerException NullPointerException} to be thrown. * java.lang.NullPointerException NullPointerException} to be thrown.
* *

View file

@ -102,7 +102,7 @@ public abstract class FileSystemProvider {
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("fileSystemProvider")</tt> * {@link RuntimePermission}{@code ("fileSystemProvider")}
*/ */
protected FileSystemProvider() { protected FileSystemProvider() {
this(checkPermission()); this(checkPermission());
@ -644,7 +644,7 @@ public abstract class FileSystemProvider {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager * In the case of the default provider, and a security manager
* is installed, it denies {@link LinkPermission}<tt>("symbolic")</tt> * is installed, it denies {@link LinkPermission}{@code ("symbolic")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to the path of the symbolic link. * method denies write access to the path of the symbolic link.
*/ */
@ -677,7 +677,7 @@ public abstract class FileSystemProvider {
* if an I/O error occurs * if an I/O error occurs
* @throws SecurityException * @throws SecurityException
* In the case of the default provider, and a security manager * In the case of the default provider, and a security manager
* is installed, it denies {@link LinkPermission}<tt>("hard")</tt> * is installed, it denies {@link LinkPermission}{@code ("hard")}
* or its {@link SecurityManager#checkWrite(String) checkWrite} * or its {@link SecurityManager#checkWrite(String) checkWrite}
* method denies write access to either the link or the * method denies write access to either the link or the
* existing file. * existing file.
@ -902,8 +902,8 @@ public abstract class FileSystemProvider {
* In the case of the default provider, and a security manager is * In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkRead(String) checkRead} * installed, the {@link SecurityManager#checkRead(String) checkRead}
* method is invoked to check read access to the file, and in * method is invoked to check read access to the file, and in
* addition it checks {@link RuntimePermission}<tt> * addition it checks
* ("getFileStoreAttributes")</tt> * {@link RuntimePermission}{@code ("getFileStoreAttributes")}
*/ */
public abstract FileStore getFileStore(Path path) throws IOException; public abstract FileStore getFileStore(Path path) throws IOException;

View file

@ -62,7 +62,7 @@ public abstract class FileTypeDetector {
* *
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link RuntimePermission}<tt>("fileTypeDetector")</tt> * {@link RuntimePermission}{@code ("fileTypeDetector")}
*/ */
protected FileTypeDetector() { protected FileTypeDetector() {
this(checkPermission()); this(checkPermission());

View file

@ -24,12 +24,12 @@
*/ */
/** /**
* Service-provider classes for the <tt>{@link java.nio.file}</tt> package. * Service-provider classes for the {@link java.nio.file} package.
* *
* <p> Only developers who are defining new file system providers or file type * <p> Only developers who are defining new file system providers or file type
* detectors should need to make direct use of this package. </p> * detectors should need to make direct use of this package. </p>
* *
* <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in any class or interface in this package will cause a {@link * or method in any class or interface in this package will cause a {@link
* java.lang.NullPointerException NullPointerException} to be thrown. * java.lang.NullPointerException NullPointerException} to be thrown.
* *

View file

@ -52,7 +52,7 @@
* *
* </ul> * </ul>
* *
* <p> The <tt>java.nio</tt> package defines the buffer classes, which * <p> The {@code java.nio} package defines the buffer classes, which
* are used throughout the NIO APIs. The charset API is defined in * are used throughout the NIO APIs. The charset API is defined in
* the {@link java.nio.charset} package, and the channel and selector * the {@link java.nio.charset} package, and the channel and selector
* APIs are defined in the {@link java.nio.channels} package. Each of * APIs are defined in the {@link java.nio.channels} package. Each of
@ -64,26 +64,26 @@
* *
* <blockquote><table cellspacing=1 cellpadding=0 summary="Description of the various buffers"> * <blockquote><table cellspacing=1 cellpadding=0 summary="Description of the various buffers">
* <tr><th align="left">Buffers</th><th align="left">Description</th></tr> * <tr><th align="left">Buffers</th><th align="left">Description</th></tr>
* <tr><td valign=top><tt>{@link java.nio.Buffer}</tt></td> * <tr><td valign=top>{@link java.nio.Buffer}</td>
* <td>Position, limit, and capacity; * <td>Position, limit, and capacity;
* <br>clear, flip, rewind, and mark/reset</td></tr> * <br>clear, flip, rewind, and mark/reset</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.ByteBuffer}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.ByteBuffer}</td>
* <td>Get/put, compact, views; allocate,&nbsp;wrap</td></tr> * <td>Get/put, compact, views; allocate,&nbsp;wrap</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</tt></td> * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
* <td>A byte buffer mapped to a file</td></tr> * <td>A byte buffer mapped to a file</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.CharBuffer}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.CharBuffer}</td>
* <td>Get/put, compact; allocate,&nbsp;wrap</td></tr> * <td>Get/put, compact; allocate,&nbsp;wrap</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.FloatBuffer}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.FloatBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.IntBuffer}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.IntBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.LongBuffer}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.LongBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.ShortBuffer}</tt></td> * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.ShortBuffer}</td>
* <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr> * <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
* <tr><td valign=top><tt>{@link java.nio.ByteOrder}</tt></td> * <tr><td valign=top>{@link java.nio.ByteOrder}</td>
* <td>Typesafe enumeration for&nbsp;byte&nbsp;orders</td></tr> * <td>Typesafe enumeration for&nbsp;byte&nbsp;orders</td></tr>
* </table></blockquote> * </table></blockquote>
* *
@ -129,7 +129,7 @@
* *
* </ul> * </ul>
* *
* <p> Unless otherwise noted, passing a <tt>null</tt> argument to a * <p> Unless otherwise noted, passing a {@code null} argument to a
* constructor or method in any class or interface in this package * constructor or method in any class or interface in this package
* will cause a {@link java.lang.NullPointerException * will cause a {@link java.lang.NullPointerException
* NullPointerException} to be thrown. * NullPointerException} to be thrown.

View file

@ -29,11 +29,11 @@ import java.nio.ByteBuffer;
import java.io.IOException; import java.io.IOException;
/** This is an interface to adapt existing APIs to use {@link java.nio.ByteBuffer /** This is an interface to adapt existing APIs to use {@link java.nio.ByteBuffer
* <tt>ByteBuffers</tt>} as the underlying * ByteBuffers} as the underlying
* data format. Only the initial producer and final consumer have to be changed.<p> * data format. Only the initial producer and final consumer have to be changed.<p>
* *
* For example, the Zip/Jar code supports {@link java.io.InputStream <tt>InputStreams</tt>}. * For example, the Zip/Jar code supports {@link java.io.InputStream InputStreams}.
* To make the Zip code use {@link java.nio.MappedByteBuffer <tt>MappedByteBuffers</tt>} as * To make the Zip code use {@link java.nio.MappedByteBuffer MappedByteBuffers} as
* the underlying data structure, it can create a class of InputStream that wraps the ByteBuffer, * the underlying data structure, it can create a class of InputStream that wraps the ByteBuffer,
* and implements the ByteBuffered interface. A co-operating class several layers * and implements the ByteBuffered interface. A co-operating class several layers
* away can ask the InputStream if it is an instance of ByteBuffered, then * away can ask the InputStream if it is an instance of ByteBuffered, then
@ -42,12 +42,12 @@ import java.io.IOException;
public interface ByteBuffered { public interface ByteBuffered {
/** /**
* Returns the <tt>ByteBuffer</tt> behind this object, if this particular * Returns the {@code ByteBuffer} behind this object, if this particular
* instance has one. An implementation of <tt>getByteBuffer()</tt> is allowed * instance has one. An implementation of {@code getByteBuffer()} is allowed
* to return <tt>null</tt> for any reason. * to return {@code null} for any reason.
* *
* @return The <tt>ByteBuffer</tt>, if this particular instance has one, * @return The {@code ByteBuffer}, if this particular instance has one,
* or <tt>null</tt> otherwise. * or {@code null} otherwise.
* *
* @throws IOException * @throws IOException
* If the ByteBuffer is no longer valid. * If the ByteBuffer is no longer valid.

View file

@ -36,14 +36,14 @@ class AllocatedNativeObject // package-private
{ {
/** /**
* Allocates a memory area of at least <tt>size</tt> bytes outside of the * Allocates a memory area of at least {@code size} bytes outside of the
* Java heap and creates a native object for that area. * Java heap and creates a native object for that area.
* *
* @param size * @param size
* Number of bytes to allocate * Number of bytes to allocate
* *
* @param pageAligned * @param pageAligned
* If <tt>true</tt> then the area will be aligned on a hardware * If {@code true} then the area will be aligned on a hardware
* page boundary * page boundary
* *
* @throws OutOfMemoryError * @throws OutOfMemoryError

View file

@ -538,11 +538,11 @@ public abstract class SctpChannel
* {@link java.io.IOException} to be thrown. * {@link java.io.IOException} to be thrown.
* *
* <P> If this channel is already connected then this method will not block * <P> If this channel is already connected then this method will not block
* and will immediately return <tt>true</tt>. If this channel is in * and will immediately return {@code true}. If this channel is in
* non-blocking mode then this method will return <tt>false</tt> if the * non-blocking mode then this method will return {@code false} if the
* connection process is not yet complete. If this channel is in blocking * connection process is not yet complete. If this channel is in blocking
* mode then this method will block until the connection either completes * mode then this method will block until the connection either completes
* or fails, and will always either return <tt>true</tt> or throw a checked * or fails, and will always either return {@code true} or throw a checked
* exception describing the failure. * exception describing the failure.
* *
* <P> This method may be invoked at any time. If a {@link #send send} or {@link #receive receive} * <P> This method may be invoked at any time. If a {@link #send send} or {@link #receive receive}
@ -711,9 +711,9 @@ public abstract class SctpChannel
* Returns an operation set identifying this channel's supported operations. * Returns an operation set identifying this channel's supported operations.
* *
* <P> SCTP channels support connecting, reading, and writing, so this * <P> SCTP channels support connecting, reading, and writing, so this
* method returns <tt>(</tt>{@link SelectionKey#OP_CONNECT} * method returns {@code (}{@link SelectionKey#OP_CONNECT}
* <tt>|</tt>&nbsp;{@link SelectionKey#OP_READ} <tt>|</tt>&nbsp;{@link * {@code |}&nbsp;{@link SelectionKey#OP_READ} {@code |}&nbsp;{@link
* SelectionKey#OP_WRITE}<tt>)</tt>. </p> * SelectionKey#OP_WRITE}{@code )}.
* *
* @return The valid-operation set * @return The valid-operation set
*/ */