Index: java/io/ByteArrayInputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/ByteArrayInputStream.java,v retrieving revision 1.8 diff -u -r1.8 ByteArrayInputStream.java --- java/io/ByteArrayInputStream.java 22 Jan 2002 22:26:59 -0000 1.8 +++ java/io/ByteArrayInputStream.java 8 Apr 2004 15:03:37 -0000 @@ -83,7 +83,7 @@ * bytes supplied to the reader. Please use caution in changing the * contents of the buffer while this stream is open. * - * @param buf The byte array buffer this stream will read from. + * @param buffer The byte array buffer this stream will read from. */ public ByteArrayInputStream(byte[] buffer) { @@ -105,7 +105,7 @@ * bytes supplied to the reader. Please use caution in changing the * contents of the buffer while this stream is open. * - * @param buf The byte array buffer this stream will read from. + * @param buffer The byte array buffer this stream will read from. * @param offset The index into the buffer to start reading bytes from * @param length The number of bytes to read from the buffer */ @@ -146,12 +146,12 @@ * position 0 in the stream. This is in constrast to some other * stream types where there is no default mark position. * - * @param readlimit The number of bytes this stream must remember. + * @param readLimit The number of bytes this stream must remember. * This parameter is ignored. */ - public synchronized void mark(int readAheadLimit) + public synchronized void mark(int readLimit) { - // readAheadLimit is ignored per Java Class Lib. book, p.220. + // readLimit is ignored per Java Class Lib. book, p.220. mark = pos; } @@ -197,19 +197,19 @@ *
* This method does not block.
*
- * @param buf The array into which the bytes read should be stored.
+ * @param buffer The array into which the bytes read should be stored.
* @param offset The offset into the array to start storing bytes
- * @param len The requested number of bytes to read
+ * @param length The requested number of bytes to read
*
* @return The actual number of bytes read, or -1 if end of stream.
*/
- public synchronized int read(byte[] b, int off, int len)
+ public synchronized int read(byte[] buffer, int offset, int length)
{
if (pos >= count)
return -1;
- int numBytes = Math.min(count - pos, len);
- System.arraycopy(buf, pos, b, off, numBytes);
+ int numBytes = Math.min(count - pos, length);
+ System.arraycopy(buf, pos, buffer, offset, numBytes);
pos += numBytes;
return numBytes;
}
@@ -234,17 +234,17 @@
* position the stream at the end of the buffer. The actual number
* of bytes skipped is returned.
*
- * @param num_bytes The requested number of bytes to skip
+ * @param num The requested number of bytes to skip
*
* @return The actual number of bytes skipped.
*/
- public synchronized long skip(long n)
+ public synchronized long skip(long num)
{
// Even though the var numBytes is a long, in reality it can never
// be larger than an int since the result of subtracting 2 positive
// ints will always fit in an int. Since we have to return a long
// anyway, numBytes might as well just be a long.
- long numBytes = Math.min((long) (count - pos), n < 0 ? 0L : n);
+ long numBytes = Math.min((long) (count - pos), num < 0 ? 0L : num);
pos += numBytes;
return numBytes;
}
Index: java/io/DataInput.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/DataInput.java,v
retrieving revision 1.12
diff -u -r1.12 DataInput.java
--- java/io/DataInput.java 7 Apr 2003 19:45:21 -0000 1.12
+++ java/io/DataInput.java 8 Apr 2004 15:03:37 -0000
@@ -360,7 +360,7 @@
* patterns which indicate a two byte character encoding, then they would be
* converted to a Java char
like so:
*
- * (char)(((byte1 & 0x1F) << 6) + (byte2 & 0x3F))
+ * (char)(((byte1 & 0x1F) << 6) + (byte2 & 0x3F))
*
* If the first byte has a 1110 as its high order bits, then the
* character consists of three bytes. The bits that make up the character
@@ -375,7 +375,7 @@
* then they would be converted to a Java char
like so:
*
*
- * (char)(((byte1 & 0x0F) << 12) + ((byte2 & 0x3F) + (byte3 & 0x3F))
+ * (char)(((byte1 & 0x0F) << 12) + ((byte2 & 0x3F) + (byte3 & 0x3F))
*
*
* Note that all characters are encoded in the method that requires the
@@ -387,7 +387,7 @@
* This method can read data that was written by an object implementing the
* writeUTF()
method in DataOutput
.
*
- * @returns The String
read
+ * @return The String
read
*
* @exception EOFException If end of file is reached before reading the
* String
Index: java/io/DataInputStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/DataInputStream.java,v
retrieving revision 1.23
diff -u -r1.23 DataInputStream.java
--- java/io/DataInputStream.java 20 May 2003 11:25:01 -0000 1.23
+++ java/io/DataInputStream.java 8 Apr 2004 15:03:37 -0000
@@ -277,16 +277,16 @@
* buffer
* @exception IOException If any other error occurs
*/
- public final void readFully (byte[] b, int off, int len) throws IOException
+ public final void readFully (byte[] buf, int offset, int len) throws IOException
{
while (len > 0)
{
// in.read will block until some data is available.
- int numread = in.read (b, off, len);
+ int numread = in.read (buf, offset, len);
if (numread < 0)
throw new EOFException ();
len -= numread;
- off += numread;
+ offset += numread;
}
}
Index: java/io/InputStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/InputStream.java,v
retrieving revision 1.6
diff -u -r1.6 InputStream.java
--- java/io/InputStream.java 22 Jan 2002 22:26:59 -0000 1.6
+++ java/io/InputStream.java 8 Apr 2004 15:03:37 -0000
@@ -105,7 +105,7 @@
* @param readLimit The number of bytes that can be read before the
* mark becomes invalid
*/
- public void mark(int readlimit)
+ public void mark(int readLimit)
{
// Do nothing
}
Index: java/io/InputStreamReader.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/InputStreamReader.java,v
retrieving revision 1.14
diff -u -r1.14 InputStreamReader.java
--- java/io/InputStreamReader.java 21 Nov 2003 12:52:14 -0000 1.14
+++ java/io/InputStreamReader.java 8 Apr 2004 15:03:37 -0000
@@ -150,7 +150,7 @@
* by this object. If the stream has been closed, this method is allowed
* to return null
.
*
- * @param The current encoding name
+ * @return The current encoding name
*/
public String getEncoding()
{
@@ -217,7 +217,7 @@
* returns the actual number of chars skipped, which may be less than the
* requested amount.
*
- * @param num_chars The requested number of chars to skip
+ * @param count The requested number of chars to skip
*
* @return The actual number of chars skipped.
*
@@ -230,6 +230,4 @@
return super.skip(count);
}
-
-} // class InputStreamReader
-
+}
Index: java/io/ObjectStreamClass.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamClass.java,v
retrieving revision 1.31
diff -u -r1.31 ObjectStreamClass.java
--- java/io/ObjectStreamClass.java 26 Feb 2004 07:53:15 -0000 1.31
+++ java/io/ObjectStreamClass.java 8 Apr 2004 15:03:37 -0000
@@ -104,17 +104,17 @@
}
}
-
/**
* Returns the name of the class that this
* ObjectStreamClass
represents.
+ *
+ * @return the name of the class.
*/
public String getName()
{
return name;
}
-
/**
* Returns the class that this ObjectStreamClass
* represents. Null could be returned if this
@@ -129,24 +129,27 @@
return clazz;
}
-
/**
* Returns the serial version stream-unique identifier for the class
* represented by this ObjectStreamClass
. This SUID is
* either defined by the class as static final long
* serialVersionUID
or is calculated as specified in
* Javasoft's "Object Serialization Specification" XXX: add reference
+ *
+ * @return the serial version UID.
*/
public long getSerialVersionUID()
{
return uid;
}
-
- // Returns the serializable (non-static and non-transient) Fields
- // of the class represented by this ObjectStreamClass. The Fields
- // are sorted by name.
- // XXX doc
+ /**
+ * Returns the serializable (non-static and non-transient) Fields
+ * of the class represented by this ObjectStreamClass. The Fields
+ * are sorted by name.
+ *
+ * @return the fields.
+ */
public ObjectStreamField[] getFields()
{
ObjectStreamField[] copy = new ObjectStreamField[ fields.length ];
@@ -154,7 +157,6 @@
return copy;
}
-
// XXX doc
// Can't do binary search since fields is sorted by name and
// primitiveness.
@@ -166,7 +168,6 @@
return null;
}
-
/**
* Returns a textual representation of this
* ObjectStreamClass
object including the name of the
@@ -180,7 +181,6 @@
{
return "java.io.ObjectStreamClass< " + name + ", " + uid + " >";
}
-
// Returns true iff the class that this ObjectStreamClass represents
// has the following method:
Index: java/io/ObjectStreamField.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/ObjectStreamField.java,v
retrieving revision 1.15
diff -u -r1.15 ObjectStreamField.java
--- java/io/ObjectStreamField.java 8 Apr 2004 06:47:53 -0000 1.15
+++ java/io/ObjectStreamField.java 8 Apr 2004 15:03:37 -0000
@@ -86,6 +86,7 @@
*
* @param name Name of the field to export.
* @param type Type of the field in the concerned class.
+ * @param unshared true if field will be unshared, false otherwise.
*/
public ObjectStreamField (String name, Class type, boolean unshared)
{
@@ -237,9 +238,16 @@
return typename.length() == 1;
}
- public int compareTo (Object o)
+ /**
+ * Compares this object to the given object.
+ *
+ * @param obj the object to compare to.
+ *
+ * @return -1, 0 or 1.
+ */
+ public int compareTo (Object obj)
{
- ObjectStreamField f = (ObjectStreamField)o;
+ ObjectStreamField f = (ObjectStreamField) obj;
boolean this_is_primitive = isPrimitive ();
boolean f_is_primitive = f.isPrimitive ();
@@ -347,6 +355,11 @@
" in class " + field.getDeclaringClass());
}
+ /**
+ * Returns a string representing this object.
+ *
+ * @return the string.
+ */
public String toString ()
{
return "ObjectStreamField< " + type + " " + name + " >";
Index: java/io/PushbackReader.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/PushbackReader.java,v
retrieving revision 1.11
diff -u -r1.11 PushbackReader.java
--- java/io/PushbackReader.java 23 Mar 2003 10:39:02 -0000 1.11
+++ java/io/PushbackReader.java 8 Apr 2004 15:03:37 -0000
@@ -266,33 +266,34 @@
* of the chars requested, the remaining chars are read from the
* underlying stream.
*
- * @param buf The array into which the chars read should be stored
+ * @param buffer The array into which the chars read should be stored
* @param offset The offset into the array to start storing chars
- * @param len The requested number of chars to read
+ * @param length The requested number of chars to read
*
* @return The actual number of chars read, or -1 if end of stream.
*
* @exception IOException If an error occurs.
*/
- public synchronized int read(char[] b, int offset, int len) throws IOException
+ public synchronized int read(char[] buffer, int offset, int length)
+ throws IOException
{
synchronized (lock)
{
if (buf == null)
throw new IOException("stream closed");
- if (offset < 0 || len < 0 || offset + len > b.length)
+ if (offset < 0 || length < 0 || offset + length > buffer.length)
throw new ArrayIndexOutOfBoundsException();
- int numBytes = Math.min(buf.length - pos, len);
+ int numBytes = Math.min(buf.length - pos, length);
if (numBytes > 0)
{
- System.arraycopy (buf, pos, b, offset, numBytes);
+ System.arraycopy (buf, pos, buffer, offset, numBytes);
pos += numBytes;
return numBytes;
}
- return super.read(b, offset, len);
+ return super.read(buffer, offset, length);
}
}
@@ -353,30 +354,30 @@
* If the pushback buffer cannot hold all of the requested chars, an
* exception is thrown.
*
- * @param buf The char array to be pushed back
+ * @param buffer The char array to be pushed back
* @param offset The index into the array where the chars to be push start
- * @param len The number of chars to be pushed.
+ * @param length The number of chars to be pushed.
*
* @exception IOException If the pushback buffer is full
*/
- public synchronized void unread(char[] b, int offset, int len)
+ public synchronized void unread(char[] buffer, int offset, int length)
throws IOException
{
synchronized (lock)
{
if (buf == null)
throw new IOException("stream closed");
- if (pos < len)
+ if (pos < length)
throw new IOException("Pushback buffer is full");
// Note the order that these chars are being added is the opposite
// of what would be done if they were added to the buffer one at a time.
// See the Java Class Libraries book p. 1397.
- System.arraycopy(b, offset, buf, pos - len, len);
+ System.arraycopy(buffer, offset, buf, pos - length, length);
// Don't put this into the arraycopy above, an exception might be thrown
// and in that case we don't want to modify pos.
- pos -= len;
+ pos -= length;
}
}
}
Index: java/io/StringWriter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/StringWriter.java,v
retrieving revision 1.5
diff -u -r1.5 StringWriter.java
--- java/io/StringWriter.java 4 Feb 2003 21:08:16 -0000 1.5
+++ java/io/StringWriter.java 8 Apr 2004 15:03:37 -0000
@@ -60,6 +60,8 @@
/**
* This method closes the stream. The contents of the internal buffer
* can still be retrieved, but future writes are not guaranteed to work.
+ *
+ * @excepttion IOException If an error orrurs.
*/
public void close () throws IOException
{
Index: java/io/Writer.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/Writer.java,v
retrieving revision 1.10
diff -u -r1.10 Writer.java
--- java/io/Writer.java 23 Mar 2003 11:15:29 -0000 1.10
+++ java/io/Writer.java 8 Apr 2004 15:03:37 -0000
@@ -75,8 +75,8 @@
* This method initializes a Writer
that will synchronize
* on the specified Object
.
*
- * @param obj The Object
to use for synchronizing critical
- * sections
+ * @param lock The Object
to use for synchronizing critical
+ * sections
*/
protected Writer(Object lock)
{
@@ -157,7 +157,7 @@
*
* @param str The String
whose chars are to be written.
*
- * @param IOException If an error occurs
+ * @exception IOException If an error occurs
*/
public void write(String str) throws IOException
{