diff --git a/src/main/org/apache/tools/ant/DemuxInputStream.java b/src/main/org/apache/tools/ant/DemuxInputStream.java index bbda50c38..1282c86f2 100644 --- a/src/main/org/apache/tools/ant/DemuxInputStream.java +++ b/src/main/org/apache/tools/ant/DemuxInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,11 @@ public class DemuxInputStream extends InputStream { this.project = project; } + /** + * Read a byte from the project's demuxed input. + * @return the next byte + * @throws IOException on error + */ public int read() throws IOException { byte[] buffer = new byte[1]; if (project.demuxInput(buffer, 0, 1) == -1) { @@ -52,6 +57,14 @@ public class DemuxInputStream extends InputStream { } + /** + * Read bytes from the project's demuxed input. + * @param buffer an array of bytes to read into + * @param offset the offset in the array of bytes + * @param length the number of bytes in the array + * @return the number of bytes read + * @throws IOException on error + */ public int read(byte[] buffer, int offset, int length) throws IOException { return project.demuxInput(buffer, offset, length); } diff --git a/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java b/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java index bbba7811e..cc2b7f14c 100644 --- a/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java +++ b/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 The Apache Software Foundation + * Copyright 2002-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -282,18 +282,36 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { PrintStream out = System.out; PrintStream err = System.err; + /** + * Set the the output level. + * This is not used, the logger config is used instead. + * @param level ignored + */ public void setMessageOutputLevel(int level) { // Use the logger config } + /** + * Set the output print stream. + * @param output the output stream + */ public void setOutputPrintStream(PrintStream output) { this.out = output; } + /** + * Set emacs mode. + * This is ignored. + * @param emacsMode ignored + */ public void setEmacsMode(boolean emacsMode) { // Doesn't make sense for c-l. Use the logger config } + /** + * Set the error print stream. + * @param err the error stream + */ public void setErrorPrintStream(PrintStream err) { this.err = err; }