net.sf.fikin.ant.types
Class PropertyOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ByteArrayOutputStream
          extended by net.sf.fikin.ant.types.PropertyOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class PropertyOutputStream
extends java.io.ByteArrayOutputStream

Output stream writing in a Ant Project property

All write opearations are backed by a StringWriter

Upon close() it will populate the property's value created on Jan 3, 2007

Since:
Version:
$Revision: 1.4 $
Author:
fiykov

Field Summary
 
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
 
Constructor Summary
PropertyOutputStream(java.lang.String propertyName, org.apache.tools.ant.Task task, boolean append, boolean trim)
          Instantiate a new property writer with given data
 
Method Summary
 void close()
          close the stream and populate property's value
 void write(java.lang.String str)
          for convenience only method
 
Methods inherited from class java.io.ByteArrayOutputStream
reset, size, toByteArray, toString, toString, toString, write, write, writeTo
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyOutputStream

public PropertyOutputStream(java.lang.String propertyName,
                            org.apache.tools.ant.Task task,
                            boolean append,
                            boolean trim)
Instantiate a new property writer with given data

Parameters:
propertyName - to store the value to, if exists it will overwrite it
task - enclosing task
append - it will add to the property value if set to true
trim - value before setting it
Method Detail

close

public void close()
           throws java.io.IOException
close the stream and populate property's value

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.ByteArrayOutputStream
Throws:
java.io.IOException

write

public void write(java.lang.String str)
for convenience only method

Parameters:
str -


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.