Skip to content

Commit fc2416d

Browse files
committed
Correct license
Javadocs git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@140375 13f79535-47bb-0310-9956-ffa450edef68
1 parent 79f638c commit fc2416d

7 files changed

Lines changed: 174 additions & 112 deletions

File tree

src/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
package org.apache.commons.io.input;
2-
31
/* ====================================================================
42
* The Apache Software License, Version 1.1
53
*
6-
* Copyright (c) 2001 The Apache Software Foundation. All rights
4+
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
75
* reserved.
86
*
97
* Redistribution and use in source and binary forms, with or without
@@ -18,21 +16,21 @@
1816
* the documentation and/or other materials provided with the
1917
* distribution.
2018
*
21-
* 3. The end-user documentation included with the redistribution,
22-
* if any, must include the following acknowledgment:
19+
* 3. The end-user documentation included with the redistribution, if
20+
* any, must include the following acknowlegement:
2321
* "This product includes software developed by the
2422
* Apache Software Foundation (http://www.apache.org/)."
25-
* Alternately, this acknowledgment may appear in the software itself,
26-
* if and wherever such third-party acknowledgments normally appear.
23+
* Alternately, this acknowlegement may appear in the software itself,
24+
* if and wherever such third-party acknowlegements normally appear.
2725
*
28-
* 4. The names "Apache" and "Apache Software Foundation" and
29-
* "Apache Turbine" must not be used to endorse or promote products
30-
* derived from this software without prior written permission. For
31-
* written permission, please contact apache@apache.org.
26+
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
27+
* Foundation" must not be used to endorse or promote products derived
28+
* from this software without prior written permission. For written
29+
* permission, please contact apache@apache.org.
3230
*
33-
* 5. Products derived from this software may not be called "Apache",
34-
* "Apache Turbine", nor may "Apache" appear in their name, without
35-
* prior written permission of the Apache Software Foundation.
31+
* 5. Products derived from this software may not be called "Apache"
32+
* nor may "Apache" appear in their names without prior written
33+
* permission of the Apache Software Foundation.
3634
*
3735
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
3836
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -53,6 +51,7 @@
5351
* information on the Apache Software Foundation, please see
5452
* <http://www.apache.org/>.
5553
*/
54+
package org.apache.commons.io.input;
5655

