commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output CountingOutputStream.java
Date Sun, 27 Jul 2003 17:16:32 GMT
jeremias    2003/07/27 10:16:32

  Modified:    io/src/java/org/apache/commons/io/output
                        CountingOutputStream.java
  Log:
  Correct license
  Javadocs
  
  Revision  Changes    Path
  1.3       +23 -18    jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output/CountingOutputStream.java
  
  Index: CountingOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/output/CountingOutputStream.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CountingOutputStream.java	7 Dec 2002 20:31:08 -0000	1.2
  +++ CountingOutputStream.java	27 Jul 2003 17:16:32 -0000	1.3
  @@ -1,9 +1,7 @@
  -package org.apache.commons.io.output;
  -
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -18,21 +16,21 @@
    *    the documentation and/or other materials provided with the
    *    distribution.
    *
  - * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  + * 3. The end-user documentation included with the redistribution, if
  + *    any, must include the following acknowlegement:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software itself,
  - *    if and wherever such third-party acknowledgments normally appear.
  + *    Alternately, this acknowlegement may appear in the software itself,
  + *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "Apache" and "Apache Software Foundation" and
  - *    "Apache Turbine" must not be used to endorse or promote products
  - *    derived from this software without prior written permission. For
  - *    written permission, please contact apache@apache.org.
  - *
  - * 5. Products derived from this software may not be called "Apache",
  - *    "Apache Turbine", nor may "Apache" appear in their name, without
  - *    prior written permission of the Apache Software Foundation.
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
  + *    Foundation" must not be used to endorse or promote products derived
  + *    from this software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache"
  + *    nor may "Apache" appear in their names without prior written
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -53,10 +51,10 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +package org.apache.commons.io.output;
   
   import java.io.IOException;
   import java.io.OutputStream;
  -import org.apache.commons.io.ProxyOutputStream;
   
   /**
    * Used in debugging, it counts the number of bytes that pass 
  @@ -69,21 +67,27 @@
   
       private int count;
   
  +    /**
  +     * Constructs a CountingOutputStream.
  +     * @param out the OutputStream to write to
  +     */
       public CountingOutputStream( OutputStream out ) {
           super(out);
       }
   
  +    /** @see java.io.OutputStream#write(byte[]) */
       public void write(byte[] b) throws IOException {
           count += b.length;
           super.write(b);
       }
   
  +    /** @see java.io.OutputStream#write(byte[], int, int) */
       public void write(byte[] b, int off, int len) throws IOException {
           count += len;
           super.write(b, off, len);
       }
   
  -    /// TODO: Decide if this should increment by 2, or 4, or 1 etc.
  +    /** @see java.io.OutputStream#write(int) */
       public void write(int b) throws IOException {
           count++;
           super.write(b);
  @@ -91,6 +95,7 @@
   
       /**
        * The number of bytes that have passed through this stream.
  +     * @return the number of bytes accumulated
        */
       public int getCount() {
           return this.count;
  
  
  

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


Mime
View raw message