Browse Source

add @since tag, remove unthrowable constructor exception, and shrink some stuff

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@450609 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 18 years ago
parent
commit
9daeaaf04e
1 changed files with 5 additions and 9 deletions
  1. +5
    -9
      src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java

+ 5
- 9
src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java View File

@@ -31,6 +31,7 @@ import org.apache.tools.ant.types.ResourceCollection;
/** /**
* Special <code>InputStream</code> that will * Special <code>InputStream</code> that will
* concatenate the contents of Resources from a single ResourceCollection. * concatenate the contents of Resources from a single ResourceCollection.
* @since Ant 1.7
*/ */
public class ConcatResourceInputStream extends InputStream { public class ConcatResourceInputStream extends InputStream {


@@ -45,9 +46,8 @@ public class ConcatResourceInputStream extends InputStream {
* Construct a new ConcatResourceInputStream * Construct a new ConcatResourceInputStream
* for the specified ResourceCollection. * for the specified ResourceCollection.
* @param rc the ResourceCollection to combine. * @param rc the ResourceCollection to combine.
* @throws IOException if I/O errors occur.
*/ */
public ConcatResourceInputStream(ResourceCollection rc) throws IOException {
public ConcatResourceInputStream(ResourceCollection rc) {
iter = rc.iterator(); iter = rc.iterator();
} }


@@ -104,16 +104,12 @@ public class ConcatResourceInputStream extends InputStream {
if (managingPc != null) { if (managingPc != null) {
managingPc.log(message, loglevel); managingPc.log(message, loglevel);
} else { } else {
if (loglevel > Project.MSG_WARN) {
System.out.println(message);
} else {
System.err.println(message);
}
(loglevel > Project.MSG_WARN ? System.out : System.err).println(message);
} }
} }


private int readCurrent() throws IOException { private int readCurrent() throws IOException {
return (eof || currentStream == null) ? EOF : currentStream.read();
return eof || currentStream == null ? EOF : currentStream.read();
} }


private void nextResource() throws IOException { private void nextResource() throws IOException {
@@ -141,4 +137,4 @@ public class ConcatResourceInputStream extends InputStream {
FileUtils.close(currentStream); FileUtils.close(currentStream);
currentStream = null; currentStream = null;
} }
}
}

Loading…
Cancel
Save