This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: more classpath merges


I'm checking this in to the trunk.

This re-merges a few more classes with Classpath.  This time, just
comment updates.

Tom

Index: libjava/ChangeLog
from  Tom Tromey  <tromey at redhat dot com>

	* java/io/BufferedReader.java, java/io/BufferedWriter.java,
	java/io/DataInput.java, java/io/DataOutput.java: Imports from
	Classpath.

Index: libjava/java/io/BufferedReader.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/BufferedReader.java,v
retrieving revision 1.12
diff -u -r1.12 BufferedReader.java
--- libjava/java/io/BufferedReader.java 23 Mar 2003 19:11:18 -0000 1.12
+++ libjava/java/io/BufferedReader.java 20 Apr 2003 22:45:17 -0000
@@ -1,5 +1,6 @@
 /* BufferedReader.java
-   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 
+     Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -48,7 +49,7 @@
  * underlying implementation to provide a possibly more efficient read
  * mechanism.  It maintains the buffer and buffer state in instance 
  * variables that are available to subclasses.  The default buffer size
- * of 512 chars can be overridden by the creator of the stream.
+ * of 8192 chars can be overridden by the creator of the stream.
  * <p>
  * This class also implements mark/reset functionality.  It is capable
  * of remembering any number of input chars, to the limits of
@@ -89,7 +90,7 @@
 
   /**
     * Create a new <code>BufferedReader</code> that will read from the 
-    * specified subordinate stream with a default buffer size of 4096 chars.
+    * specified subordinate stream with a default buffer size of 8192 chars.
     *
     * @param in The subordinate stream to read from
     */
@@ -104,7 +105,7 @@
    * caller.
    *
    * @param in The subordinate stream to read from
-   * @param bufsize The buffer size to use
+   * @param size The buffer size to use
    */
   public BufferedReader(Reader in, int size)
   {
@@ -114,7 +115,8 @@
   }
 
   /**
-   * This method closes the stream 
+   * This method closes the underlying stream and frees any associated
+   * resources.
    *
    * @exception IOException If an error occurs
    */
@@ -143,7 +145,7 @@
   /**
    * Mark a position in the input to which the stream can be
    * "reset" by calling the <code>reset()</code> method.  The parameter
-   * <code>readlimit</code> is the number of chars that can be read from the 
+   * <code>readLimit</code> is the number of chars that can be read from the 
    * stream after setting the mark before the mark becomes invalid.  For
    * example, if <code>mark()</code> is called with a read limit of 10, then 
    * when 11 chars of data are read from the stream before the 
@@ -155,7 +157,7 @@
    * not dependent on the subordinate stream supporting mark/reset
    * functionality.
    *
-   * @param readlimit The number of chars that can be read before the mark 
+   * @param readLimit The number of chars that can be read before the mark 
    *        becomes invalid
    *
    * @exception IOException If an error occurs
@@ -240,7 +242,7 @@
 
   /**
    * This method determines whether or not a stream is ready to be read.  If
-   * This method returns <code>false</code> then this stream could (but is
+   * this method returns <code>false</code> then this stream could (but is
    * not guaranteed to) block on the next read attempt.
    *
    * @return <code>true</code> if this stream is ready to be read, 
@@ -478,7 +480,7 @@
    * <code>skip</code> method on the underlying stream to skip the 
    * remaining chars.
    *
-   * @param num_chars The requested number of chars to skip
+   * @param numChars The requested number of chars to skip
    *
    * @return The actual number of chars skipped.
    *
Index: libjava/java/io/BufferedWriter.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/BufferedWriter.java,v
retrieving revision 1.10
diff -u -r1.10 BufferedWriter.java
--- libjava/java/io/BufferedWriter.java 18 Mar 2003 06:00:25 -0000 1.10
+++ libjava/java/io/BufferedWriter.java 20 Apr 2003 22:45:17 -0000
@@ -61,7 +61,7 @@
   /**
    * This method initializes a new <code>BufferedWriter</code> instance
    * that will write to the specified subordinate <code>Writer</code>
-   * and which will use a default buffer size of 512 chars.
+   * and which will use a default buffer size of 8192 chars.
    *
    * @param out The underlying <code>Writer</code> to write data to
    */
