org.apache.tools.ant.types.resources
Class LogOutputResource
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.Resource
org.apache.tools.ant.types.resources.LogOutputResource
- 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
Methods inherited from class org.apache.tools.ant.types.Resource |
as, clone, compareTo, equals, getInputStream, getLastModified, getMagicNumber, getName, getSize, hashCode, isDirectory, isExists, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setRefid, setSize, size, toLongString, toString |
Methods inherited from class org.apache.tools.ant.types.DataType |
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
LogOutputResource
public LogOutputResource(ProjectComponent managingComponent)
- Create a new LogOutputResource.
- Parameters:
managingComponent
-
LogOutputResource
public LogOutputResource(ProjectComponent managingComponent,
int level)
- Create a new LogOutputResource.
- Parameters:
managingComponent
- owning log contentlevel
- log level
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.