public abstract class ResourceBlock
extends java.lang.Object
The resource block.
Constructor and Description |
---|
ResourceBlock() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getDataSize()
Gets the resource data size in bytes.
|
short |
getID()
Gets the unique identifier for the resource.
|
abstract int |
getMinimalVersion()
Gets the minimal required psd version.
|
java.lang.String |
getName()
Gets the resource name.
|
int |
getSignature()
Gets the resource signature.
|
int |
getSize()
Gets the resource block size in bytes including its data.
|
void |
save(StreamContainer stream)
Saves the resource block to the specified stream.
|
protected abstract void |
saveData(StreamContainer streamContainer)
Saves the resource block data.
|
void |
setID(short value)
Sets the unique identifier for the resource.
|
void |
setName(java.lang.String value)
Sets the resource name.
|
void |
validateValues()
Validates the resource values.
|
public abstract int getDataSize()
Gets the resource data size in bytes.
Value: The resource data size.public short getID()
Gets the unique identifier for the resource.
Value: The unique identifier for the resource.public abstract int getMinimalVersion()
Gets the minimal required psd version.
Value: The minimal psd version.public java.lang.String getName()
Gets the resource name. Pascal string, padded to make the size even (a null name consists of two bytes of 0).
Value: The resource name.public int getSignature()
Gets the resource signature. Should be always '8BIM'.
Value: The resource signature.public int getSize()
Gets the resource block size in bytes including its data.
Value: The resource block size.public void save(StreamContainer stream)
Saves the resource block to the specified stream.
stream
- The stream to save the resource block to.protected abstract void saveData(StreamContainer streamContainer)
Saves the resource block data.
streamContainer
- The stream container to save to.public void setID(short value)
Sets the unique identifier for the resource.
Value: The unique identifier for the resource.public void setName(java.lang.String value)
Sets the resource name. Pascal string, padded to make the size even (a null name consists of two bytes of 0).
Value: The resource name.public void validateValues()
Validates the resource values.