org.apache.tools.ant.types.resources
Class StringResource
- Cloneable, Comparable, ResourceCollection
public class StringResource
Exposes a string as a Resource.
protected String | getContent() - Get the content of this StringResource.
|
String | getEncoding() - Get the encoding used by this StringResource.
|
InputStream | getInputStream() - Get an InputStream for the Resource.
|
String | getName() - Synchronize access.
|
OutputStream | getOutputStream() - Get an OutputStream for the Resource.
|
long | getSize() - Get the size of this Resource.
|
String | getValue() - Get the value of this StringResource.
|
int | hashCode() - Get the hash code for this Resource.
|
void | setEncoding(String s) - Set the encoding to be used for this StringResource.
|
void | setName(String s) - Enforce String immutability.
|
void | setRefid(Reference r) - Overrides the super version.
|
void | setValue(String s) - The value attribute is a semantically superior alias for the name attribute.
|
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 |
StringResource
public StringResource()
Default constructor.
StringResource
public StringResource(String value)
Construct a StringResource with the supplied value.
value
- the value of this StringResource.
getContent
protected String getContent()
Get the content of this StringResource.
- a String; if the Project has been set properties
replacement will be attempted.
getEncoding
public String getEncoding()
Get the encoding used by this StringResource.
getInputStream
public InputStream getInputStream()
throws IOException
Get an InputStream for the Resource.
- getInputStream in interface Resource
- an InputStream containing this Resource's content.
getName
public String getName()
Synchronize access.
- getName in interface Resource
- the name/value of this StringResource.
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 StringResource.
hashCode
public int hashCode()
Get the hash code for this Resource.
- hashCode in interface Resource
setEncoding
public void setEncoding(String s)
Set the encoding to be used for this StringResource.
setName
public void setName(String s)
Enforce String immutability.
- setName in interface Resource
s
- the new name/value for this StringResource.
setRefid
public void setRefid(Reference r)
Overrides the super version.
- setRefid in interface Resource
r
- the Reference to set.
setValue
public void setValue(String s)
The value attribute is a semantically superior alias for the name attribute.
toString
public String toString()
Get the string.
- toString in interface Resource
- the string contents of the resource.