5756
import java.io.IOException;
5857
import java.io.InputStream;
@@ -65,13 +64,20 @@
6564
* by Avalon components that are juggling many classloaders.
6665
*
6766
* @author <a href="mailto:paul_hammant@yahoo.com">Paul Hammant</a>
68-
* @version $Revision: 1.1 $ $Date: 2002/11/11 19:34:02 $
67+
* @version $Revision: 1.2 $ $Date: 2003/07/27 17:13:16 $
6968
*/
7069
public class ClassLoaderObjectInputStream
7170
extends ObjectInputStream
7271
{
7372
private ClassLoader m_classLoader;
7473

74+
/**
75+
* Constructs a new ClassLoaderObjectInputStream.
76+
* @param classLoader ClassLoader from which classes should be loaded.
77+
* @param inputStream InputStream to work on
78+
* @throws IOException in case of an I/O error
79+
* @throws StreamCorruptedException if the stream is corrupted
80+
*/
7581
public ClassLoaderObjectInputStream( final ClassLoader classLoader,
7682
final InputStream inputStream )
7783
throws IOException, StreamCorruptedException
@@ -80,6 +86,7 @@ public ClassLoaderObjectInputStream( final ClassLoader classLoader,
8086
m_classLoader = classLoader;
8187
}
8288

89+
/** @see java.io.ObjectInputStream#resolveClass(java.io.ObjectStreamClass) */
8390
protected Class resolveClass( final ObjectStreamClass objectStreamClass )
8491
throws IOException, ClassNotFoundException
8592
{

src/java/org/apache/commons/io/input/CountingInputStream.java

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
package org.apache.commons.io.input;
2-
31
/* ====================================================================
42
* The Apache Software License, Version 1.1
53
*
6-
* Copyright (c) 2001 The Apache Software Foundation. All rights
4+
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
75
* reserved.
86
*
97
* Redistribution and use in source and binary forms, with or without
@@ -18,21 +16,21 @@
1816
* the documentation and/or other materials provided with the
1917
* distribution.
2018
*
21-
* 3. The end-user documentation included with the redistribution,
22-
* if any, must include the following acknowledgment:
19+
* 3. The end-user documentation included with the redistribution, if
20+
* any, must include the following acknowlegement:
2321
* "This product includes software developed by the
2422
* Apache Software Foundation (http://www.apache.org/)."
25-
* Alternately, this acknowledgment may appear in the software itself,
26-
* if and wherever such third-party acknowledgments normally appear.
23+
* Alternately, this acknowlegement may appear in the software itself,
24+
* if and wherever such third-party acknowlegements normally appear.
2725
*
28-
* 4. The names "Apache" and "Apache Software Foundation" and
29-
* "Apache Turbine" must not be used to endorse or promote products
30-
* derived from this software without prior written permission. For
31-
* written permission, please contact apache@apache.org.
26+
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
27+
* Foundation" must not be used to endorse or promote products derived
28+
* from this software without prior written permission. For written
29+
* permission, please contact apache@apache.org.
3230
*
33-
* 5. Products derived from this software may not be called "Apache",
34-
* "Apache Turbine", nor may "Apache" appear in their name, without
35-
* prior written permission of the Apache Software Foundation.
31+
* 5. Products derived from this software may not be called "Apache"
32+
* nor may "Apache" appear in their names without prior written
33+
* permission of the Apache Software Foundation.
3634
*
3735
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
3836
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -53,6 +51,7 @@
5351
* information on the Apache Software Foundation, please see
5452
* <http://www.apache.org/>.
5553
*/
54+
package org.apache.commons.io.input;
5655

5756
import java.io.IOException;
5857
import java.io.InputStream;
@@ -63,34 +62,41 @@
6362
* through it.
6463
*
6564
* @author <a href="mailto:bayard@apache.org">Henri Yandell</a>
66-
* @version $Id: CountingInputStream.java,v 1.1 2002/11/11 19:34:02 bayard Exp $
65+
* @version $Id: CountingInputStream.java,v 1.2 2003/07/27 17:13:41 jeremias Exp $
6766
*/
6867
public class CountingInputStream extends FilterInputStream {
6968

7069
private int count;
7170

71+
/**
72+
* Constructs a new CountingInputStream.
73+
* @param in InputStream to delegate to
74+
*/
7275
public CountingInputStream( InputStream in ) {
7376
super(in);
7477
}
7578

79+
/** @see java.io.InputStream#read(byte[]) */
7680
public int read(byte[] b) throws IOException {
7781
count += b.length;
7882
return super.read(b);
7983
}
8084

85+
/** @see java.io.InputStream#read(byte[], int, int) */
8186
public int read(byte[] b, int off, int len) throws IOException {
8287
count += len;
8388
return super.read(b, off, len);
8489
}
8590

86-
/// TODO: Decide if this should increment by 2, or 4, or 1 etc.
91+
/** @see java.io.InputStream#read() */
8792
public int read() throws IOException {
8893
count++;
8994
return super.read();
9095
}
9196

9297
/**
9398
* The number of bytes that have passed through this stream.
99+
* @return the number of bytes accumulated
94100
*/
95101
public int getCount() {
96102
return this.count;

src/java/org/apache/commons/io/input/DemuxInputStream.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
package org.apache.commons.io.input;
2-
31
/* ====================================================================
42
* The Apache Software License, Version 1.1
53
*
6-
* Copyright (c) 2001 The Apache Software Foundation. All rights
4+
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
75
* reserved.
86
*
97
* Redistribution and use in source and binary forms, with or without
@@ -18,21 +16,21 @@
1816
* the documentation and/or other materials provided with the
1917
* distribution.
2018
*
21-
* 3. The end-user documentation included with the redistribution,
22-
* if any, must include the following acknowledgment:
19+
* 3. The end-user documentation included with the redistribution, if
20+
* any, must include the following acknowlegement:
2321
* "This product includes software developed by the
2422
* Apache Software Foundation (http://www.apache.org/)."
25-
* Alternately, this acknowledgment may appear in the software itself,
26-
* if and wherever such third-party acknowledgments normally appear.
23+
* Alternately, this acknowlegement may appear in the software itself,
24+
* if and wherever such third-party acknowlegements normally appear.
2725
*
28-
* 4. The names "Apache" and "Apache Software Foundation" and
29-
* "Apache Turbine" must not be used to endorse or promote products
30-
* derived from this software without prior written permission. For
31-
* written permission, please contact apache@apache.org.
26+
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
27+
* Foundation" must not be used to endorse or promote products derived
28+
* from this software without prior written permission. For written
29+
* permission, please contact apache@apache.org.
3230
*
33-
* 5. Products derived from this software may not be called "Apache",
34-
* "Apache Turbine", nor may "Apache" appear in their name, without
35-
* prior written permission of the Apache Software Foundation.
31+
* 5. Products derived from this software may not be called "Apache"
32+
* nor may "Apache" appear in their names without prior written
33+
* permission of the Apache Software Foundation.
3634
*
3735
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
3836
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -53,6 +51,7 @@
5351
* information on the Apache Software Foundation, please see
5452
* <http://www.apache.org/>.
5553
*/
54+
package org.apache.commons.io.input;
5655

5756
import java.io.IOException;
5857
import java.io.InputStream;
@@ -62,7 +61,7 @@
6261
* with this thread.
6362
*
6463
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
65-
* @version $Revision: 1.1 $ $Date: 2002/11/11 19:34:02 $
64+
* @version $Revision: 1.2 $ $Date: 2003/07/27 17:14:00 $
6665
*/
6766
public final class DemuxInputStream
6867
extends InputStream
@@ -73,6 +72,7 @@ public final class DemuxInputStream
7372
* Bind the specified stream to the current thread.
7473
*
7574
* @param input the stream to bind
75+
* @return the InputStream that was previously active
7676
*/
7777
public InputStream bindStream( final InputStream input )
7878
{

src/java/org/apache/commons/io/output/CountingOutputStream.java

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
package org.apache.commons.io.output;
2-
31
/* ====================================================================
42
* The Apache Software License, Version 1.1
53
*
6-
* Copyright (c) 2001 The Apache Software Foundation. All rights
4+
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
75
* reserved.
86
*
97
* Redistribution and use in source and binary forms, with or without
@@ -18,21 +16,21 @@
1816
* the documentation and/or other materials provided with the
1917
* distribution.
2018
*
21-
* 3. The end-user documentation included with the redistribution,
22-
* if any, must include the following acknowledgment:
19+
* 3. The end-user documentation included with the redistribution, if
20+
* any, must include the following acknowlegement:
2321
* "This product includes software developed by the
2422
* Apache Software Foundation (http://www.apache.org/)."
25-
* Alternately, this acknowledgment may appear in the software itself,
26-
* if and wherever such third-party acknowledgments normally appear.
23+
* Alternately, this acknowlegement may appear in the software itself,
24+
* if and wherever such third-party acknowlegements normally appear.
2725
*
28-
* 4. The names "Apache" and "Apache Software Foundation" and
29-
* "Apache Turbine" must not be used to endorse or promote products
30-
* derived from this software without prior written permission. For
31-
* written permission, please contact apache@apache.org.
26+
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
27+
* Foundation" must not be used to endorse or promote products derived
28+
* from this software without prior written permission. For written
29+
* permission, please contact apache@apache.org.
3230
*
33-
* 5. Products derived from this software may not be called "Apache",
34-
* "Apache Turbine", nor may "Apache" appear in their name, without
35-
* prior written permission of the Apache Software Foundation.
31+
* 5. Products derived from this software may not be called "Apache"
32+
* nor may "Apache" appear in their names without prior written
33+
* permission of the Apache Software Foundation.
3634
*
3735
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
3836
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -53,44 +51,51 @@
5351
* information on the Apache Software Foundation, please see
5452
* <http://www.apache.org/>.
5553
*/
54+
package org.apache.commons.io.output;
5655

5756
import java.io.IOException;
5857
import java.io.OutputStream;
59-
import org.apache.commons.io.ProxyOutputStream;
6058

6159
/**
6260
* Used in debugging, it counts the number of bytes that pass
6361
* through it.
6462
*
6563
* @author <a href="mailto:bayard@apache.org">Henri Yandell</a>
66-
* @version $Id: CountingOutputStream.java,v 1.2 2002/12/07 20:31:08 bayard Exp $
64+
* @version $Id: CountingOutputStream.java,v 1.3 2003/07/27 17:16:32 jeremias Exp $
6765
*/
6866
public class CountingOutputStream extends ProxyOutputStream {
6967

7068
private int count;
7169

70+
/**
71+
* Constructs a CountingOutputStream.
72+
* @param out the OutputStream to write to
73+
*/
7274
public CountingOutputStream( OutputStream out ) {
7375
super(out);
7476
}
7577

78+
/** @see java.io.OutputStream#write(byte[]) */
7679
public void write(byte[] b) throws IOException {
7780
count += b.length;
7881
super.write(b);
7982
}
8083

84+
/** @see java.io.OutputStream#write(byte[], int, int) */
8185
public void write(byte[] b, int off, int len) throws IOException {
8286
count += len;
8387
super.write(b, off, len);
8488
}
8589

86-
/// TODO: Decide if this should increment by 2, or 4, or 1 etc.
90+
/** @see java.io.OutputStream#write(int) */
8791
public void write(int b) throws IOException {
8892
count++;
8993
super.write(b);
9094
}
9195

9296
/**
9397
* The number of bytes that have passed through this stream.
98+
* @return the number of bytes accumulated
9499
*/
95100
public int getCount() {
96101
return this.count;

0 commit comments

Comments
 (0)