ResourceBlock

The resource block.

Constructors

ConstructorDescription
ResourceBlock()

Fields

FieldDescription
RESOUCE_BLOCK_SIGNATUREThe resource signature.

Methods

MethodDescription
getSignature()Gets the resource signature. Should be always ‘8BIM’.
getID()Gets or sets the unique identifier for the resource.
setID(short value)Gets or sets the unique identifier for the resource.
getName()Gets or sets the resource name. Pascal string, padded to make the size even (a null name consists of two bytes of 0).
setName(String value)Gets or sets the resource name. Pascal string, padded to make the size even (a null name consists of two bytes of 0).
getDataSize()Gets the resource data size in bytes.
getSize()Gets the resource block size in bytes including its data.
getMinimalVersion()Gets the minimal required PSD version.
save(com.aspose.cad.StreamContainer stream)Saves the resource block to the specified stream.
validateValues()Validates the resource values.

ResourceBlock()

public ResourceBlock()

RESOUCE_BLOCK_SIGNATURE

public static final int RESOUCE_BLOCK_SIGNATURE

The resource signature.

Returns: int

getSignature()

public int getSignature()

Gets the resource signature. Should be always ‘8BIM’.

Returns: int - The resource signature.

getID()

public short getID()

Gets or sets the unique identifier for the resource.

Returns: short - The unique identifier for the resource.

setID(short value)

public void setID(short value)

Gets or sets the unique identifier for the resource.

Parameters:

ParameterTypeDescription
valueshortThe unique identifier for the resource.

getName()

public 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).

Returns: String - The resource name.

setName(String value)

public void setName(String value)

Gets or sets the resource name. Pascal string, padded to make the size even (a null name consists of two bytes of 0).

Parameters:

ParameterTypeDescription
valueStringThe resource name.

getDataSize()

public abstract int getDataSize()

Gets the resource data size in bytes.

Returns: int - The resource data size.

getSize()

public int getSize()

Gets the resource block size in bytes including its data.

Returns: int - The resource block size.

getMinimalVersion()

public abstract int getMinimalVersion()

Gets the minimal required PSD version.

Returns: int - The minimal PSD version.

save(com.aspose.cad.StreamContainer stream)

public void save(com.aspose.cad.StreamContainer stream)

Saves the resource block to the specified stream.

Parameters:

ParameterTypeDescription
streamcom.aspose.cad.StreamContainerThe stream to save the resource block to.

validateValues()

public void validateValues()

Validates the resource values.