From f119cf251a2c3f3ffe7e044c8862f01af16f2eba Mon Sep 17 00:00:00 2001
From: alanb There is one subclass of this class for each non-boolean primitive type.
*
*
- * Each subclass of this class defines two categories of get and
* put operations: A buffer's mark is the index to which its position will be reset
* when the {@link #reset reset} method is invoked. The mark is not always
@@ -89,7 +89,7 @@ import java.util.Spliterator;
* {@link InvalidMarkException} to be thrown.
*
*
- * The following invariant holds for the mark, position, limit, and
* capacity values:
@@ -109,7 +109,7 @@ import java.util.Spliterator;
* to zero.
*
*
- * In addition to methods for accessing the position, limit, and capacity
* values and for marking and resetting, this class also defines the following
@@ -132,7 +132,7 @@ import java.util.Spliterator;
*
*
*
- * Every buffer is readable, but not every buffer is writable. The
* mutation methods of each buffer class are specified as optional
@@ -143,14 +143,14 @@ import java.util.Spliterator;
* {@link #isReadOnly isReadOnly} method.
*
*
- * Buffers are not safe for use by multiple concurrent threads. If a
* buffer is to be used by more than one thread then access to the buffer
* should be controlled by appropriate synchronization.
*
*
- * Methods in this class that do not otherwise have a value to return are
* specified to return the buffer upon which they are invoked. This allows
diff --git a/src/share/classes/java/nio/MappedByteBuffer.java b/src/share/classes/java/nio/MappedByteBuffer.java
index 1d26276f1..25aa60e0b 100644
--- a/src/share/classes/java/nio/MappedByteBuffer.java
+++ b/src/share/classes/java/nio/MappedByteBuffer.java
@@ -45,7 +45,7 @@ import sun.misc.Unsafe;
* this program or another. Whether or not such changes occur, and when they
* occur, is operating-system dependent and therefore unspecified.
*
- * All or part of a mapped byte buffer may become
+ * All or part of a mapped byte buffer may become
* inaccessible at any time, for example if the mapped file is truncated. An
* attempt to access an inaccessible region of a mapped byte buffer will not
* change the buffer's content and will cause an unspecified exception to be
diff --git a/src/share/classes/java/nio/X-Buffer.java.template b/src/share/classes/java/nio/X-Buffer.java.template
index c3037adb4..03a7255c1 100644
--- a/src/share/classes/java/nio/X-Buffer.java.template
+++ b/src/share/classes/java/nio/X-Buffer.java.template
@@ -44,23 +44,23 @@ import java.util.stream.$Streamtype$Stream;
*
* Absolute and relative {@link #get() get Absolute and relative {@link #get() get} and
+ * {@link #put($type$) put} methods that read and write
* single $type$s; Relative {@link #get($type$[]) Relative {@link #get($type$[]) bulk get}
* methods that transfer contiguous sequences of $type$s from this buffer
* into an array; {#if[!byte]?and} Relative {@link #put($type$[]) Relative {@link #put($type$[]) bulk put}
* methods that transfer contiguous sequences of $type$s from $a$
* $type$ array{#if[char]?, a string,} or some other $type$
* buffer into this buffer;{#if[!byte]? and} Absolute and relative {@link #getChar() Absolute and relative {@link #getChar() get}
+ * and {@link #putChar(char) put} methods that read and
* write values of other primitive types, translating them to and from
* sequences of bytes in a particular byte order; Methods for {@link #compact Methods for {@link #compact compacting}, {@link
+ * #duplicate duplicating}, and {@link #slice slicing}
+ * $a$ $type$ buffer. $Type$ buffers can be created either by {@link #allocate
- * allocation A byte buffer is either direct or non-direct. Given a
* direct byte buffer, the Java virtual machine will make a best effort to
@@ -116,7 +116,7 @@ import java.util.stream.$Streamtype$Stream;
* buffers only when they yield a measureable gain in program performance.
*
* A direct byte buffer may also be created by {@link
- * java.nio.channels.FileChannel#map This class defines methods for reading and writing values of all other
* primitive types, except boolean. Primitive values are translated
@@ -156,7 +156,7 @@ import java.util.stream.$Streamtype$Stream;
* parameters of the absolute get and put methods are in terms of
* bytes rather than of the type being read or written.
*
- *
+ *
*
* For access to homogeneous binary data, that is, sequences of values of
* the same type, this class defines methods that can create views of a
@@ -214,7 +214,7 @@ import java.util.stream.$Streamtype$Stream;
#end[char]
*
#if[byte]
- * Methods in this class that do not otherwise have a value to return are
@@ -297,7 +297,7 @@ public abstract class $Type$Buffer
* The new buffer's position will be zero, its limit will be its
* capacity, its mark will be undefined, and each of its elements will be
* initialized to zero. Whether or not it has a
- * {@link #hasArray The new buffer's position will be zero, its limit will be its
* capacity, its mark will be undefined, and each of its elements will be
- * initialized to zero. It will have a {@link #array
- * Transferring data
+ * Transferring data
*
* Marking and resetting
+ * Marking and resetting
*
* Invariants
+ * Invariants
*
* Clearing, flipping, and rewinding
+ * Clearing, flipping, and rewinding
*
* Read-only buffers
+ * Read-only buffers
*
* Thread safety
+ * Thread safety
*
* Invocation chaining
+ * Invocation chaining
*
*
*
- *
*
* } and
- * {@link #put($type$)
put} methods that read and write
+ *
bulk get}
+ *
bulk put}
+ *
get}
- * and {@link #putChar(char)
put} methods that read and
+ *
compacting}, {@link
- * #duplicate
duplicating}, and {@link #slice
- *
slicing} $a$ $type$ buffer.
}, which allocates space for the buffer's
+ * allocation}, which allocates space for the buffer's
*
#if[byte]
*
- * content, or by {@link #wrap($type$[])
wrapping} an
+ * content, or by {@link #wrap($type$[]) wrapping} an
* existing $type$ array {#if[char]?or string} into a buffer.
*
#else[byte]
*
- * content, by {@link #wrap($type$[])
wrapping} an existing
+ * content, by {@link #wrap($type$[]) wrapping} an existing
* $type$ array {#if[char]?or string} into a buffer, or by creating a
* view of an existing byte buffer.
*
@@ -94,8 +94,8 @@ import java.util.stream.$Streamtype$Stream;
*
#if[byte]
*
- *
- *
mapping Direct vs. non-direct buffers
+ *
+ * Direct vs. non-direct buffers
*
* } a region of a file
+ * java.nio.channels.FileChannel#map mapping} a region of a file
* directly into memory. An implementation of the Java platform may optionally
* support the creation of direct byte buffers from native code via JNI. If an
* instance of one of these kinds of buffers refers to an inaccessible region
@@ -129,8 +129,8 @@ import java.util.stream.$Streamtype$Stream;
* that explicit buffer management can be done in performance-critical code.
*
*
- *
- *
backing array Access to binary data
+ *
+ * Access to binary data
*
* Invocation chaining
+ * Invocation chaining
#end[byte]
*
* } is unspecified.
+ * {@link #hasArray backing array} is unspecified.
*
* @param capacity
* The new buffer's capacity, in $type$s
@@ -318,9 +318,8 @@ public abstract class $Type$Buffer
*
*
backing array}, and its {@link #arrayOffset
array
- * offset} will be zero.
+ * initialized to zero. It will have a {@link #array backing array},
+ * and its {@link #arrayOffset array offset} will be zero.
*
* @param capacity
* The new buffer's capacity, in $type$s
@@ -344,8 +343,8 @@ public abstract class $Type$Buffer
* and vice versa. The new buffer's capacity will be
* array.length, its position will be offset, its limit
* will be offset + length, and its mark will be undefined. Its
- * {@link #array
backing array} will be the given array, and
- * its {@link #arrayOffset
array offset} will be zero.
} will be the
- * given array, and its {@link #arrayOffset
array offset} will
+ * undefined. Its {@link #array backing array} will be the
+ * given array, and its {@link #arrayOffset array offset>} will
* be zero.
* src.get(a, 0, a.length)* + * @param dst + * The destination array + * * @return This buffer * * @throws BufferUnderflowException @@ -842,6 +844,9 @@ public abstract class $Type$Buffer *
* dst.put(a, 0, a.length)* + * @param src + * The source array + * * @return This buffer * * @throws BufferOverflowException @@ -930,6 +935,9 @@ public abstract class $Type$Buffer *
* dst.put(s, 0, s.length())* + * @param src + * The source string + * * @return This buffer * * @throws BufferOverflowException @@ -1419,7 +1427,7 @@ public abstract class $Type$Buffer * *
The byte order of $a$ $type$ buffer created by allocation or by
* wrapping an existing $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 view of a byte buffer is that of the
* byte buffer at the moment that the view is created.
The {@code Future} interface defines the {@link Future#cancel cancel} * method to cancel execution. This causes all threads waiting on the result of diff --git a/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java b/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java index 2eb4b5219..ace607323 100644 --- a/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java +++ b/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java @@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit; * default group is not configured then the pooled threads of the default group * are {@link Thread#isDaemon daemon} threads. * - *