Browse Source

javadoc

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277900 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
231bbbd80e
2 changed files with 33 additions and 2 deletions
  1. +14
    -1
      src/main/org/apache/tools/ant/DemuxInputStream.java
  2. +19
    -1
      src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java

+ 14
- 1
src/main/org/apache/tools/ant/DemuxInputStream.java View File

@@ -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);
}


+ 19
- 1
src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java View File

@@ -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;
}


Loading…
Cancel
Save