You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2008/02/07 15:49:06 UTC

svn commit: r619431 - in /harmony/enhanced/classlib/trunk/modules: luni/src/main/java/java/io/ luni/src/main/java/java/lang/ nio/src/main/java/common/java/nio/channels/ nio/src/main/java/common/java/nio/channels/spi/ nio/src/main/java/common/org/apache...

Author: tellison
Date: Thu Feb  7 06:49:02 2008
New Revision: 619431

URL: http://svn.apache.org/viewvc?rev=619431&view=rev
Log:
Minor doc updates.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Reader.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuffer.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/SuppressWarnings.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Channels.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/DatagramChannel.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Pipe.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/ServerSocketChannel.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/SocketChannel.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectionKey.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelector.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/AddressUtil.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/FileLockImpl.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/IOUtil.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java Thu Feb  7 06:49:02 2008
@@ -29,6 +29,9 @@
  * @see DataOutputStream
  */
 public class DataInputStream extends FilterInputStream implements DataInput {
+
+    byte[] buff;
+
     /**
      * Constructs a new DataInputStream on the InputStream <code>in</code>.
      * All reads can now be filtered through this stream. Note that data read by
@@ -41,9 +44,6 @@
      * @see DataOutputStream
      * @see RandomAccessFile
      */
-
-    byte[] buff;
-
     public DataInputStream(InputStream in) {
         super(in);
         buff = new byte[8];

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Reader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Reader.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Reader.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Reader.java Thu Feb  7 06:49:02 2008
@@ -187,7 +187,7 @@
      * action is to throw <code>IOException</code>.
      * 
      * @throws IOException
-     *             If a problem occured or the receiver does not support
+     *             If a problem occurred or the receiver does not support
      *             <code>mark()/reset()</code>.
      */
     public void reset() throws IOException {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java Thu Feb  7 06:49:02 2008
@@ -21,14 +21,13 @@
 /**
  * This interface should be implemented by all classes which wish to define a
  * <em>natural ordering</em> of their instances. The ordering rule must be
- * transitive and invertable (i.e. the sign of the result of x.compareTo(y) must
+ * transitive and invertible (i.e. the sign of the result of x.compareTo(y) must
  * equal the negation of the sign of the result of y.compareTo(x) for all x and
  * y).
  * <p>
- * In addition, it is desireable (but not required) that when the result of
+ * In addition, it is desirable (but not required) that when the result of
  * x.compareTo(y) is zero (and only then) the result of x.equals(y) should be
  * true.
- * 
  */
 public interface Comparable<T> {
 	

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuffer.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuffer.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuffer.java Thu Feb  7 06:49:02 2008
@@ -844,7 +844,7 @@
      * @throws IndexOutOfBoundsException
      *             when <code>length < 0</code>
      * 
-     * @see #length
+     * @see #length()
      */
     @Override
     public synchronized void setLength(int length) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/SuppressWarnings.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/SuppressWarnings.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/SuppressWarnings.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/SuppressWarnings.java Thu Feb  7 06:49:02 2008
@@ -22,17 +22,22 @@
 import java.lang.annotation.Target;
 
 /**
- * <p>
  * An annotation that indicates a compiler should suppress any warnings of the
  * type specified in the {@link #value()}.
- * </p>
  * 
  * @since 1.5
  */
 @Target( { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD,
-ElementType.PARAMETER, ElementType.CONSTRUCTOR,
-ElementType.LOCAL_VARIABLE })
+        ElementType.PARAMETER, ElementType.CONSTRUCTOR,
+        ElementType.LOCAL_VARIABLE })
 @Retention(RetentionPolicy.SOURCE)
 public @interface SuppressWarnings {
+
+    /**
+     * Answers the array of warnings that compilers should suppress for the
+     * annotated element.
+     * 
+     * @return an array of warning types to suppress.
+     */
     public String[] value();
 }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Channels.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Channels.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Channels.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Channels.java Thu Feb  7 06:49:02 2008
@@ -487,11 +487,6 @@
 
         private ByteBuffer byteBuf;
 
-        /**
-         * @param outputStream
-         * @param enc
-         * @param minBufferCap
-         */
         public ByteChannelWriter(OutputStream aOutputStream,
                 CharsetEncoder aEncoder, int minBufferCap) {
             super(aOutputStream);

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/DatagramChannel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/DatagramChannel.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/DatagramChannel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/DatagramChannel.java Thu Feb  7 06:49:02 2008
@@ -83,6 +83,7 @@
      * @see java.nio.channels.SelectableChannel#validOps()
      * @return Valid operations in bit-set.
      */
+    @Override
     public final int validOps() {
         return (SelectionKey.OP_READ | SelectionKey.OP_WRITE);
     }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/FileLock.java Thu Feb  7 06:49:02 2008
@@ -191,6 +191,7 @@
      * 
      * @return the display string.
      */
+    @Override
     @SuppressWarnings("nls")
     public final String toString() {
         StringBuffer buffer = new StringBuffer(64); // Guess length of string

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Pipe.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Pipe.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Pipe.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/Pipe.java Thu Feb  7 06:49:02 2008
@@ -24,7 +24,6 @@
  * A pipe contains two channels. One is the writable sink channel and the other is
  * readable source channel. When bytes are written into the writable channel they
  * can be read from readable channel. The order of these bytes remains unchanged. 
- * 
  */
 public abstract class Pipe {
 
@@ -49,6 +48,7 @@
          * 
          * @return a static value of OP_WRITE
          */
+        @Override
         public final int validOps() {
             return SelectionKey.OP_WRITE;
         }
@@ -76,6 +76,7 @@
          * 
          * @return a static value of OP_READ
          */
+        @Override
         public final int validOps() {
             return SelectionKey.OP_READ;
         }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/ServerSocketChannel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/ServerSocketChannel.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/ServerSocketChannel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/ServerSocketChannel.java Thu Feb  7 06:49:02 2008
@@ -70,6 +70,7 @@
      * @see java.nio.channels.SelectableChannel#validOps()
      * @return Valid operations in bit-set.
      */
+    @Override
     public final int validOps() {
         return SelectionKey.OP_ACCEPT;
     }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/SocketChannel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/SocketChannel.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/SocketChannel.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/SocketChannel.java Thu Feb  7 06:49:02 2008
@@ -135,6 +135,7 @@
      * @see java.nio.channels.SelectableChannel#validOps()
      * @return Valid operations in bit-set.
      */
+    @Override
     public final int validOps() {
         return (SelectionKey.OP_CONNECT | SelectionKey.OP_READ | SelectionKey.OP_WRITE);
     }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectionKey.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectionKey.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectionKey.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectionKey.java Thu Feb  7 06:49:02 2008
@@ -41,6 +41,7 @@
     /**
      * @see java.nio.channels.SelectionKey#isValid()
      */
+    @Override
     public final boolean isValid() {
         return isValid;
     }
@@ -50,6 +51,7 @@
      * 
      * @see java.nio.channels.SelectionKey#cancel()
      */
+    @Override
     public final void cancel() {
         if (isValid) {
             isValid = false;

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelector.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelector.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelector.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelector.java Thu Feb  7 06:49:02 2008
@@ -57,6 +57,7 @@
      * 
      * @see java.nio.channels.Selector#close()
      */
+    @Override
     public synchronized final void close() throws IOException {
         if (isOpen) {
             isOpen = false;
@@ -75,6 +76,7 @@
     /**
      * @see java.nio.channels.Selector#isOpen()
      */
+    @Override
     public final boolean isOpen() {
         return isOpen;
     }
@@ -84,6 +86,7 @@
      * 
      * @see java.nio.channels.Selector#provider()
      */
+    @Override
     public final SelectorProvider provider() {
         return provider;
     }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/AddressUtil.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/AddressUtil.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/AddressUtil.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/AddressUtil.java Thu Feb  7 06:49:02 2008
@@ -19,6 +19,10 @@
 import java.io.FileDescriptor;
 import java.nio.Buffer;
 import java.nio.channels.Channel;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.FileChannel;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
 
 import org.apache.harmony.luni.platform.FileDescriptorHandler;
 import org.apache.harmony.nio.internal.DirectBuffer;
@@ -49,14 +53,15 @@
     }
 
     /**
-     * Gets the address of native resource held by the given channel, if has
+     * Gets the address of native resource held by the given channel, if it has
      * any.
      * 
-     * For network related channel, including SocketChannel, ServerSocketChannel
-     * and DatagramChannel, this method returns a int of Socket handler in Linux
-     * while returns a SOCKET (UINT_PTR) in windows.
+     * For network related channel, including {@link SocketChannel},
+     * {@link ServerSocketChannel} and {@link DatagramChannel}, this method
+     * returns the Socket handle (long) in Linux, and returns a SOCKET
+     * (UINT_PTR) in windows.
      * 
-     * For FileChannel, this method returns the native file descriptor.
+     * For {@link FileChannel}, this method returns the native file descriptor.
      * 
      * For other channels, this method return 0, which means unsupported
      * operation.

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/FileLockImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/FileLockImpl.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/FileLockImpl.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/FileLockImpl.java Thu Feb  7 06:49:02 2008
@@ -21,7 +21,7 @@
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
 
-/*
+/**
  * The concrete implementation of an NIO file lock object.
  */
 final class FileLockImpl extends FileLock {
@@ -29,35 +29,41 @@
     // Remembers if this lock has been released via the API.
     private boolean isReleased = false;
 
-    /*
+    /**
      * Answers a new file lock object with the given parameters.
      * 
-     * @param channel the file channel hosting the lock. @param position the
-     * start position of the lock, in bytes @param size the length of the lock,
-     * in bytes @param shared whether this lock is shared (true) or exclusive
-     * (false)
+     * @param channel
+     *            the file channel hosting the lock.
+     * @param position
+     *            the start position of the lock, in bytes
+     * @param size
+     *            the length of the lock, in bytes
+     * @param shared
+     *            whether this lock is shared (true) or exclusive (false)
      */
     public FileLockImpl(FileChannel channel, long position, long size,
             boolean shared) {
         super(channel, position, size, shared);
     }
 
-    /*
+    /**
      * Tests to see if the lock is valid. A lock can be invalidated if the
      * channel it is acquired on is closed or if it is released. (non-Javadoc)
      * 
      * @see java.nio.channels.FileLock#isValid()
      */
+    @Override
     public boolean isValid() {
         return !isReleased && channel().isOpen();
     }
 
-    /*
+    /**
      * Releases the file lock on the channel that acquired it. Releasing an
      * invalid lock has no effect.
      * 
      * @see java.nio.channels.FileLock#release()
      */
+    @Override
     public void release() throws IOException {
         if (!channel().isOpen()) {
             throw new ClosedChannelException();

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/IOUtil.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/IOUtil.java?rev=619431&r1=619430&r2=619431&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/IOUtil.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/IOUtil.java Thu Feb  7 06:49:02 2008
@@ -29,7 +29,7 @@
 import org.apache.harmony.nio.Util;
 import org.apache.harmony.nio.internal.nls.Messages;
 
-/*
+/**
  * Static methods for I/O util. Used by io package and nio package.
  */
 public final class IOUtil {