Index: libjava/java/io/DataInput.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/DataInput.java,v
retrieving revision 1.8
diff -u -r1.8 DataInput.java
--- libjava/java/io/DataInput.java 7 Apr 2003 12:25:08 -0000 1.8
+++ libjava/java/io/DataInput.java 20 Apr 2003 22:45:17 -0000
@@ -68,6 +68,8 @@
    * @exception EOFException If end of file is reached before 
    * reading the boolean
    * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeBoolean
    */
   boolean readBoolean() throws EOFException, IOException;
 
@@ -84,7 +86,7 @@
    * @exception EOFException If end of file is reached before reading the byte
    * @exception IOException If any other error occurs
    *
-   * @see DataOutput#writeBoolean
+   * @see DataOutput#writeByte
    */
   byte readByte() throws EOFException, IOException;
 
@@ -143,7 +145,7 @@
    * first and second byte read from the stream respectively, they will be
    * transformed to a <code>short</code> in the following manner:
    * <p>
-   * <code>(short)((byte1 << 8) + (byte2 & 0xFF))</code>
+   * <code>(short)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF))</code>
    * <p>
    * The value returned is in the range of -32768 to 32767.
    * <p>
@@ -234,7 +236,7 @@
    * <code>(long)(((byte1 & 0xFF) << 56) + ((byte2 & 0xFF) << 48) + 
    * ((byte3 & 0xFF) << 40) + ((byte4 & 0xFF) << 32) + 
    * ((byte5 & 0xFF) << 24) + ((byte6 & 0xFF) << 16) + 
-   * ((byte7 & 0xFF) << 8) + (byte9 & 0xFF)))
+   * ((byte7 & 0xFF) << 8) + (byte8 & 0xFF)))
    * </code>
    * <p>
    * The value returned is in the range of -9223372036854775808 to
@@ -316,14 +318,10 @@
    * charaters are discarded and are not returned as part of the string.
    * A line is also terminated by an end of file condition.
    * <p>
-   * This method can read data that was written by an object implementing the
-   * <code>writeLine()</code> method in <code>DataOutput</code>.
    *
    * @return The line read as a <code>String</code>
    *
    * @exception IOException If an error occurs
-   *
-   * @see DataOutput#writeLine
    */
   String readLine() throws IOException;
 
@@ -442,6 +440,7 @@
    * This method skips and discards the specified number of bytes in an
    * input stream.  Note that this method may skip less than the requested
    * number of bytes.  The actual number of bytes skipped is returned.
+   * No bytes are skipped if a negative number is passed to this method.
    *
    * @param numBytes The number of bytes to skip
    *
Index: libjava/java/io/DataOutput.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/DataOutput.java,v
retrieving revision 1.8
diff -u -r1.8 DataOutput.java
--- libjava/java/io/DataOutput.java 7 Apr 2003 12:25:08 -0000 1.8
+++ libjava/java/io/DataOutput.java 20 Apr 2003 22:45:17 -0000
@@ -111,7 +111,7 @@
   void writeChar(int value) throws IOException;
 
   /**
-   * This method writes a Java char value to an output stream.  The
+   * This method writes a Java short value to an output stream.  The
    * char to be written will be in the lowest 16 bits of the <code>int</code>
    * value passed.  These bytes will be written "big endian".  That is,
    * with the high byte written first in the following manner:
@@ -236,7 +236,7 @@
   void writeBytes(String value) throws IOException;
 
   /**
-   * This method writes all the bytes of a <code>String</code> to an 
+   * This method writes all the characters of a <code>String</code> to an 
    * output stream as an array of <code>char</code>'s. Each character
    * is written using the method specified in the <code>writeChar</code>
    * method. 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]