You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2004/02/10 07:06:05 UTC

cvs commit: jakarta-commons/io/src/java/org/apache/commons/io/input CountingInputStream.java

bayard      2004/02/09 22:06:05

  Modified:    io/src/java/org/apache/commons/io/input
                        CountingInputStream.java
  Log:
  improved javadoc
  
  Revision  Changes    Path
  1.7       +17 -4     jakarta-commons/io/src/java/org/apache/commons/io/input/CountingInputStream.java
  
  Index: CountingInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/io/src/java/org/apache/commons/io/input/CountingInputStream.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CountingInputStream.java	30 Dec 2003 15:19:00 -0000	1.6
  +++ CountingInputStream.java	10 Feb 2004 06:06:05 -0000	1.7
  @@ -75,21 +75,33 @@
           super(in);
       }
   
  -    /** @see java.io.InputStream#read(byte[]) */
  +    /**
  +     * Increases the count by super.read(b)'s return count
  +     * 
  +     * @see java.io.InputStream#read(byte[]) 
  +     */
       public int read(byte[] b) throws IOException {
           int found = super.read(b);
           this.count += found;
           return found;
       }
   
  -    /** @see java.io.InputStream#read(byte[], int, int) */
  +    /**
  +     * Increases the count by super.read(b, off, len)'s return count
  +     *
  +     * @see java.io.InputStream#read(byte[], int, int)
  +     */
       public int read(byte[] b, int off, int len) throws IOException {
           int found = super.read(b, off, len);
           this.count += found;
           return found;
       }
   
  -    /** @see java.io.InputStream#read() */
  +    /**
  +     * Increases the count by 1. 
  +     *
  +     * @see java.io.InputStream#read()
  +     */
       public int read() throws IOException {
           this.count++;
           return super.read();
  @@ -97,6 +109,7 @@
   
       /**
        * The number of bytes that have passed through this stream.
  +     *
        * @return the number of bytes accumulated
        */
       public int getCount() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org