Methods Summary |
---|
public java.io.InputStream | getInputStream()Get an InputStream for the Resource.
if (isReference()) {
return ((Resource) getCheckedRef()).getInputStream();
}
return isExists() ? new ByteArrayInputStream(getValue().getBytes()) : UNSET;
|
public java.io.OutputStream | getOutputStream()Get an OutputStream for the Resource.
if (isReference()) {
return ((Resource) getCheckedRef()).getOutputStream();
}
if (isExists()) {
throw new ImmutableResourceException();
}
return new PropertyOutputStream(getProject(), getName());
|
public long | getSize()Get the size of this Resource.
if (isReference()) {
return ((Resource) getCheckedRef()).getSize();
}
return isExists() ? (long) getValue().length() : 0L;
|
public java.lang.String | getValue()Get the value of this PropertyResource.
Project p = getProject();
return p == null ? null : p.getProperty(getName());
|
public int | hashCode()Get the hash code for this Resource.
if (isReference()) {
return getCheckedRef().hashCode();
}
return super.hashCode() * PROPERTY_MAGIC;
|
public boolean | isExists()Find out whether this Resource exists.
return getValue() != null;
|
public java.lang.String | toString()Get the string.
if (isReference()) {
return getCheckedRef().toString();
}
return String.valueOf(getValue());
|