org.apache.tools.ant.types.resources
public class PropertyResource extends Resource
Since: Ant 1.7
Constructor Summary | |
---|---|
PropertyResource()
Default constructor. | |
PropertyResource(Project p, String n)
Construct a new PropertyResource with the specified name. |
Method Summary | |
---|---|
InputStream | getInputStream()
Get an InputStream for the Resource. |
OutputStream | getOutputStream()
Get an OutputStream for the Resource. |
long | getSize()
Get the size of this Resource. |
String | getValue()
Get the value of this PropertyResource. |
int | hashCode()
Get the hash code for this Resource. |
boolean | isExists()
Find out whether this Resource exists. |
String | toString()
Get the string.
|
Parameters: p the project to use. n the String name of this PropertyResource (Ant property name/key).
Returns: an InputStream containing this Resource's content.
Throws: IOException if unable to provide the content of this Resource as a stream. UnsupportedOperationException if InputStreams are not supported for this Resource type.
Returns: an OutputStream to which content can be written.
Throws: IOException if unable to provide the content of this Resource as a stream. UnsupportedOperationException if OutputStreams are not supported for this Resource type.
Returns: the size, as a long, 0 if the Resource does not exist (for compatibility with java.io.File), or UNKNOWN_SIZE if not known.
Returns: the value of the specified Property.
Returns: hash code as int.
Returns: true if the Property is set, false otherwise.
Returns: the string contents of the resource.
Since: Ant 1.7