I'm committing the attached patch which adds documentation to the
three new methods in java.io.CharArrayWriter.

Changelog:

2006-03-27  Andrew John Hughes  <[EMAIL PROTECTED]>

        * java/io/CharArrayWriter.java:
        (append(char)): Documented.
        (append(CharSequence)): Likewise.
        (append(CharSequence,int,int)): Likewise.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/io/CharArrayWriter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/CharArrayWriter.java,v
retrieving revision 1.9.2.4
diff -u -3 -p -u -r1.9.2.4 CharArrayWriter.java
--- java/io/CharArrayWriter.java        2 Aug 2005 20:12:16 -0000       1.9.2.4
+++ java/io/CharArrayWriter.java        27 Mar 2006 21:17:31 -0000
@@ -242,14 +242,37 @@ public class CharArrayWriter extends Wri
       }
   }
 
-  /** @since 1.5 */
+  /** 
+   * Appends the Unicode character, <code>c</code>, to the output stream
+   * underlying this writer.  This is equivalent to <code>write(c)</code>.
+   *
+   * @param c the character to append.
+   * @return a reference to this object.
+   * @since 1.5 
+   */
   public CharArrayWriter append(char c)
   {
     write(c);
     return this;
   }
 
-  /** @since 1.5 */
+  /** 
+   * Appends the specified sequence of Unicode characters to the
+   * output stream underlying this writer.  This is equivalent to
+   * appending the results of calling <code>toString()</code> on the
+   * character sequence.  As a result, the entire sequence may not be
+   * appended, as it depends on the implementation of
+   * <code>toString()</code> provided by the
+   * <code>CharSequence</code>.  For example, if the character
+   * sequence is wrapped around an input buffer, the results will
+   * depend on the current position and length of that buffer.
+   *
+   * @param seq the character sequence to append.  If seq is null,
+   *        then the string "null" (the string representation of null)
+   *        is appended.
+   * @return a reference to this object.
+   * @since 1.5 
+   */
   public CharArrayWriter append(CharSequence cs)
   {
     try
@@ -263,7 +286,27 @@ public class CharArrayWriter extends Wri
     return this;
   }
 
-  /** @since 1.5 */
+  /** 
+   * Appends the specified subsequence of Unicode characters to the
+   * output stream underlying this writer, starting and ending at the
+   * specified positions within the sequence.  The behaviour of this
+   * method matches the behaviour of writing the result of
+   * <code>append(seq.subSequence(start,end))</code> when the sequence
+   * is not null.
+   *
+   * @param seq the character sequence to append.  If seq is null,
+   *        then the string "null" (the string representation of null)
+   *        is appended.
+   * @param start the index of the first Unicode character to use from
+   *        the sequence.
+   * @param end the index of the last Unicode character to use from the
+   *        sequence.
+   * @return a reference to this object.
+   * @throws IndexOutOfBoundsException if either of the indices are negative,
+   *         the start index occurs after the end index, or the end index is
+   *         beyond the end of the sequence.
+   * @since 1.5
+   */
   public CharArrayWriter append(CharSequence cs, int start, int end)
   {
     try

Attachment: signature.asc
Description: Digital signature

Reply via email to