提交 09d88156 编写于 作者: C chegar

Merge

...@@ -400,7 +400,8 @@ TOOLS = \ ...@@ -400,7 +400,8 @@ TOOLS = \
# classes that go into jfr.jar # classes that go into jfr.jar
JFR_CLASSES_DIRS= \ JFR_CLASSES_DIRS= \
com/oracle/jrockit/jfr \ com/oracle/jrockit/jfr \
oracle/jrockit/jfr oracle/jrockit/jfr \
jdk/jfr
# classes that go into jsse.jar # classes that go into jsse.jar
JSSE_CLASSES_DIRS = \ JSSE_CLASSES_DIRS = \
...@@ -612,6 +613,7 @@ ifndef JAVASE_EMBEDDED ...@@ -612,6 +613,7 @@ ifndef JAVASE_EMBEDDED
$(ECHO) "oracle/jrockit/jfr/parser/" >> $@ $(ECHO) "oracle/jrockit/jfr/parser/" >> $@
$(ECHO) "oracle/jrockit/jfr/settings/" >> $@ $(ECHO) "oracle/jrockit/jfr/settings/" >> $@
$(ECHO) "oracle/jrockit/jfr/tools/" >> $@ $(ECHO) "oracle/jrockit/jfr/tools/" >> $@
$(ECHO) "jdk/jfr/" >> $@
endif endif
endif endif
......
...@@ -246,7 +246,8 @@ RT_JAR_EXCLUDES += \ ...@@ -246,7 +246,8 @@ RT_JAR_EXCLUDES += \
sun/util/resources/cldr \ sun/util/resources/cldr \
$(LOCALEDATA_INCLUDES) \ $(LOCALEDATA_INCLUDES) \
com/oracle/jrockit/jfr \ com/oracle/jrockit/jfr \
oracle/jrockit/jfr oracle/jrockit/jfr \
jdk/jfr
ifeq ($(OPENJDK_TARGET_OS), macosx) ifeq ($(OPENJDK_TARGET_OS), macosx)
RT_JAR_EXCLUDES += com/sun/nio/sctp \ RT_JAR_EXCLUDES += com/sun/nio/sctp \
...@@ -428,7 +429,8 @@ ifeq ($(ENABLE_JFR), true) ...@@ -428,7 +429,8 @@ ifeq ($(ENABLE_JFR), true)
SRCS:=$(JDK_OUTPUTDIR)/classes,\ SRCS:=$(JDK_OUTPUTDIR)/classes,\
SUFFIXES:=.class .jfc .xsd,\ SUFFIXES:=.class .jfc .xsd,\
INCLUDES:=com/oracle/jrockit/jfr \ INCLUDES:=com/oracle/jrockit/jfr \
oracle/jrockit/jfr,\ oracle/jrockit/jfr \
jdk/jfr,\
JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\ JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
SKIP_METAINF:=true,\ SKIP_METAINF:=true,\
MANIFEST:=$(MAINMANIFEST), \ MANIFEST:=$(MAINMANIFEST), \
......
...@@ -52,7 +52,7 @@ import java.util.Spliterator; ...@@ -52,7 +52,7 @@ import java.util.Spliterator;
* <p> There is one subclass of this class for each non-boolean primitive type. * <p> There is one subclass of this class for each non-boolean primitive type.
* *
* *
* <h4> Transferring data </h4> * <h2> Transferring data </h2>
* *
* <p> Each subclass of this class defines two categories of <i>get</i> and * <p> Each subclass of this class defines two categories of <i>get</i> and
* <i>put</i> operations: </p> * <i>put</i> operations: </p>
...@@ -78,7 +78,7 @@ import java.util.Spliterator; ...@@ -78,7 +78,7 @@ import java.util.Spliterator;
* current position. * current position.
* *
* *
* <h4> Marking and resetting </h4> * <h2> Marking and resetting </h2>
* *
* <p> A buffer's <i>mark</i> is the index to which its position will be reset * <p> A buffer's <i>mark</i> is the index to which its position will be reset
* when the {@link #reset reset} method is invoked. The mark is not always * when the {@link #reset reset} method is invoked. The mark is not always
...@@ -89,7 +89,7 @@ import java.util.Spliterator; ...@@ -89,7 +89,7 @@ import java.util.Spliterator;
* {@link InvalidMarkException} to be thrown. * {@link InvalidMarkException} to be thrown.
* *
* *
* <h4> Invariants </h4> * <h2> Invariants </h2>
* *
* <p> The following invariant holds for the mark, position, limit, and * <p> The following invariant holds for the mark, position, limit, and
* capacity values: * capacity values:
...@@ -109,7 +109,7 @@ import java.util.Spliterator; ...@@ -109,7 +109,7 @@ import java.util.Spliterator;
* to zero. * to zero.
* *
* *
* <h4> Clearing, flipping, and rewinding </h4> * <h2> Clearing, flipping, and rewinding </h2>
* *
* <p> In addition to methods for accessing the position, limit, and capacity * <p> In addition to methods for accessing the position, limit, and capacity
* values and for marking and resetting, this class also defines the following * values and for marking and resetting, this class also defines the following
...@@ -132,7 +132,7 @@ import java.util.Spliterator; ...@@ -132,7 +132,7 @@ import java.util.Spliterator;
* </ul> * </ul>
* *
* *
* <h4> Read-only buffers </h4> * <h2> Read-only buffers </h2>
* *
* <p> Every buffer is readable, but not every buffer is writable. The * <p> Every buffer is readable, but not every buffer is writable. The
* mutation methods of each buffer class are specified as <i>optional * mutation methods of each buffer class are specified as <i>optional
...@@ -143,14 +143,14 @@ import java.util.Spliterator; ...@@ -143,14 +143,14 @@ import java.util.Spliterator;
* {@link #isReadOnly isReadOnly} method. * {@link #isReadOnly isReadOnly} method.
* *
* *
* <h4> Thread safety </h4> * <h2> Thread safety </h2>
* *
* <p> Buffers are not safe for use by multiple concurrent threads. If a * <p> 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 * buffer is to be used by more than one thread then access to the buffer
* should be controlled by appropriate synchronization. * should be controlled by appropriate synchronization.
* *
* *
* <h4> Invocation chaining </h4> * <h2> Invocation chaining </h2>
* *
* <p> Methods in this class that do not otherwise have a value to return are * <p> 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 * specified to return the buffer upon which they are invoked. This allows
......
...@@ -45,7 +45,7 @@ import sun.misc.Unsafe; ...@@ -45,7 +45,7 @@ import sun.misc.Unsafe;
* this program or another. Whether or not such changes occur, and when they * this program or another. Whether or not such changes occur, and when they
* occur, is operating-system dependent and therefore unspecified. * occur, is operating-system dependent and therefore unspecified.
* *
* <a name="inaccess"><p> All or part of a mapped byte buffer may become * <a name="inaccess"></a><p> All or part of a mapped byte buffer may become
* inaccessible at any time, for example if the mapped file is truncated. An * 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 * 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 * change the buffer's content and will cause an unspecified exception to be
......
...@@ -44,23 +44,23 @@ import java.util.stream.$Streamtype$Stream; ...@@ -44,23 +44,23 @@ import java.util.stream.$Streamtype$Stream;
* *
* <ul> * <ul>
* *
* <li><p> Absolute and relative {@link #get() </code><i>get</i><code>} and * <li><p> Absolute and relative {@link #get() <i>get</i>} and
* {@link #put($type$) </code><i>put</i><code>} methods that read and write * {@link #put($type$) <i>put</i>} methods that read and write
* single $type$s; </p></li> * single $type$s; </p></li>
* *
* <li><p> Relative {@link #get($type$[]) </code><i>bulk get</i><code>} * <li><p> Relative {@link #get($type$[]) <i>bulk get</i>}
* methods that transfer contiguous sequences of $type$s from this buffer * methods that transfer contiguous sequences of $type$s from this buffer
* into an array; {#if[!byte]?and}</p></li> * into an array; {#if[!byte]?and}</p></li>
* *
* <li><p> Relative {@link #put($type$[]) </code><i>bulk put</i><code>} * <li><p> Relative {@link #put($type$[]) <i>bulk put</i>}
* methods that transfer contiguous sequences of $type$s from $a$ * methods that transfer contiguous sequences of $type$s from $a$
* $type$ array{#if[char]?,&#32;a&#32;string,} or some other $type$ * $type$ array{#if[char]?,&#32;a&#32;string,} or some other $type$
* buffer into this buffer;{#if[!byte]?&#32;and} </p></li> * buffer into this buffer;{#if[!byte]?&#32;and} </p></li>
* *
#if[byte] #if[byte]
* *
* <li><p> Absolute and relative {@link #getChar() </code><i>get</i><code>} * <li><p> Absolute and relative {@link #getChar() <i>get</i>}
* and {@link #putChar(char) </code><i>put</i><code>} methods that read and * and {@link #putChar(char) <i>put</i>} methods that read and
* write values of other primitive types, translating them to and from * write values of other primitive types, translating them to and from
* sequences of bytes in a particular byte order; </p></li> * sequences of bytes in a particular byte order; </p></li>
* *
...@@ -70,23 +70,23 @@ import java.util.stream.$Streamtype$Stream; ...@@ -70,23 +70,23 @@ import java.util.stream.$Streamtype$Stream;
* *
#end[byte] #end[byte]
* *
* <li><p> Methods for {@link #compact </code>compacting<code>}, {@link * <li><p> Methods for {@link #compact compacting}, {@link
* #duplicate </code>duplicating<code>}, and {@link #slice * #duplicate duplicating}, and {@link #slice slicing}
* </code>slicing<code>} $a$ $type$ buffer. </p></li> * $a$ $type$ buffer. </p></li>
* *
* </ul> * </ul>
* *
* <p> $Type$ buffers can be created either by {@link #allocate * <p> $Type$ buffers can be created either by {@link #allocate
* </code><i>allocation</i><code>}, which allocates space for the buffer's * <i>allocation</i>}, which allocates space for the buffer's
* *
#if[byte] #if[byte]
* *
* content, or by {@link #wrap($type$[]) </code><i>wrapping</i><code>} an * content, or by {@link #wrap($type$[]) <i>wrapping</i>} an
* existing $type$ array {#if[char]?or&#32;string} into a buffer. * existing $type$ array {#if[char]?or&#32;string} into a buffer.
* *
#else[byte] #else[byte]
* *
* content, by {@link #wrap($type$[]) </code><i>wrapping</i><code>} an existing * content, by {@link #wrap($type$[]) <i>wrapping</i>} an existing
* $type$ array {#if[char]?or&#32;string} into a buffer, or by creating a * $type$ array {#if[char]?or&#32;string} into a buffer, or by creating a
* <a href="ByteBuffer.html#views"><i>view</i></a> of an existing byte buffer. * <a href="ByteBuffer.html#views"><i>view</i></a> of an existing byte buffer.
* *
...@@ -94,8 +94,8 @@ import java.util.stream.$Streamtype$Stream; ...@@ -94,8 +94,8 @@ import java.util.stream.$Streamtype$Stream;
* *
#if[byte] #if[byte]
* *
* <a name="direct"> * <a name="direct"></a>
* <h4> Direct <i>vs.</i> non-direct buffers </h4> * <h2> Direct <i>vs.</i> non-direct buffers </h2>
* *
* <p> A byte buffer is either <i>direct</i> or <i>non-direct</i>. Given a * <p> A byte buffer is either <i>direct</i> or <i>non-direct</i>. Given a
* direct byte buffer, the Java virtual machine will make a best effort to * direct byte buffer, the Java virtual machine will make a best effort to
...@@ -116,7 +116,7 @@ import java.util.stream.$Streamtype$Stream; ...@@ -116,7 +116,7 @@ import java.util.stream.$Streamtype$Stream;
* buffers only when they yield a measureable gain in program performance. * buffers only when they yield a measureable gain in program performance.
* *
* <p> A direct byte buffer may also be created by {@link * <p> A direct byte buffer may also be created by {@link
* java.nio.channels.FileChannel#map </code>mapping<code>} 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 * 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 * 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 * instance of one of these kinds of buffers refers to an inaccessible region
...@@ -129,8 +129,8 @@ import java.util.stream.$Streamtype$Stream; ...@@ -129,8 +129,8 @@ import java.util.stream.$Streamtype$Stream;
* that explicit buffer management can be done in performance-critical code. * that explicit buffer management can be done in performance-critical code.
* *
* *
* <a name="bin"> * <a name="bin"></a>
* <h4> Access to binary data </h4> * <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 <tt>boolean</tt>. Primitive values are translated
...@@ -156,7 +156,7 @@ import java.util.stream.$Streamtype$Stream; ...@@ -156,7 +156,7 @@ import java.util.stream.$Streamtype$Stream;
* 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.
* *
* <a name="views"> * <a name="views"></a>
* *
* <p> For access to homogeneous binary data, that is, sequences of values of * <p> For access to homogeneous binary data, that is, sequences of values of
* the same type, this class defines methods that can create <i>views</i> of a * the same type, this class defines methods that can create <i>views</i> of a
...@@ -214,7 +214,7 @@ import java.util.stream.$Streamtype$Stream; ...@@ -214,7 +214,7 @@ import java.util.stream.$Streamtype$Stream;
#end[char] #end[char]
* *
#if[byte] #if[byte]
* <h4> Invocation chaining </h4> * <h2> Invocation chaining </h2>
#end[byte] #end[byte]
* *
* <p> Methods in this class that do not otherwise have a value to return are * <p> Methods in this class that do not otherwise have a value to return are
...@@ -297,7 +297,7 @@ public abstract class $Type$Buffer ...@@ -297,7 +297,7 @@ public abstract class $Type$Buffer
* <p> The new buffer's position will be zero, its limit will be its * <p> 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 * capacity, its mark will be undefined, and each of its elements will be
* initialized to zero. Whether or not it has a * initialized to zero. Whether or not it has a
* {@link #hasArray </code>backing array<code>} is unspecified. * {@link #hasArray backing array} is unspecified.
* *
* @param capacity * @param capacity
* The new buffer's capacity, in $type$s * The new buffer's capacity, in $type$s
...@@ -318,9 +318,8 @@ public abstract class $Type$Buffer ...@@ -318,9 +318,8 @@ public abstract class $Type$Buffer
* *
* <p> The new buffer's position will be zero, its limit will be its * <p> 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 * capacity, its mark will be undefined, and each of its elements will be
* initialized to zero. It will have a {@link #array * initialized to zero. It will have a {@link #array backing array},
* </code>backing array<code>}, and its {@link #arrayOffset </code>array * and its {@link #arrayOffset array offset} will be zero.
* offset<code>} will be zero.
* *
* @param capacity * @param capacity
* The new buffer's capacity, in $type$s * The new buffer's capacity, in $type$s
...@@ -344,8 +343,8 @@ public abstract class $Type$Buffer ...@@ -344,8 +343,8 @@ public abstract class $Type$Buffer
* 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 * <tt>array.length</tt>, its position will be <tt>offset</tt>, its limit
* will be <tt>offset + length</tt>, and its mark will be undefined. Its * will be <tt>offset + length</tt>, and its mark will be undefined. Its
* {@link #array </code>backing array<code>} will be the given array, and * {@link #array backing array} will be the given array, and
* its {@link #arrayOffset </code>array offset<code>} will be zero. </p> * its {@link #arrayOffset array offset} will be zero. </p>
* *
* @param array * @param array
* The array that will back the new buffer * The array that will back the new buffer
...@@ -384,8 +383,8 @@ public abstract class $Type$Buffer ...@@ -384,8 +383,8 @@ public abstract class $Type$Buffer
* 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, and its mark will be * <tt>array.length</tt>, its position will be zero, and its mark will be
* undefined. Its {@link #array </code>backing array<code>} will be the * undefined. Its {@link #array backing array} will be the
* given array, and its {@link #arrayOffset </code>array offset<code>} will * given array, and its {@link #arrayOffset array offset>} will
* be zero. </p> * be zero. </p>
* *
* @param array * @param array
...@@ -703,6 +702,9 @@ public abstract class $Type$Buffer ...@@ -703,6 +702,9 @@ public abstract class $Type$Buffer
* <pre> * <pre>
* src.get(a, 0, a.length) </pre> * src.get(a, 0, a.length) </pre>
* *
* @param dst
* The destination array
*
* @return This buffer * @return This buffer
* *
* @throws BufferUnderflowException * @throws BufferUnderflowException
...@@ -842,6 +844,9 @@ public abstract class $Type$Buffer ...@@ -842,6 +844,9 @@ public abstract class $Type$Buffer
* <pre> * <pre>
* dst.put(a, 0, a.length) </pre> * dst.put(a, 0, a.length) </pre>
* *
* @param src
* The source array
*
* @return This buffer * @return This buffer
* *
* @throws BufferOverflowException * @throws BufferOverflowException
...@@ -930,6 +935,9 @@ public abstract class $Type$Buffer ...@@ -930,6 +935,9 @@ public abstract class $Type$Buffer
* <pre> * <pre>
* dst.put(s, 0, s.length()) </pre> * dst.put(s, 0, s.length()) </pre>
* *
* @param src
* The source string
*
* @return This buffer * @return This buffer
* *
* @throws BufferOverflowException * @throws BufferOverflowException
...@@ -1419,7 +1427,7 @@ public abstract class $Type$Buffer ...@@ -1419,7 +1427,7 @@ public abstract class $Type$Buffer
* *
* <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 <tt>$type$</tt> array is the {@link
* ByteOrder#nativeOrder </code>native order<code>} 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
* byte buffer at the moment that the view is created. </p> * byte buffer at the moment that the view is created. </p>
......
...@@ -87,6 +87,8 @@ public interface AsynchronousByteChannel ...@@ -87,6 +87,8 @@ public interface AsynchronousByteChannel
* initiates a read operation before a previous read operation has * initiates a read operation before a previous read operation has
* completed then a {@link ReadPendingException} will be thrown. * completed then a {@link ReadPendingException} will be thrown.
* *
* @param <A>
* The type of the attachment
* @param dst * @param dst
* The buffer into which bytes are to be transferred * The buffer into which bytes are to be transferred
* @param attachment * @param attachment
...@@ -166,6 +168,8 @@ public interface AsynchronousByteChannel ...@@ -166,6 +168,8 @@ public interface AsynchronousByteChannel
* initiates a write operation before a previous write operation has * initiates a write operation before a previous write operation has
* completed then a {@link WritePendingException} will be thrown. * completed then a {@link WritePendingException} will be thrown.
* *
* @param <A>
* The type of the attachment
* @param src * @param src
* The buffer from which bytes are to be retrieved * The buffer from which bytes are to be retrieved
* @param attachment * @param attachment
......
...@@ -61,7 +61,7 @@ import java.util.concurrent.Future; // javadoc ...@@ -61,7 +61,7 @@ import java.util.concurrent.Future; // javadoc
* may not allow more than one read and one write operation to be outstanding at * may not allow more than one read and one write operation to be outstanding at
* any given time. * any given time.
* *
* <h4>Cancellation</h4> * <h2>Cancellation</h2>
* *
* <p> The {@code Future} interface defines the {@link Future#cancel cancel} * <p> The {@code Future} interface defines the {@link Future#cancel cancel}
* method to cancel execution. This causes all threads waiting on the result of * method to cancel execution. This causes all threads waiting on the result of
......
...@@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit; ...@@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit;
* default group is not configured then the pooled threads of the default group * default group is not configured then the pooled threads of the default group
* are {@link Thread#isDaemon daemon} threads. * are {@link Thread#isDaemon daemon} threads.
* *
* <table border> * <table border summary="System properties">
* <tr> * <tr>
* <th>System property</th> * <th>System property</th>
* <th>Description</th> * <th>Description</th>
...@@ -89,7 +89,7 @@ import java.util.concurrent.TimeUnit; ...@@ -89,7 +89,7 @@ import java.util.concurrent.TimeUnit;
* </tr> * </tr>
* </table> * </table>
* *
* <a name="threading"><h4>Threading</h4></a> * <a name="threading"></a><h2>Threading</h2>
* *
* <p> The completion handler for an I/O operation initiated on a channel bound * <p> The completion handler for an I/O operation initiated on a channel bound
* to a group is guaranteed to be invoked by one of the pooled threads in the * to a group is guaranteed to be invoked by one of the pooled threads in the
...@@ -104,7 +104,7 @@ import java.util.concurrent.TimeUnit; ...@@ -104,7 +104,7 @@ import java.util.concurrent.TimeUnit;
* handler directly by the initiating thread (see {@link * handler directly by the initiating thread (see {@link
* AsynchronousServerSocketChannel#accept(Object,CompletionHandler) accept}). * AsynchronousServerSocketChannel#accept(Object,CompletionHandler) accept}).
* *
* <a name="shutdown"><h4>Shutdown and Termination</h4></a> * <a name="shutdown"></a><h2>Shutdown and Termination</h2>
* *
* <p> The {@link #shutdown() shutdown} method is used to initiate an <em>orderly * <p> The {@link #shutdown() shutdown} method is used to initiate an <em>orderly
* shutdown</em> of a group. An orderly shutdown marks the group as shutdown; * shutdown</em> of a group. An orderly shutdown marks the group as shutdown;
......
...@@ -425,6 +425,8 @@ public abstract class AsynchronousFileChannel ...@@ -425,6 +425,8 @@ public abstract class AsynchronousFileChannel
* They are not suitable for controlling access to a file by multiple * They are not suitable for controlling access to a file by multiple
* threads within the same virtual machine. * threads within the same virtual machine.
* *
* @param <A>
* The type of the attachment
* @param position * @param position
* The position at which the locked region is to start; must be * The position at which the locked region is to start; must be
* non-negative * non-negative
...@@ -473,6 +475,8 @@ public abstract class AsynchronousFileChannel ...@@ -473,6 +475,8 @@ public abstract class AsynchronousFileChannel
* ch.{@link #lock(long,long,boolean,Object,CompletionHandler) lock}(0L, Long.MAX_VALUE, false, att, handler) * ch.{@link #lock(long,long,boolean,Object,CompletionHandler) lock}(0L, Long.MAX_VALUE, false, att, handler)
* </pre> * </pre>
* *
* @param <A>
* The type of the attachment
* @param attachment * @param attachment
* The object to attach to the I/O operation; can be {@code null} * The object to attach to the I/O operation; can be {@code null}
* @param handler * @param handler
...@@ -652,6 +656,8 @@ public abstract class AsynchronousFileChannel ...@@ -652,6 +656,8 @@ public abstract class AsynchronousFileChannel
* If the given file position is greater than the file's size at the time * If the given file position is greater than the file's size at the time
* that the read is attempted then no bytes are read. * that the read is attempted then no bytes are read.
* *
* @param <A>
* The type of the attachment
* @param dst * @param dst
* The buffer into which bytes are to be transferred * The buffer into which bytes are to be transferred
* @param position * @param position
...@@ -716,6 +722,8 @@ public abstract class AsynchronousFileChannel ...@@ -716,6 +722,8 @@ public abstract class AsynchronousFileChannel
* bytes; the values of any bytes between the previous end-of-file and the * bytes; the values of any bytes between the previous end-of-file and the
* newly-written bytes are unspecified. * newly-written bytes are unspecified.
* *
* @param <A>
* The type of the attachment
* @param src * @param src
* The buffer from which bytes are to be transferred * The buffer from which bytes are to be transferred
* @param position * @param position
......
...@@ -52,7 +52,7 @@ import java.io.IOException; ...@@ -52,7 +52,7 @@ import java.io.IOException;
* <p> Socket options are configured using the {@link #setOption(SocketOption,Object) * <p> Socket options are configured using the {@link #setOption(SocketOption,Object)
* setOption} method. Channels of this type support the following options: * setOption} method. Channels of this type support the following options:
* <blockquote> * <blockquote>
* <table border> * <table border summary="Socket options">
* <tr> * <tr>
* <th>Option Name</th> * <th>Option Name</th>
* <th>Description</th> * <th>Description</th>
...@@ -98,6 +98,9 @@ public abstract class AsynchronousServerSocketChannel ...@@ -98,6 +98,9 @@ public abstract class AsynchronousServerSocketChannel
/** /**
* Initializes a new instance of this class. * Initializes a new instance of this class.
*
* @param provider
* The provider that created this channel
*/ */
protected AsynchronousServerSocketChannel(AsynchronousChannelProvider provider) { protected AsynchronousServerSocketChannel(AsynchronousChannelProvider provider) {
this.provider = provider; this.provider = provider;
...@@ -105,6 +108,8 @@ public abstract class AsynchronousServerSocketChannel ...@@ -105,6 +108,8 @@ public abstract class AsynchronousServerSocketChannel
/** /**
* Returns the provider that created this channel. * Returns the provider that created this channel.
*
* @return The provider that created this channel
*/ */
public final AsynchronousChannelProvider provider() { public final AsynchronousChannelProvider provider() {
return provider; return provider;
...@@ -263,6 +268,8 @@ public abstract class AsynchronousServerSocketChannel ...@@ -263,6 +268,8 @@ public abstract class AsynchronousServerSocketChannel
* the connection is closed and the operation completes with a {@link * the connection is closed and the operation completes with a {@link
* SecurityException}. * SecurityException}.
* *
* @param <A>
* The type of the attachment
* @param attachment * @param attachment
* The object to attach to the I/O operation; can be {@code null} * The object to attach to the I/O operation; can be {@code null}
* @param handler * @param handler
......
...@@ -62,7 +62,7 @@ import java.nio.ByteBuffer; ...@@ -62,7 +62,7 @@ import java.nio.ByteBuffer;
* <p> Socket options are configured using the {@link #setOption(SocketOption,Object) * <p> Socket options are configured using the {@link #setOption(SocketOption,Object)
* setOption} method. Asynchronous socket channels support the following options: * setOption} method. Asynchronous socket channels support the following options:
* <blockquote> * <blockquote>
* <table border> * <table border summary="Socket options">
* <tr> * <tr>
* <th>Option Name</th> * <th>Option Name</th>
* <th>Description</th> * <th>Description</th>
...@@ -91,7 +91,7 @@ import java.nio.ByteBuffer; ...@@ -91,7 +91,7 @@ import java.nio.ByteBuffer;
* </blockquote> * </blockquote>
* Additional (implementation specific) options may also be supported. * Additional (implementation specific) options may also be supported.
* *
* <h4>Timeouts</h4> * <h2>Timeouts</h2>
* *
* <p> The {@link #read(ByteBuffer,long,TimeUnit,Object,CompletionHandler) read} * <p> The {@link #read(ByteBuffer,long,TimeUnit,Object,CompletionHandler) read}
* and {@link #write(ByteBuffer,long,TimeUnit,Object,CompletionHandler) write} * and {@link #write(ByteBuffer,long,TimeUnit,Object,CompletionHandler) write}
...@@ -123,6 +123,9 @@ public abstract class AsynchronousSocketChannel ...@@ -123,6 +123,9 @@ public abstract class AsynchronousSocketChannel
/** /**
* Initializes a new instance of this class. * Initializes a new instance of this class.
*
* @param provider
* The provider that created this channel
*/ */
protected AsynchronousSocketChannel(AsynchronousChannelProvider provider) { protected AsynchronousSocketChannel(AsynchronousChannelProvider provider) {
this.provider = provider; this.provider = provider;
...@@ -130,6 +133,8 @@ public abstract class AsynchronousSocketChannel ...@@ -130,6 +133,8 @@ public abstract class AsynchronousSocketChannel
/** /**
* Returns the provider that created this channel. * Returns the provider that created this channel.
*
* @return The provider that created this channel
*/ */
public final AsynchronousChannelProvider provider() { public final AsynchronousChannelProvider provider() {
return provider; return provider;
...@@ -287,6 +292,8 @@ public abstract class AsynchronousSocketChannel ...@@ -287,6 +292,8 @@ public abstract class AsynchronousSocketChannel
* java.lang.SecurityManager#checkConnect checkConnect} method permits * java.lang.SecurityManager#checkConnect checkConnect} method permits
* connecting to the address and port number of the given remote endpoint. * connecting to the address and port number of the given remote endpoint.
* *
* @param <A>
* The type of the attachment
* @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
* @param attachment * @param attachment
...@@ -365,6 +372,8 @@ public abstract class AsynchronousSocketChannel ...@@ -365,6 +372,8 @@ public abstract class AsynchronousSocketChannel
* AsynchronousByteChannel#read(ByteBuffer,Object,CompletionHandler)} * AsynchronousByteChannel#read(ByteBuffer,Object,CompletionHandler)}
* method. * method.
* *
* @param <A>
* The type of the attachment
* @param dst * @param dst
* The buffer into which bytes are to be transferred * The buffer into which bytes are to be transferred
* @param timeout * @param timeout
...@@ -461,6 +470,8 @@ public abstract class AsynchronousSocketChannel ...@@ -461,6 +470,8 @@ public abstract class AsynchronousSocketChannel
* read from the channel will cause an unspecific runtime exception to be * read from the channel will cause an unspecific runtime exception to be
* thrown. * thrown.
* *
* @param <A>
* The type of the attachment
* @param dsts * @param dsts
* The buffers into which bytes are to be transferred * The buffers into which bytes are to be transferred
* @param offset * @param offset
...@@ -520,6 +531,8 @@ public abstract class AsynchronousSocketChannel ...@@ -520,6 +531,8 @@ public abstract class AsynchronousSocketChannel
* AsynchronousByteChannel#write(ByteBuffer,Object,CompletionHandler)} * AsynchronousByteChannel#write(ByteBuffer,Object,CompletionHandler)}
* method. * method.
* *
* @param <A>
* The type of the attachment
* @param src * @param src
* The buffer from which bytes are to be retrieved * The buffer from which bytes are to be retrieved
* @param timeout * @param timeout
...@@ -610,6 +623,8 @@ public abstract class AsynchronousSocketChannel ...@@ -610,6 +623,8 @@ public abstract class AsynchronousSocketChannel
* to write to the channel will cause an unspecific runtime exception to be * to write to the channel will cause an unspecific runtime exception to be
* thrown. * thrown.
* *
* @param <A>
* The type of the attachment
* @param srcs * @param srcs
* The buffers from which bytes are to be retrieved * The buffers from which bytes are to be retrieved
* @param offset * @param offset
......
...@@ -57,7 +57,7 @@ import java.nio.channels.spi.SelectorProvider; ...@@ -57,7 +57,7 @@ import java.nio.channels.spi.SelectorProvider;
* setOption} method. A datagram channel to an Internet Protocol socket supports * setOption} method. A datagram channel to an Internet Protocol socket supports
* the following options: * the following options:
* <blockquote> * <blockquote>
* <table border> * <table border summary="Socket options">
* <tr> * <tr>
* <th>Option Name</th> * <th>Option Name</th>
* <th>Description</th> * <th>Description</th>
...@@ -117,6 +117,9 @@ public abstract class DatagramChannel ...@@ -117,6 +117,9 @@ public abstract class DatagramChannel
/** /**
* Initializes a new instance of this class. * Initializes a new instance of this class.
*
* @param provider
* The provider that created this channel
*/ */
protected DatagramChannel(SelectorProvider provider) { protected DatagramChannel(SelectorProvider provider) {
super(provider); super(provider);
......
...@@ -46,7 +46,7 @@ import java.util.Collections; ...@@ -46,7 +46,7 @@ import java.util.Collections;
* of bytes that can be read and written and whose current {@link #size * of bytes that can be read and written and whose current {@link #size
* <i>size</i>} can be queried. The size of the file increases * <i>size</i>} can be queried. The size of the file increases
* when bytes are written beyond its current size; the size of the file * when bytes are written beyond its current size; the size of the file
* decreases when it is {@link #truncate </code><i>truncated</i><code>}. The * decreases when it is {@link #truncate <i>truncated</i>}. The
* file may also have some associated <i>metadata</i> such as access * file may also have some associated <i>metadata</i> such as access
* permissions, content type, and last-modification time; this class does not * permissions, content type, and last-modification time; this class does not
* define methods for metadata access. * define methods for metadata access.
...@@ -830,7 +830,7 @@ public abstract class FileChannel ...@@ -830,7 +830,7 @@ public abstract class FileChannel
* <p> A region of a file may be mapped into memory in one of three modes: * <p> A region of a file may be mapped into memory in one of three modes:
* </p> * </p>
* *
* <ul type=disc> * <ul>
* *
* <li><p> <i>Read-only:</i> Any attempt to modify the resulting buffer * <li><p> <i>Read-only:</i> Any attempt to modify the resulting buffer
* will cause a {@link java.nio.ReadOnlyBufferException} to be thrown. * will cause a {@link java.nio.ReadOnlyBufferException} to be thrown.
......
...@@ -72,7 +72,7 @@ import java.io.IOException; ...@@ -72,7 +72,7 @@ import java.io.IOException;
* <p> File-lock objects are safe for use by multiple concurrent threads. * <p> File-lock objects are safe for use by multiple concurrent threads.
* *
* *
* <a name="pdep"><h4> Platform dependencies </h4></a> * <a name="pdep"></a><h2> Platform dependencies </h2>
* *
* <p> This file-locking API is intended to map directly to the native locking * <p> This file-locking API is intended to map directly to the native locking
* facility of the underlying operating system. Thus the locks held on a file * facility of the underlying operating system. Thus the locks held on a file
...@@ -261,6 +261,11 @@ public abstract class FileLock implements AutoCloseable { ...@@ -261,6 +261,11 @@ public abstract class FileLock implements AutoCloseable {
/** /**
* Tells whether or not this lock overlaps the given lock range. * Tells whether or not this lock overlaps the given lock range.
* *
* @param position
* The starting position of the lock range
* @param size
* The size of the lock range
*
* @return <tt>true</tt> if, and only if, this lock and the given lock * @return <tt>true</tt> if, and only if, this lock and the given lock
* range overlap by at least one byte * range overlap by at least one byte
*/ */
......
...@@ -71,7 +71,7 @@ import java.net.StandardSocketOptions; // javadoc ...@@ -71,7 +71,7 @@ import java.net.StandardSocketOptions; // javadoc
* MembershipKey#drop drop} method drops membership so that datagrams from the * MembershipKey#drop drop} method drops membership so that datagrams from the
* source address can no longer be received. * source address can no longer be received.
* *
* <h4>Platform dependencies</h4> * <h2>Platform dependencies</h2>
* *
* The multicast implementation is intended to map directly to the native * The multicast implementation is intended to map directly to the native
* multicasting facility. Consequently, the following items should be considered * multicasting facility. Consequently, the following items should be considered
......
...@@ -106,6 +106,8 @@ public interface NetworkChannel ...@@ -106,6 +106,8 @@ public interface NetworkChannel
/** /**
* Sets the value of a socket option. * Sets the value of a socket option.
* *
* @param <T>
* The type of the socket option value
* @param name * @param name
* The socket option * The socket option
* @param value * @param value
...@@ -130,6 +132,8 @@ public interface NetworkChannel ...@@ -130,6 +132,8 @@ public interface NetworkChannel
/** /**
* Returns the value of a socket option. * Returns the value of a socket option.
* *
* @param <T>
* The type of the socket option value
* @param name * @param name
* The socket option * The socket option
* *
......
...@@ -33,10 +33,9 @@ import java.nio.channels.spi.*; ...@@ -33,10 +33,9 @@ import java.nio.channels.spi.*;
* A pair of channels that implements a unidirectional pipe. * A pair of channels that implements a unidirectional pipe.
* *
* <p> A pipe consists of a pair of channels: A writable {@link * <p> A pipe consists of a pair of channels: A writable {@link
* Pipe.SinkChannel </code>sink<code>} channel and a readable {@link * Pipe.SinkChannel sink} channel and a readable {@link Pipe.SourceChannel source}
* Pipe.SourceChannel </code>source<code>} channel. Once some bytes are * channel. Once some bytes are written to the sink channel they can be read
* written to the sink channel they can be read from source channel in exactly * from source channel in exactlyAthe order in which they were written.
* the order in which they were written.
* *
* <p> Whether or not a thread writing bytes to a pipe will block until another * <p> Whether or not a thread writing bytes to a pipe will block until another
* thread reads those bytes, or some previously-written bytes, from the pipe is * thread reads those bytes, or some previously-written bytes, from the pipe is
...@@ -63,6 +62,9 @@ public abstract class Pipe { ...@@ -63,6 +62,9 @@ public abstract class Pipe {
{ {
/** /**
* Constructs a new instance of this class. * Constructs a new instance of this class.
*
* @param provider
* The selector provider
*/ */
protected SourceChannel(SelectorProvider provider) { protected SourceChannel(SelectorProvider provider) {
super(provider); super(provider);
...@@ -94,6 +96,9 @@ public abstract class Pipe { ...@@ -94,6 +96,9 @@ public abstract class Pipe {
{ {
/** /**
* Initializes a new instance of this class. * Initializes a new instance of this class.
*
* @param provider
* The selector provider
*/ */
protected SinkChannel(SelectorProvider provider) { protected SinkChannel(SelectorProvider provider) {
super(provider); super(provider);
......
...@@ -64,8 +64,8 @@ import java.nio.channels.spi.SelectorProvider; ...@@ -64,8 +64,8 @@ import java.nio.channels.spi.SelectorProvider;
* threads. </p> * threads. </p>
* *
* *
* <a name="bm"> * <a name="bm"></a>
* <h4>Blocking mode</h4> * <h2>Blocking mode</h2>
* *
* A selectable channel is either in <i>blocking</i> mode or in * A selectable channel is either in <i>blocking</i> mode or in
* <i>non-blocking</i> mode. In blocking mode, every I/O operation invoked * <i>non-blocking</i> mode. In blocking mode, every I/O operation invoked
...@@ -142,6 +142,9 @@ public abstract class SelectableChannel ...@@ -142,6 +142,9 @@ public abstract class SelectableChannel
* Retrieves the key representing the channel's registration with the given * Retrieves the key representing the channel's registration with the given
* selector. * selector.
* *
* @param sel
* 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 <tt>null</tt> if this channel is not
* currently registered with that selector * currently registered with that selector
......
...@@ -42,7 +42,7 @@ import java.io.IOException; ...@@ -42,7 +42,7 @@ import java.io.IOException;
* next selection operation. The validity of a key may be tested by invoking * next selection operation. The validity of a key may be tested by invoking
* its {@link #isValid isValid} method. * its {@link #isValid isValid} method.
* *
* <a name="opsets"> * <a name="opsets"></a>
* *
* <p> A selection key contains two <i>operation sets</i> represented as * <p> A selection key contains two <i>operation sets</i> represented as
* integer values. Each bit of an operation set denotes a category of * integer values. Each bit of an operation set denotes a category of
......
...@@ -36,13 +36,13 @@ import java.util.Set; ...@@ -36,13 +36,13 @@ import java.util.Set;
* *
* <p> A selector may be created by invoking the {@link #open open} method of * <p> A selector may be created by invoking the {@link #open open} method of
* this class, which will use the system's default {@link * this class, which will use the system's default {@link
* java.nio.channels.spi.SelectorProvider </code>selector provider<code>} to * java.nio.channels.spi.SelectorProvider selector provider} to
* create a new selector. A selector may also be created by invoking the * create a new selector. A selector may also be created by invoking the
* {@link java.nio.channels.spi.SelectorProvider#openSelector openSelector} * {@link java.nio.channels.spi.SelectorProvider#openSelector openSelector}
* method of a custom selector provider. A selector remains open until it is * method of a custom selector provider. A selector remains open until it is
* closed via its {@link #close close} method. * closed via its {@link #close close} method.
* *
* <a name="ks"> * <a name="ks"></a>
* *
* <p> A selectable channel's registration with a selector is represented by a * <p> A selectable channel's registration with a selector is represented by a
* {@link SelectionKey} object. A selector maintains three sets of selection * {@link SelectionKey} object. A selector maintains three sets of selection
...@@ -80,18 +80,18 @@ import java.util.Set; ...@@ -80,18 +80,18 @@ import java.util.Set;
* during the next selection operation, at which time the key will removed from * during the next selection operation, at which time the key will removed from
* all of the selector's key sets. * all of the selector's key sets.
* *
* <a name="sks"><p> Keys are added to the selected-key set by selection * <a name="sks"></a><p> Keys are added to the selected-key set by selection
* operations. A key may be removed directly from the selected-key set by * operations. A key may be removed directly from the selected-key set by
* invoking the set's {@link java.util.Set#remove(java.lang.Object) remove} * invoking the set's {@link java.util.Set#remove(java.lang.Object) remove}
* method or by invoking the {@link java.util.Iterator#remove() remove} method * method or by invoking the {@link java.util.Iterator#remove() remove} method
* of an {@link java.util.Iterator </code>iterator<code>} obtained from the * of an {@link java.util.Iterator iterator} obtained from the
* set. Keys are never removed from the selected-key set in any other way; * set. Keys are never removed from the selected-key set in any other way;
* they are not, in particular, removed as a side effect of selection * they are not, in particular, removed as a side effect of selection
* operations. Keys may not be added directly to the selected-key set. </p> * operations. Keys may not be added directly to the selected-key set. </p>
* *
* *
* <a name="selop"> * <a name="selop"></a>
* <h4>Selection</h4> * <h2>Selection</h2>
* *
* <p> During each selection operation, keys may be added to and removed from a * <p> During each selection operation, keys may be added to and removed from a
* selector's selected-key set and may be removed from its key and * selector's selected-key set and may be removed from its key and
...@@ -111,7 +111,7 @@ import java.util.Set; ...@@ -111,7 +111,7 @@ import java.util.Set;
* operation began. For a channel that is ready for at least one such * operation began. For a channel that is ready for at least one such
* operation, one of the following two actions is performed: </p> * operation, one of the following two actions is performed: </p>
* *
* <ol type=a> * <ol>
* *
* <li><p> If the channel's key is not already in the selected-key set then * <li><p> If the channel's key is not already in the selected-key set then
* it is added to that set and its ready-operation set is modified to * it is added to that set and its ready-operation set is modified to
...@@ -126,7 +126,7 @@ import java.util.Set; ...@@ -126,7 +126,7 @@ import java.util.Set;
* words, the ready set returned by the underlying system is * words, the ready set returned by the underlying system is
* bitwise-disjoined into the key's current ready set. </p></li> * bitwise-disjoined into the key's current ready set. </p></li>
* *
* </ol></li> * </ol>
* *
* If all of the keys in the key set at the start of this step have empty * If all of the keys in the key set at the start of this step have empty
* interest sets then neither the selected-key set nor any of the keys' * interest sets then neither the selected-key set nor any of the keys'
...@@ -142,7 +142,7 @@ import java.util.Set; ...@@ -142,7 +142,7 @@ import java.util.Set;
* difference between the three selection methods. </p> * difference between the three selection methods. </p>
* *
* *
* <h4>Concurrency</h4> * <h2>Concurrency</h2>
* *
* <p> Selectors are themselves safe for use by multiple concurrent threads; * <p> Selectors are themselves safe for use by multiple concurrent threads;
* their key sets, however, are not. * their key sets, however, are not.
...@@ -183,7 +183,7 @@ import java.util.Set; ...@@ -183,7 +183,7 @@ import java.util.Set;
* <p> The {@link #close close} method synchronizes on the selector and all * <p> The {@link #close close} method synchronizes on the selector and all
* three key sets in the same order as in a selection operation. * three key sets in the same order as in a selection operation.
* *
* <a name="ksc"> * <a name="ksc"></a>
* *
* <p> A selector's key and selected-key sets are not, in general, safe for use * <p> A selector's key and selected-key sets are not, in general, safe for use
* by multiple concurrent threads. If such a thread might modify one of these * by multiple concurrent threads. If such a thread might modify one of these
......
...@@ -46,7 +46,7 @@ import java.nio.channels.spi.SelectorProvider; ...@@ -46,7 +46,7 @@ import java.nio.channels.spi.SelectorProvider;
* <p> Socket options are configured using the {@link #setOption(SocketOption,Object) * <p> Socket options are configured using the {@link #setOption(SocketOption,Object)
* setOption} method. Server-socket channels support the following options: * setOption} method. Server-socket channels support the following options:
* <blockquote> * <blockquote>
* <table border> * <table border summary="Socket options">
* <tr> * <tr>
* <th>Option Name</th> * <th>Option Name</th>
* <th>Description</th> * <th>Description</th>
...@@ -78,6 +78,9 @@ public abstract class ServerSocketChannel ...@@ -78,6 +78,9 @@ public abstract class ServerSocketChannel
/** /**
* Initializes a new instance of this class. * Initializes a new instance of this class.
*
* @param provider
* The provider that created this channel
*/ */
protected ServerSocketChannel(SelectorProvider provider) { protected ServerSocketChannel(SelectorProvider provider) {
super(provider); super(provider);
......
...@@ -66,7 +66,7 @@ import java.nio.channels.spi.SelectorProvider; ...@@ -66,7 +66,7 @@ import java.nio.channels.spi.SelectorProvider;
* <p> Socket options are configured using the {@link #setOption(SocketOption,Object) * <p> Socket options are configured using the {@link #setOption(SocketOption,Object)
* setOption} method. Socket channels support the following options: * setOption} method. Socket channels support the following options:
* <blockquote> * <blockquote>
* <table border> * <table border summary="Socket options">
* <tr> * <tr>
* <th>Option Name</th> * <th>Option Name</th>
* <th>Description</th> * <th>Description</th>
...@@ -120,6 +120,9 @@ public abstract class SocketChannel ...@@ -120,6 +120,9 @@ public abstract class SocketChannel
/** /**
* Initializes a new instance of this class. * Initializes a new instance of this class.
*
* @param provider
* The provider that created this channel
*/ */
protected SocketChannel(SelectorProvider provider) { protected SocketChannel(SelectorProvider provider) {
super(provider); super(provider);
...@@ -153,6 +156,8 @@ public abstract class SocketChannel ...@@ -153,6 +156,8 @@ public abstract class SocketChannel
* @param remote * @param remote
* The remote address to which the new channel is to be connected * The remote address to which the new channel is to be connected
* *
* @return A new, and connected, socket channel
*
* @throws AsynchronousCloseException * @throws AsynchronousCloseException
* If another thread closes this channel * If another thread closes this channel
* while the connect operation is in progress * while the connect operation is in progress
......
...@@ -46,7 +46,7 @@ import sun.nio.ch.Interruptible; ...@@ -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: <a name="be"> * <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block:
* *
* <blockquote><pre> * <blockquote><pre>
* boolean completed = false; * boolean completed = false;
......
...@@ -72,6 +72,9 @@ public abstract class AbstractSelectableChannel ...@@ -72,6 +72,9 @@ public abstract class AbstractSelectableChannel
/** /**
* Initializes a new instance of this class. * Initializes a new instance of this class.
*
* @param provider
* The provider that created this channel
*/ */
protected AbstractSelectableChannel(SelectorProvider provider) { protected AbstractSelectableChannel(SelectorProvider provider) {
this.provider = provider; this.provider = provider;
...@@ -251,6 +254,9 @@ public abstract class AbstractSelectableChannel ...@@ -251,6 +254,9 @@ public abstract class AbstractSelectableChannel
* that is blocked in an I/O operation upon this channel to return * that is blocked in an I/O operation upon this channel to return
* immediately, either by throwing an exception or by returning normally. * immediately, either by throwing an exception or by returning normally.
* </p> * </p>
*
* @throws IOException
* If an I/O error occurs
*/ */
protected abstract void implCloseSelectableChannel() throws IOException; protected abstract void implCloseSelectableChannel() throws IOException;
...@@ -299,6 +305,10 @@ public abstract class AbstractSelectableChannel ...@@ -299,6 +305,10 @@ 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
* blocking mode; if <tt>false</tt> then it will be placed
* non-blocking mode
*
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs
*/ */
......
...@@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicBoolean; ...@@ -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: <a name="be"> * <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block:
* *
* <blockquote><pre> * <blockquote><pre>
* try { * try {
...@@ -77,6 +77,9 @@ public abstract class AbstractSelector ...@@ -77,6 +77,9 @@ public abstract class AbstractSelector
/** /**
* Initializes a new instance of this class. * Initializes a new instance of this class.
*
* @param provider
* The provider that created this selector
*/ */
protected AbstractSelector(SelectorProvider provider) { protected AbstractSelector(SelectorProvider provider) {
this.provider = provider; this.provider = provider;
......
...@@ -174,6 +174,8 @@ public abstract class AsynchronousChannelProvider { ...@@ -174,6 +174,8 @@ public abstract class AsynchronousChannelProvider {
* @param threadFactory * @param threadFactory
* The factory to use when creating new threads * The factory to use when creating new threads
* *
* @return A new asynchronous channel group
*
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If {@code nThreads <= 0} * If {@code nThreads <= 0}
* @throws IOException * @throws IOException
...@@ -193,6 +195,8 @@ public abstract class AsynchronousChannelProvider { ...@@ -193,6 +195,8 @@ public abstract class AsynchronousChannelProvider {
* A value {@code >=0} or a negative value for implementation * A value {@code >=0} or a negative value for implementation
* specific default * specific default
* *
* @return A new asynchronous channel group
*
* @throws IOException * @throws IOException
* If an I/O error occurs * If an I/O error occurs
* *
......
...@@ -183,6 +183,9 @@ public abstract class SelectorProvider { ...@@ -183,6 +183,9 @@ public abstract class SelectorProvider {
* Opens a datagram channel. * Opens a datagram channel.
* *
* @return The new channel * @return The new channel
*
* @throws IOException
* If an I/O error occurs
*/ */
public abstract DatagramChannel openDatagramChannel() public abstract DatagramChannel openDatagramChannel()
throws IOException; throws IOException;
...@@ -209,6 +212,9 @@ public abstract class SelectorProvider { ...@@ -209,6 +212,9 @@ public abstract class SelectorProvider {
* Opens a pipe. * Opens a pipe.
* *
* @return The new pipe * @return The new pipe
*
* @throws IOException
* If an I/O error occurs
*/ */
public abstract Pipe openPipe() public abstract Pipe openPipe()
throws IOException; throws IOException;
...@@ -217,6 +223,9 @@ public abstract class SelectorProvider { ...@@ -217,6 +223,9 @@ public abstract class SelectorProvider {
* Opens a selector. * Opens a selector.
* *
* @return The new selector * @return The new selector
*
* @throws IOException
* If an I/O error occurs
*/ */
public abstract AbstractSelector openSelector() public abstract AbstractSelector openSelector()
throws IOException; throws IOException;
...@@ -225,6 +234,9 @@ public abstract class SelectorProvider { ...@@ -225,6 +234,9 @@ public abstract class SelectorProvider {
* Opens a server-socket channel. * Opens a server-socket channel.
* *
* @return The new channel * @return The new channel
*
* @throws IOException
* If an I/O error occurs
*/ */
public abstract ServerSocketChannel openServerSocketChannel() public abstract ServerSocketChannel openServerSocketChannel()
throws IOException; throws IOException;
...@@ -233,6 +245,9 @@ public abstract class SelectorProvider { ...@@ -233,6 +245,9 @@ public abstract class SelectorProvider {
* Opens a socket channel. * Opens a socket channel.
* *
* @return The new channel * @return The new channel
*
* @throws IOException
* If an I/O error occurs
*/ */
public abstract SocketChannel openSocketChannel() public abstract SocketChannel openSocketChannel()
throws IOException; throws IOException;
......
...@@ -163,6 +163,9 @@ public abstract class Charset$Coder$ { ...@@ -163,6 +163,9 @@ public abstract class Charset$Coder$ {
* Initializes a new $coder$. The new $coder$ will have the given * Initializes a new $coder$. The new $coder$ will have the given
* $otypes-per-itype$ and replacement values. * $otypes-per-itype$ and replacement values.
* *
* @param cs
* The charset that created this $coder$
*
* @param average$ItypesPerOtype$ * @param average$ItypesPerOtype$
* A positive float value indicating the expected number of * A positive float value indicating the expected number of
* $otype$s that will be produced for each input $itype$ * $otype$s that will be produced for each input $itype$
...@@ -209,6 +212,9 @@ public abstract class Charset$Coder$ { ...@@ -209,6 +212,9 @@ public abstract class Charset$Coder$ {
* $otypes-per-itype$ values and its replacement will be the * $otypes-per-itype$ values and its replacement will be the
* $replTypeName$ $defaultReplName$. * $replTypeName$ $defaultReplName$.
* *
* @param cs
* The charset that created this $coder$
*
* @param average$ItypesPerOtype$ * @param average$ItypesPerOtype$
* A positive float value indicating the expected number of * A positive float value indicating the expected number of
* $otype$s that will be produced for each input $itype$ * $otype$s that will be produced for each input $itype$
...@@ -386,6 +392,8 @@ public abstract class Charset$Coder$ { ...@@ -386,6 +392,8 @@ public abstract class Charset$Coder$ {
* <p> The default implementation of this method does nothing. This method * <p> The default implementation of this method does nothing. This method
* should be overridden by $coder$s that require notification of changes to * should be overridden by $coder$s that require notification of changes to
* the malformed-input action. </p> * the malformed-input action. </p>
*
* @param newAction The new action
*/ */
protected void implOnMalformedInput(CodingErrorAction newAction) { } protected void implOnMalformedInput(CodingErrorAction newAction) { }
...@@ -428,6 +436,8 @@ public abstract class Charset$Coder$ { ...@@ -428,6 +436,8 @@ public abstract class Charset$Coder$ {
* <p> The default implementation of this method does nothing. This method * <p> The default implementation of this method does nothing. This method
* should be overridden by $coder$s that require notification of changes to * should be overridden by $coder$s that require notification of changes to
* the unmappable-character action. </p> * the unmappable-character action. </p>
*
* @param newAction The new action
*/ */
protected void implOnUnmappableCharacter(CodingErrorAction newAction) { } protected void implOnUnmappableCharacter(CodingErrorAction newAction) { }
...@@ -925,6 +935,9 @@ public abstract class Charset$Coder$ { ...@@ -925,6 +935,9 @@ public abstract class Charset$Coder$ {
* <p> The default implementation of this method is not very efficient; it * <p> The default implementation of this method is not very efficient; it
* should generally be overridden to improve performance. </p> * should generally be overridden to improve performance. </p>
* *
* @param c
* The given character
*
* @return <tt>true</tt> if, and only if, this encoder can encode * @return <tt>true</tt> if, and only if, this encoder can encode
* the given character * the given character
* *
...@@ -953,6 +966,9 @@ public abstract class Charset$Coder$ { ...@@ -953,6 +966,9 @@ public abstract class Charset$Coder$ {
* <p> The default implementation of this method is not very efficient; it * <p> The default implementation of this method is not very efficient; it
* should generally be overridden to improve performance. </p> * should generally be overridden to improve performance. </p>
* *
* @param cs
* The given character sequence
*
* @return <tt>true</tt> if, and only if, this encoder can encode * @return <tt>true</tt> 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
......
...@@ -66,7 +66,7 @@ import sun.security.action.GetPropertyAction; ...@@ -66,7 +66,7 @@ import sun.security.action.GetPropertyAction;
* *
* *
* <a name="names"><a name="charenc"> * <a name="names"><a name="charenc">
* <h4>Charset names</h4> * <h2>Charset names</h2>
* *
* <p> Charsets are named by strings composed of the following characters: * <p> Charsets are named by strings composed of the following characters:
* *
...@@ -140,7 +140,7 @@ import sun.security.action.GetPropertyAction; ...@@ -140,7 +140,7 @@ import sun.security.action.GetPropertyAction;
* previous canonical name be made into an alias. * previous canonical name be made into an alias.
* *
* *
* <h4>Standard charsets</h4> * <h2>Standard charsets</h2>
* *
* <a name="standard"> * <a name="standard">
* *
...@@ -217,7 +217,7 @@ import sun.security.action.GetPropertyAction; ...@@ -217,7 +217,7 @@ import sun.security.action.GetPropertyAction;
* <p>The {@link StandardCharsets} class defines constants for each of the * <p>The {@link StandardCharsets} class defines constants for each of the
* standard charsets. * standard charsets.
* *
* <h4>Terminology</h4> * <h2>Terminology</h2>
* *
* <p> The name of this class is taken from the terms used in * <p> The name of this class is taken from the terms used in
* <a href="http://www.ietf.org/rfc/rfc2278.txt"><i>RFC&nbsp;2278</i></a>. * <a href="http://www.ietf.org/rfc/rfc2278.txt"><i>RFC&nbsp;2278</i></a>.
...@@ -737,6 +737,9 @@ public abstract class Charset ...@@ -737,6 +737,9 @@ public abstract class Charset
* 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
* The given charset
*
* @return <tt>true</tt> if the given charset is contained in this charset * @return <tt>true</tt> if the given charset is contained in this charset
*/ */
public abstract boolean contains(Charset cs); public abstract boolean contains(Charset cs);
......
...@@ -227,6 +227,9 @@ public class CoderResult { ...@@ -227,6 +227,9 @@ public class CoderResult {
* Static factory method that returns the unique object describing a * Static factory method that returns the unique object describing a
* malformed-input error of the given length. * malformed-input error of the given length.
* *
* @param length
* The given length
*
* @return The requested coder-result object * @return The requested coder-result object
*/ */
public static CoderResult malformedForLength(int length) { public static CoderResult malformedForLength(int length) {
...@@ -243,6 +246,9 @@ public class CoderResult { ...@@ -243,6 +246,9 @@ public class CoderResult {
* Static factory method that returns the unique result object describing * Static factory method that returns the unique result object describing
* an unmappable-character error of the given length. * an unmappable-character error of the given length.
* *
* @param length
* The given length
*
* @return The requested coder-result object * @return The requested coder-result object
*/ */
public static CoderResult unmappableForLength(int length) { public static CoderResult unmappableForLength(int length) {
......
...@@ -39,8 +39,8 @@ import java.util.Iterator; ...@@ -39,8 +39,8 @@ import java.util.Iterator;
* the usual extension directories. Providers may also be made available by * the usual extension directories. Providers may also be made available by
* adding them to the applet or application class path or by some other * adding them to the applet or application class path or by some other
* platform-specific means. Charset providers are looked up via the current * platform-specific means. Charset providers are looked up via the current
* thread's {@link java.lang.Thread#getContextClassLoader() </code>context * thread's {@link java.lang.Thread#getContextClassLoader() context class
* class loader<code>}. * 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 <tt>java.nio.charset.spi.CharsetProvider</tt> in the resource
......
...@@ -173,6 +173,8 @@ public abstract class FileStore { ...@@ -173,6 +173,8 @@ public abstract class FileStore {
* The {@code type} parameter is the type of the attribute view required and * The {@code type} parameter is the type of the attribute view required and
* the method returns an instance of that type if supported. * the method returns an instance of that type if supported.
* *
* @param <V>
* The {@code FileStoreAttributeView} type
* @param type * @param type
* the {@code Class} object corresponding to the attribute view * the {@code Class} object corresponding to the attribute view
* *
......
...@@ -315,7 +315,7 @@ public abstract class FileSystem ...@@ -315,7 +315,7 @@ public abstract class FileSystem
* that resembles regular expressions but with a simpler syntax. For example: * that resembles regular expressions but with a simpler syntax. For example:
* *
* <blockquote> * <blockquote>
* <table border="0"> * <table border="0" summary="Pattern Language">
* <tr> * <tr>
* <td>{@code *.java}</td> * <td>{@code *.java}</td>
* <td>Matches a path that represents a file name ending in {@code .java}</td> * <td>Matches a path that represents a file name ending in {@code .java}</td>
......
...@@ -200,6 +200,10 @@ public final class FileSystems { ...@@ -200,6 +200,10 @@ public final class FileSystems {
* existing file system. In the case of the {@link FileSystems#getDefault * existing file system. In the case of the {@link FileSystems#getDefault
* default} file system, no permission check is required. * default} file system, no permission check is required.
* *
* @param uri the URI to locate the file system
*
* @return the reference to the file system
*
* @throws IllegalArgumentException * @throws IllegalArgumentException
* if the pre-conditions for the {@code uri} parameter are not met * if the pre-conditions for the {@code uri} parameter are not met
* @throws FileSystemNotFoundException * @throws FileSystemNotFoundException
......
...@@ -194,7 +194,7 @@ public final class Files { ...@@ -194,7 +194,7 @@ public final class Files {
* <p> In the addition to {@code READ} and {@code WRITE}, the following * <p> In the addition to {@code READ} and {@code WRITE}, the following
* options may be present: * options may be present:
* *
* <table border=1 cellpadding=5 summary=""> * <table border=1 cellpadding=5 summary="Options">
* <tr> <th>Option</th> <th>Description</th> </tr> * <tr> <th>Option</th> <th>Description</th> </tr>
* <tr> * <tr>
* <td> {@link StandardOpenOption#APPEND APPEND} </td> * <td> {@link StandardOpenOption#APPEND APPEND} </td>
...@@ -1616,7 +1616,8 @@ public final class Files { ...@@ -1616,7 +1616,8 @@ public final class Files {
* } * }
* </pre> * </pre>
* *
* * @param <V>
* The {@code FileAttributeView} type
* @param path * @param path
* the path to the file * the path to the file
* @param type * @param type
...@@ -1665,6 +1666,8 @@ public final class Files { ...@@ -1665,6 +1666,8 @@ public final class Files {
* PosixFileAttributes attrs = Files.readAttributes(path, PosixFileAttributes.class, NOFOLLOW_LINKS); * PosixFileAttributes attrs = Files.readAttributes(path, PosixFileAttributes.class, NOFOLLOW_LINKS);
* </pre> * </pre>
* *
* @param <A>
* The {@code BasicFileAttributes} type
* @param path * @param path
* the path to the file * the path to the file
* @param type * @param type
...@@ -1863,7 +1866,7 @@ public final class Files { ...@@ -1863,7 +1866,7 @@ public final class Files {
* attributes} parameter: * attributes} parameter:
* *
* <blockquote> * <blockquote>
* <table border="0"> * <table border="0" summary="Possible values">
* <tr> * <tr>
* <td> {@code "*"} </td> * <td> {@code "*"} </td>
* <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td> * <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td>
...@@ -1971,10 +1974,12 @@ public final class Files { ...@@ -1971,10 +1974,12 @@ public final class Files {
* System Interface (POSIX) family of standards. * System Interface (POSIX) family of standards.
* *
* @param path * @param path
* A file reference that locates the file * The path to the file
* @param perms * @param perms
* The new set of permissions * The new set of permissions
* *
* @return The path
*
* @throws UnsupportedOperationException * @throws UnsupportedOperationException
* if the associated file system does not support the {@code * if the associated file system does not support the {@code
* PosixFileAttributeView} * PosixFileAttributeView}
...@@ -2009,7 +2014,7 @@ public final class Files { ...@@ -2009,7 +2014,7 @@ public final class Files {
* access to a file attribute that is the owner of the file. * access to a file attribute that is the owner of the file.
* *
* @param path * @param path
* A file reference that locates the file * The path to the file
* @param options * @param options
* options indicating how symbolic links are handled * options indicating how symbolic links are handled
* *
...@@ -2052,10 +2057,12 @@ public final class Files { ...@@ -2052,10 +2057,12 @@ public final class Files {
* </pre> * </pre>
* *
* @param path * @param path
* A file reference that locates the file * The path to the file
* @param owner * @param owner
* The new file owner * The new file owner
* *
* @return The path
*
* @throws UnsupportedOperationException * @throws UnsupportedOperationException
* if the associated file system does not support the {@code * if the associated file system does not support the {@code
* FileOwnerAttributeView} * FileOwnerAttributeView}
...@@ -2090,6 +2097,8 @@ public final class Files { ...@@ -2090,6 +2097,8 @@ public final class Files {
* readAttributes} method and the file type tested with the {@link * readAttributes} method and the file type tested with the {@link
* BasicFileAttributes#isSymbolicLink} method. * BasicFileAttributes#isSymbolicLink} method.
* *
* @param path The path to the file
*
* @return {@code true} if the file is a symbolic link; {@code false} if * @return {@code true} if the file is a symbolic link; {@code false} if
* the file does not exist, is not a symbolic link, or it cannot * the file does not exist, is not a symbolic link, or it cannot
* be determined if the file is a symbolic link or not. * be determined if the file is a symbolic link or not.
...@@ -2239,7 +2248,7 @@ public final class Files { ...@@ -2239,7 +2248,7 @@ public final class Files {
* @param time * @param time
* the new last modified time * the new last modified time
* *
* @return the file * @return the path
* *
* @throws IOException * @throws IOException
* if an I/O error occurs * if an I/O error occurs
......
...@@ -64,7 +64,7 @@ import java.util.Iterator; ...@@ -64,7 +64,7 @@ import java.util.Iterator;
* those developing custom file system implementations. Methods may be added to * those developing custom file system implementations. Methods may be added to
* this interface in future releases. </p> * this interface in future releases. </p>
* *
* <h4>Accessing Files</h4> * <h2>Accessing Files</h2>
* <p> Paths may be used with the {@link Files} class to operate on files, * <p> Paths may be used with the {@link Files} class to operate on files,
* directories, and other types of files. For example, suppose we want a {@link * directories, and other types of files. For example, suppose we want a {@link
* java.io.BufferedReader} to read text from a file "{@code access.log}". The * java.io.BufferedReader} to read text from a file "{@code access.log}". The
...@@ -75,7 +75,7 @@ import java.util.Iterator; ...@@ -75,7 +75,7 @@ import java.util.Iterator;
* BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8); * BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8);
* </pre> * </pre>
* *
* <a name="interop"><h4>Interoperability</h4></a> * <a name="interop"></a><h2>Interoperability</h2>
* <p> Paths associated with the default {@link * <p> Paths associated with the default {@link
* java.nio.file.spi.FileSystemProvider provider} are generally interoperable * java.nio.file.spi.FileSystemProvider provider} are generally interoperable
* with the {@link java.io.File java.io.File} class. Paths created by other * with the {@link java.io.File java.io.File} class. Paths created by other
...@@ -87,7 +87,7 @@ import java.util.Iterator; ...@@ -87,7 +87,7 @@ import java.util.Iterator;
* addition, the {@link #toFile toFile} method is useful to construct a {@code * addition, the {@link #toFile toFile} method is useful to construct a {@code
* File} from the {@code String} representation of a {@code Path}. * File} from the {@code String} representation of a {@code Path}.
* *
* <h4>Concurrency</h4> * <h2>Concurrency</h2>
* <p> Implementations of this interface are immutable and safe for use by * <p> Implementations of this interface are immutable and safe for use by
* multiple concurrent threads. * multiple concurrent threads.
* *
......
...@@ -122,6 +122,8 @@ public interface SecureDirectoryStream<T> ...@@ -122,6 +122,8 @@ public interface SecureDirectoryStream<T>
* an optional list of attributes to set atomically when creating * an optional list of attributes to set atomically when creating
* the file * the file
* *
* @return the seekable byte channel
*
* @throws ClosedDirectoryStreamException * @throws ClosedDirectoryStreamException
* if the directory stream is closed * if the directory stream is closed
* @throws IllegalArgumentException * @throws IllegalArgumentException
...@@ -260,6 +262,8 @@ public interface SecureDirectoryStream<T> ...@@ -260,6 +262,8 @@ public interface SecureDirectoryStream<T>
* then all methods to read or update attributes will throw {@link * then all methods to read or update attributes will throw {@link
* ClosedDirectoryStreamException ClosedDirectoryStreamException}. * ClosedDirectoryStreamException ClosedDirectoryStreamException}.
* *
* @param <V>
* The {@code FileAttributeView} type
* @param type * @param type
* the {@code Class} object corresponding to the file attribute view * the {@code Class} object corresponding to the file attribute view
* *
...@@ -288,6 +292,8 @@ public interface SecureDirectoryStream<T> ...@@ -288,6 +292,8 @@ public interface SecureDirectoryStream<T>
* is created but methods to read or update attributes of the file will * is created but methods to read or update attributes of the file will
* fail when invoked and the file does not exist. * fail when invoked and the file does not exist.
* *
* @param <V>
* The {@code FileAttributeView} type
* @param path * @param path
* the path of the file * the path of the file
* @param type * @param type
......
...@@ -55,11 +55,16 @@ public interface WatchEvent<T> { ...@@ -55,11 +55,16 @@ public interface WatchEvent<T> {
public static interface Kind<T> { public static interface Kind<T> {
/** /**
* Returns the name of the event kind. * Returns the name of the event kind.
*
* @return the name of the event kind
*/ */
String name(); String name();
/** /**
* Returns the type of the {@link WatchEvent#context context} value. * Returns the type of the {@link WatchEvent#context context} value.
*
*
* @return the type of the context value
*/ */
Class<T> type(); Class<T> type();
} }
...@@ -76,6 +81,8 @@ public interface WatchEvent<T> { ...@@ -76,6 +81,8 @@ public interface WatchEvent<T> {
public static interface Modifier { public static interface Modifier {
/** /**
* Returns the name of the modifier. * Returns the name of the modifier.
*
* @return the name of the modifier
*/ */
String name(); String name();
} }
......
...@@ -78,7 +78,7 @@ import java.util.concurrent.TimeUnit; ...@@ -78,7 +78,7 @@ import java.util.concurrent.TimeUnit;
* The {@link java.nio.channels.FileChannel FileChannel} class defines methods * The {@link java.nio.channels.FileChannel FileChannel} class defines methods
* to lock regions of a file against access by other programs. * to lock regions of a file against access by other programs.
* *
* <h4>Platform dependencies</h4> * <h2>Platform dependencies</h2>
* *
* <p> The implementation that observes events from the file system is intended * <p> The implementation that observes events from the file system is intended
* to map directly on to the native file event notification facility where * to map directly on to the native file event notification facility where
......
...@@ -134,6 +134,7 @@ public final class AclEntry { ...@@ -134,6 +134,7 @@ public final class AclEntry {
/** /**
* Sets the type component of this builder. * Sets the type component of this builder.
* *
* @param type the component type
* @return this builder * @return this builder
*/ */
public Builder setType(AclEntryType type) { public Builder setType(AclEntryType type) {
...@@ -146,6 +147,7 @@ public final class AclEntry { ...@@ -146,6 +147,7 @@ public final class AclEntry {
/** /**
* Sets the principal component of this builder. * Sets the principal component of this builder.
* *
* @param who the principal component
* @return this builder * @return this builder
*/ */
public Builder setPrincipal(UserPrincipal who) { public Builder setPrincipal(UserPrincipal who) {
...@@ -168,6 +170,7 @@ public final class AclEntry { ...@@ -168,6 +170,7 @@ public final class AclEntry {
* Sets the permissions component of this builder. On return, the * Sets the permissions component of this builder. On return, the
* permissions component of this builder is a copy of the given set. * permissions component of this builder is a copy of the given set.
* *
* @param perms the permissions component
* @return this builder * @return this builder
* *
* @throws ClassCastException * @throws ClassCastException
...@@ -193,6 +196,7 @@ public final class AclEntry { ...@@ -193,6 +196,7 @@ public final class AclEntry {
* permissions component of this builder is a copy of the permissions in * permissions component of this builder is a copy of the permissions in
* the given array. * the given array.
* *
* @param perms the permissions component
* @return this builder * @return this builder
*/ */
public Builder setPermissions(AclEntryPermission... perms) { public Builder setPermissions(AclEntryPermission... perms) {
...@@ -211,6 +215,7 @@ public final class AclEntry { ...@@ -211,6 +215,7 @@ public final class AclEntry {
* Sets the flags component of this builder. On return, the flags * Sets the flags component of this builder. On return, the flags
* component of this builder is a copy of the given set. * component of this builder is a copy of the given set.
* *
* @param flags the flags component
* @return this builder * @return this builder
* *
* @throws ClassCastException * @throws ClassCastException
...@@ -236,6 +241,7 @@ public final class AclEntry { ...@@ -236,6 +241,7 @@ public final class AclEntry {
* component of this builder is a copy of the flags in the given * component of this builder is a copy of the flags in the given
* array. * array.
* *
* @param flags the flags component
* @return this builder * @return this builder
*/ */
public Builder setFlags(AclEntryFlag... flags) { public Builder setFlags(AclEntryFlag... flags) {
...@@ -267,9 +273,7 @@ public final class AclEntry { ...@@ -267,9 +273,7 @@ public final class AclEntry {
/** /**
* Constructs a new builder with the components of an existing ACL entry. * Constructs a new builder with the components of an existing ACL entry.
* *
* @param entry * @param entry an ACL entry
* an ACL entry
*
* @return a new builder * @return a new builder
*/ */
public static Builder newBuilder(AclEntry entry) { public static Builder newBuilder(AclEntry entry) {
...@@ -278,6 +282,8 @@ public final class AclEntry { ...@@ -278,6 +282,8 @@ public final class AclEntry {
/** /**
* Returns the ACL entry type. * Returns the ACL entry type.
*
* @return the ACL entry type
*/ */
public AclEntryType type() { public AclEntryType type() {
return type; return type;
...@@ -285,6 +291,8 @@ public final class AclEntry { ...@@ -285,6 +291,8 @@ public final class AclEntry {
/** /**
* Returns the principal component. * Returns the principal component.
*
* @return the principal component
*/ */
public UserPrincipal principal() { public UserPrincipal principal() {
return who; return who;
...@@ -294,6 +302,8 @@ public final class AclEntry { ...@@ -294,6 +302,8 @@ public final class AclEntry {
* Returns a copy of the permissions component. * Returns a copy of the permissions component.
* *
* <p> The returned set is a modifiable copy of the permissions. * <p> The returned set is a modifiable copy of the permissions.
*
* @return the permissions component
*/ */
public Set<AclEntryPermission> permissions() { public Set<AclEntryPermission> permissions() {
return new HashSet<AclEntryPermission>(perms); return new HashSet<AclEntryPermission>(perms);
...@@ -303,6 +313,8 @@ public final class AclEntry { ...@@ -303,6 +313,8 @@ public final class AclEntry {
* Returns a copy of the flags component. * Returns a copy of the flags component.
* *
* <p> The returned set is a modifiable copy of the flags. * <p> The returned set is a modifiable copy of the flags.
*
* @return the flags component
*/ */
public Set<AclEntryFlag> flags() { public Set<AclEntryFlag> flags() {
return new HashSet<AclEntryFlag>(flags); return new HashSet<AclEntryFlag>(flags);
......
...@@ -54,7 +54,7 @@ import java.io.IOException; ...@@ -54,7 +54,7 @@ import java.io.IOException;
* supportsFileAttributeView} method can be used to test if a file system * supportsFileAttributeView} method can be used to test if a file system
* supports ACLs. * supports ACLs.
* *
* <a name="interop"><h4>Interoperability</h4></a> * <h2>Interoperability</h2>
* *
* RFC&nbsp;3530 allows for special user identities to be used on platforms that * RFC&nbsp;3530 allows for special user identities to be used on platforms that
* support the POSIX defined access permissions. The special user identities * support the POSIX defined access permissions. The special user identities
...@@ -65,7 +65,7 @@ import java.io.IOException; ...@@ -65,7 +65,7 @@ import java.io.IOException;
* UserPrincipalLookupService} may be used to obtain a {@link UserPrincipal} * UserPrincipalLookupService} may be used to obtain a {@link UserPrincipal}
* to represent these special identities by invoking the {@link * to represent these special identities by invoking the {@link
* UserPrincipalLookupService#lookupPrincipalByName lookupPrincipalByName} * UserPrincipalLookupService#lookupPrincipalByName lookupPrincipalByName}
* method. </p> * method.
* *
* <p> <b>Usage Example:</b> * <p> <b>Usage Example:</b>
* Suppose we wish to add an entry to an existing ACL to grant "joe" access: * Suppose we wish to add an entry to an existing ACL to grant "joe" access:
...@@ -90,11 +90,11 @@ import java.io.IOException; ...@@ -90,11 +90,11 @@ import java.io.IOException;
* view.setAcl(acl); * view.setAcl(acl);
* </pre> * </pre>
* *
* <h4> Dynamic Access </h4> * <h2> Dynamic Access </h2>
* <p> Where dynamic access to file attributes is required, the attributes * <p> Where dynamic access to file attributes is required, the attributes
* supported by this attribute view are as follows: * supported by this attribute view are as follows:
* <blockquote> * <blockquote>
* <table border="1" cellpadding="8"> * <table border="1" cellpadding="8" summary="Supported attributes">
* <tr> * <tr>
* <th> Name </th> * <th> Name </th>
* <th> Type </th> * <th> Type </th>
...@@ -118,7 +118,7 @@ import java.io.IOException; ...@@ -118,7 +118,7 @@ import java.io.IOException;
* update the ACL or owner attributes as if by invoking the {@link #setAcl setAcl} * update the ACL or owner attributes as if by invoking the {@link #setAcl setAcl}
* or {@link #setOwner setOwner} methods. * or {@link #setOwner setOwner} methods.
* *
* <h4> Setting the ACL when creating a file </h4> * <h2> Setting the ACL when creating a file </h2>
* *
* <p> Implementations supporting this attribute view may also support setting * <p> Implementations supporting this attribute view may also support setting
* the initial ACL when creating a file or directory. The initial ACL * the initial ACL when creating a file or directory. The initial ACL
......
...@@ -38,6 +38,8 @@ package java.nio.file.attribute; ...@@ -38,6 +38,8 @@ package java.nio.file.attribute;
public interface AttributeView { public interface AttributeView {
/** /**
* Returns the name of the attribute view. * Returns the name of the attribute view.
*
* @return the name of the attribute view
*/ */
String name(); String name();
} }
...@@ -41,7 +41,7 @@ import java.io.IOException; ...@@ -41,7 +41,7 @@ import java.io.IOException;
* <p> Where dynamic access to file attributes is required, the attributes * <p> Where dynamic access to file attributes is required, the attributes
* supported by this attribute view have the following names and types: * supported by this attribute view have the following names and types:
* <blockquote> * <blockquote>
* <table border="1" cellpadding="8"> * <table border="1" cellpadding="8" summary="Supported attributes">
* <tr> * <tr>
* <th> Name </th> * <th> Name </th>
* <th> Type </th> * <th> Type </th>
......
...@@ -87,22 +87,31 @@ public interface BasicFileAttributes { ...@@ -87,22 +87,31 @@ public interface BasicFileAttributes {
/** /**
* Tells whether the file is a regular file with opaque content. * Tells whether the file is a regular file with opaque content.
*
* @return {@code true} if the file is a regular file with opaque content
*/ */
boolean isRegularFile(); boolean isRegularFile();
/** /**
* Tells whether the file is a directory. * Tells whether the file is a directory.
*
* @return {@code true} if the file is a directory
*/ */
boolean isDirectory(); boolean isDirectory();
/** /**
* Tells whether the file is a symbolic link. * Tells whether the file is a symbolic link.
*
* @return {@code true} if the file is a symbolic link
*/ */
boolean isSymbolicLink(); boolean isSymbolicLink();
/** /**
* Tells whether the file is something other than a regular file, directory, * Tells whether the file is something other than a regular file, directory,
* or symbolic link. * or symbolic link.
*
* @return {@code true} if the file something other than a regular file,
* directory or symbolic link
*/ */
boolean isOther(); boolean isOther();
...@@ -138,6 +147,8 @@ public interface BasicFileAttributes { ...@@ -138,6 +147,8 @@ public interface BasicFileAttributes {
* and two files are the {@link java.nio.file.Files#isSameFile same} with * and two files are the {@link java.nio.file.Files#isSameFile same} with
* non-{@code null} file keys, then their file keys are equal. * non-{@code null} file keys, then their file keys are equal.
* *
* @return an object that uniquely identifies the given file, or {@code null}
*
* @see java.nio.file.Files#walkFileTree * @see java.nio.file.Files#walkFileTree
*/ */
Object fileKey(); Object fileKey();
......
...@@ -41,7 +41,7 @@ import java.io.IOException; ...@@ -41,7 +41,7 @@ import java.io.IOException;
* BasicFileAttributeView}, and in addition, the following attributes are * BasicFileAttributeView}, and in addition, the following attributes are
* supported: * supported:
* <blockquote> * <blockquote>
* <table border="1" cellpadding="8"> * <table border="1" cellpadding="8" summary="Supported attributes">
* <tr> * <tr>
* <th> Name </th> * <th> Name </th>
* <th> Type </th> * <th> Type </th>
......
...@@ -40,11 +40,15 @@ package java.nio.file.attribute; ...@@ -40,11 +40,15 @@ package java.nio.file.attribute;
public interface FileAttribute<T> { public interface FileAttribute<T> {
/** /**
* Returns the attribute name. * Returns the attribute name.
*
* @return The attribute name
*/ */
String name(); String name();
/** /**
* Returns the attribute value. * Returns the attribute value.
*
* @return The attribute value
*/ */
T value(); T value();
} }
...@@ -68,13 +68,13 @@ import java.io.IOException; ...@@ -68,13 +68,13 @@ import java.io.IOException;
* PosixFilePermissions.toString(attrs.permissions())); * PosixFilePermissions.toString(attrs.permissions()));
* </pre> * </pre>
* *
* <h4> Dynamic Access </h4> * <h2> Dynamic Access </h2>
* <p> Where dynamic access to file attributes is required, the attributes * <p> Where dynamic access to file attributes is required, the attributes
* supported by this attribute view are as defined by {@link * supported by this attribute view are as defined by {@link
* BasicFileAttributeView} and {@link FileOwnerAttributeView}, and in addition, * BasicFileAttributeView} and {@link FileOwnerAttributeView}, and in addition,
* the following attributes are supported: * the following attributes are supported:
* <blockquote> * <blockquote>
* <table border="1" cellpadding="8"> * <table border="1" cellpadding="8" summary="Supported attributes">
* <tr> * <tr>
* <th> Name </th> * <th> Name </th>
* <th> Type </th> * <th> Type </th>
...@@ -102,7 +102,7 @@ import java.io.IOException; ...@@ -102,7 +102,7 @@ import java.io.IOException;
* #setPermissions setPermissions}, {@link #setOwner setOwner}, and {@link * #setPermissions setPermissions}, {@link #setOwner setOwner}, and {@link
* #setGroup setGroup} methods respectively. * #setGroup setGroup} methods respectively.
* *
* <h4> Setting Initial Permissions </h4> * <h2> Setting Initial Permissions </h2>
* <p> Implementations supporting this attribute view may also support setting * <p> Implementations supporting this attribute view may also support setting
* the initial permissions when creating a file or directory. The * the initial permissions when creating a file or directory. The
* initial permissions are provided to the {@link Files#createFile createFile} * initial permissions are provided to the {@link Files#createFile createFile}
......
...@@ -287,6 +287,8 @@ public abstract class FileSystemProvider { ...@@ -287,6 +287,8 @@ public abstract class FileSystemProvider {
* @param uri * @param uri
* The URI to convert * The URI to convert
* *
* @return The resulting {@code Path}
*
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If the URI scheme does not identify this provider or other * If the URI scheme does not identify this provider or other
* preconditions on the uri parameter do not hold * preconditions on the uri parameter do not hold
...@@ -751,6 +753,8 @@ public abstract class FileSystemProvider { ...@@ -751,6 +753,8 @@ public abstract class FileSystemProvider {
* @param link * @param link
* the path to the symbolic link * the path to the symbolic link
* *
* @return The target of the symbolic link
*
* @throws UnsupportedOperationException * @throws UnsupportedOperationException
* if the implementation does not support symbolic links * if the implementation does not support symbolic links
* @throws NotLinkException * @throws NotLinkException
...@@ -984,6 +988,8 @@ public abstract class FileSystemProvider { ...@@ -984,6 +988,8 @@ public abstract class FileSystemProvider {
* exactly the manner specified by the {@link Files#getFileAttributeView} * exactly the manner specified by the {@link Files#getFileAttributeView}
* method. * method.
* *
* @param <V>
* The {@code FileAttributeView} type
* @param path * @param path
* the path to the file * the path to the file
* @param type * @param type
...@@ -1002,6 +1008,8 @@ public abstract class FileSystemProvider { ...@@ -1002,6 +1008,8 @@ public abstract class FileSystemProvider {
* exactly the manner specified by the {@link * exactly the manner specified by the {@link
* Files#readAttributes(Path,Class,LinkOption[])} method. * Files#readAttributes(Path,Class,LinkOption[])} method.
* *
* @param <A>
* The {@code BasicFileAttributes} type
* @param path * @param path
* the path to the file * the path to the file
* @param type * @param type
......
...@@ -444,7 +444,7 @@ public interface SQLInput { ...@@ -444,7 +444,7 @@ public interface SQLInput {
*<p> *<p>
* The default implementation will throw {@code SQLFeatureNotSupportedException} * The default implementation will throw {@code SQLFeatureNotSupportedException}
* *
* @param<T> the type of the class modeled by this Class object * @param <T> the type of the class modeled by this Class object
* @param type Class representing the Java data type to convert the attribute to. * @param type Class representing the Java data type to convert the attribute to.
* @return the attribute at the head of the stream as an {@code Object} in the * @return the attribute at the head of the stream as an {@code Object} in the
* Java programming language;{@code null} if the attribute is SQL {@code NULL} * Java programming language;{@code null} if the attribute is SQL {@code NULL}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册