org.apache.tools.ant.types.resources
Class PropertyResource
- Cloneable, Comparable, ResourceCollection
public class PropertyResource
Exposes an Ant property as a Resource.
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.
|
clone , compareTo , equals , getInputStream , getLastModified , getMagicNumber , getName , getOutputStream , getSize , hashCode , isDirectory , isExists , isFilesystemOnly , iterator , setDirectory , setExists , setLastModified , setName , setRefid , setSize , size , toLongString , toString |
checkAttributesAllowed , checkChildrenAllowed , circularReference , clone , dieOnCircularReference , dieOnCircularReference , dieOnCircularReference , getCheckedRef , getCheckedRef , getCheckedRef , getCheckedRef , getDataTypeName , getRefid , invokeCircularReferenceCheck , isChecked , isReference , noChildrenAllowed , setChecked , setRefid , toString , tooManyAttributes |
PropertyResource
public PropertyResource()
Default constructor.
PropertyResource
public PropertyResource(Project p,
String n)
Construct a new PropertyResource with the specified name.
p
- the project to use.n
- the String name of this PropertyResource (Ant property name/key).
getInputStream
public InputStream getInputStream()
throws IOException
Get an InputStream for the Resource.
- getInputStream in interface Resource
- an InputStream containing this Resource's content.
getOutputStream
public OutputStream getOutputStream()
throws IOException
Get an OutputStream for the Resource.
- getOutputStream in interface Resource
- an OutputStream to which content can be written.
getSize
public long getSize()
Get the size of this Resource.
- getSize in interface Resource
- the size, as a long, 0 if the Resource does not exist (for
compatibility with java.io.File), or UNKNOWN_SIZE if not known.
getValue
public String getValue()
Get the value of this PropertyResource.
- the value of the specified Property.
hashCode
public int hashCode()
Get the hash code for this Resource.
- hashCode in interface Resource
isExists
public boolean isExists()
Find out whether this Resource exists.
- isExists in interface Resource
- true if the Property is set, false otherwise.
toString
public String toString()
Get the string.
- toString in interface Resource
- the string contents of the resource.