|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.types.DataType org.apache.tools.ant.types.Resource org.apache.tools.ant.types.resources.StringResource
public class StringResource
Exposes a string as a Resource.
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.types.Resource |
---|
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE |
Fields inherited from class org.apache.tools.ant.types.DataType |
---|
checked, ref |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
StringResource()
Default constructor. |
|
StringResource(java.lang.String value)
Construct a StringResource with the supplied value. |
Method Summary | |
---|---|
protected java.lang.String |
getContent()
Get the content of this StringResource. |
java.lang.String |
getEncoding()
Get the encoding used by this StringResource. |
java.io.InputStream |
getInputStream()
Get an InputStream for the Resource. |
java.lang.String |
getName()
Synchronize access. |
java.io.OutputStream |
getOutputStream()
Get an OutputStream for the Resource. |
long |
getSize()
Get the size of this Resource. |
java.lang.String |
getValue()
Get the value of this StringResource. |
int |
hashCode()
Get the hash code for this Resource. |
void |
setEncoding(java.lang.String s)
Set the encoding to be used for this StringResource. |
void |
setName(java.lang.String s)
Enforce String immutability. |
void |
setRefid(Reference r)
Overrides the super version. |
void |
setValue(java.lang.String s)
The value attribute is a semantically superior alias for the name attribute. |
java.lang.String |
toString()
Get the string. |
Methods inherited from class org.apache.tools.ant.types.Resource |
---|
clone, compareTo, equals, getLastModified, getMagicNumber, isDirectory, isExists, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setSize, size, toLongString |
Methods inherited from class org.apache.tools.ant.types.DataType |
---|
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, setChecked, tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StringResource()
public StringResource(java.lang.String value)
value
- the value of this StringResource.Method Detail |
---|
public void setName(java.lang.String s)
setName
in class Resource
s
- the new name/value for this StringResource.public void setValue(java.lang.String s)
s
- the String's value.public java.lang.String getName()
getName
in class Resource
public java.lang.String getValue()
public void setEncoding(java.lang.String s)
s
- the encoding name.public java.lang.String getEncoding()
public long getSize()
getSize
in class Resource
public int hashCode()
hashCode
in class Resource
public java.lang.String toString()
toString
in class Resource
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in class Resource
java.io.IOException
- if unable to provide the content of this
Resource as a stream.
java.lang.UnsupportedOperationException
- if InputStreams are not
supported for this Resource type.public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in class Resource
java.io.IOException
- if unable to provide the content of this
Resource as a stream.
java.lang.UnsupportedOperationException
- if OutputStreams are not
supported for this Resource type.public void setRefid(Reference r)
setRefid
in class Resource
r
- the Reference to set.protected java.lang.String getContent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |