git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277900 13f79535-47bb-0310-9956-ffa450edef68master
@@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
* you may not use this file except in compliance with 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; | 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 { | public int read() throws IOException { | ||||
byte[] buffer = new byte[1]; | byte[] buffer = new byte[1]; | ||||
if (project.demuxInput(buffer, 0, 1) == -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 { | public int read(byte[] buffer, int offset, int length) throws IOException { | ||||
return project.demuxInput(buffer, offset, length); | return project.demuxInput(buffer, offset, length); | ||||
} | } | ||||
@@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
* you may not use this file except in compliance with 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 out = System.out; | ||||
PrintStream err = System.err; | 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) { | public void setMessageOutputLevel(int level) { | ||||
// Use the logger config | // Use the logger config | ||||
} | } | ||||
/** | |||||
* Set the output print stream. | |||||
* @param output the output stream | |||||
*/ | |||||
public void setOutputPrintStream(PrintStream output) { | public void setOutputPrintStream(PrintStream output) { | ||||
this.out = output; | this.out = output; | ||||
} | } | ||||
/** | |||||
* Set emacs mode. | |||||
* This is ignored. | |||||
* @param emacsMode ignored | |||||
*/ | |||||
public void setEmacsMode(boolean emacsMode) { | public void setEmacsMode(boolean emacsMode) { | ||||
// Doesn't make sense for c-l. Use the logger config | // 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) { | public void setErrorPrintStream(PrintStream err) { | ||||
this.err = err; | this.err = err; | ||||
} | } | ||||