PropertyOutputStreampublic class PropertyOutputStream extends ByteArrayOutputStream Exception thrown when an attempt is made to get an OutputStream
from an immutable Resource. |
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.
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.
project = p;
property = s;
trim = b;
|
Methods Summary |
---|
public void | close()Close the PropertyOutputStream, storing the property.
if (project != null && property != null) {
String s = new String(toByteArray());
project.setNewProperty(property, trim ? s.trim() : s);
}
|
|