com.aspose.imaging.fileformats.psd
Class ResourceBlock

java.lang.Object
  extended by com.aspose.imaging.fileformats.psd.ResourceBlock
Direct Known Subclasses:
GridAndGuidesResouce, ThumbnailResource, TransparencyIndexResource, UnknownResource

public abstract class ResourceBlock
extends java.lang.Object

The resource block.


Constructor Summary
ResourceBlock()
           
 
Method Summary
abstract  int getDataSize()
           Gets the resource data size in bytes.
 short getID()
           Gets or sets the unique identifier for the resource.
abstract  int getMinimalVersion()
           Gets the minimal required psd version.
 java.lang.String getName()
           Gets or sets 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)
           
 void setName(java.lang.String value)
           
 void validateValues()
           Validates the resource values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBlock

public ResourceBlock()
Method Detail

getDataSize

public abstract int getDataSize()

Gets the resource data size in bytes.

Value: The resource data size.


getID

public short getID()

Gets or sets the unique identifier for the resource.

Value: The unique identifier for the resource.


getMinimalVersion

public abstract int getMinimalVersion()

Gets the minimal required psd version.

Value: The minimal psd version.


getName

public java.lang.String getName()

Gets or 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.


getSignature

public int getSignature()

Gets the resource signature. Should be always '8BIM'.

Value: The resource signature.


getSize

public int getSize()

Gets the resource block size in bytes including its data.

Value: The resource block size.


save

public void save(StreamContainer stream)

Saves the resource block to the specified stream.

Parameters:
stream - The stream to save the resource block to.

saveData

protected abstract void saveData(StreamContainer streamContainer)

Saves the resource block data.

Parameters:
streamContainer - The stream container to save to.

setID

public void setID(short value)

setName

public void setName(java.lang.String value)

validateValues

public void validateValues()

Validates the resource values.