FileDocCategorySizeDatePackage
PropertyOutputStream.javaAPI DocApache Ant 1.702195Wed Dec 13 06:16:18 GMT 2006org.apache.tools.ant.util

PropertyOutputStream

public class PropertyOutputStream extends ByteArrayOutputStream
Exception thrown when an attempt is made to get an OutputStream from an immutable Resource.
since
Ant 1.7

Fields Summary
private org.apache.tools.ant.Project
project
private String
property
private boolean
trim
Constructors Summary
public PropertyOutputStream(org.apache.tools.ant.Project p, String s)
Construct a new PropertyOutputStream for the specified Project and property name, trimming the property value.

param
p the associated Ant Project.
param
s the String property name.

        this(p, s, true);
    
public PropertyOutputStream(org.apache.tools.ant.Project p, String s, boolean b)
Construct a new PropertyOutputStream for the specified Project, property name, and trim mode.

param
p the associated Ant Project.
param
s the String property name.
param
b the boolean trim mode.

        project = p;
        property = s;
        trim = b;
    
Methods Summary
public voidclose()
Close the PropertyOutputStream, storing the property.

        if (project != null && property != null) {
            String s = new String(toByteArray());
            project.setNewProperty(property, trim ? s.trim() : s);
        }