Class LogOutputResource

java.lang.Object
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<Resource>, java.lang.Iterable<Resource>, ResourceCollection, Appendable

public class LogOutputResource
extends Resource
implements Appendable
Output-only Resource that always appends to Ant's log.
Since:
Ant 1.8
  • Constructor Details

    • LogOutputResource

      public LogOutputResource​(ProjectComponent managingComponent)
      Create a new LogOutputResource.
      Parameters:
      managingComponent - ditto
    • LogOutputResource

      public LogOutputResource​(ProjectComponent managingComponent, int level)
      Create a new LogOutputResource.
      Parameters:
      managingComponent - owning log content
      level - log level
  • Method Details

    • getAppendOutputStream

      public java.io.OutputStream getAppendOutputStream() throws java.io.IOException
      Get an appending OutputStream.
      Specified by:
      getAppendOutputStream in interface Appendable
      Returns:
      OutputStream
      Throws:
      java.io.IOException - if anything goes wrong
    • getOutputStream

      public java.io.OutputStream getOutputStream() throws java.io.IOException
      Get an OutputStream for the Resource.
      Overrides:
      getOutputStream in class Resource
      Returns:
      an OutputStream to which content can be written.
      Throws:
      java.io.IOException - if unable to provide the content of this Resource as a stream.