org.xmldb.api.sdk.modules

Class SimpleBinaryResource

public abstract class SimpleBinaryResource extends BaseResource implements BinaryResource

Resource for encapsulation of binary data that is stored in the data base. Support for BinaryResources is optional.

Field Summary
protected byte[]content
Constructor Summary
SimpleBinaryResource(Collection parent, String id)
Create a new BinaryResource without any content.
SimpleBinaryResource(Collection parent, String id, byte[] content)
Create a fully initialized BinaryResource
Method Summary
ObjectgetContent()
Retrieves the content from the resource.
StringgetResourceType()
Returns the resource type for this Resource.
voidsetContent(Object value)
Sets the content for this resource.

Field Detail

content

protected byte[] content

Constructor Detail

SimpleBinaryResource

public SimpleBinaryResource(Collection parent, String id)
Create a new BinaryResource without any content.

SimpleBinaryResource

public SimpleBinaryResource(Collection parent, String id, byte[] content)
Create a fully initialized BinaryResource

Method Detail

getContent

public Object getContent()
Retrieves the content from the resource. The type of the content varies depending what type of resource is being used.

Returns: the content of the resource.

getResourceType

public String getResourceType()
Returns the resource type for this Resource.

Returns: the resource type for the Resource.

setContent

public void setContent(Object value)
Sets the content for this resource. The type of content that can be set depends on the type of resource being used.

Parameters: value the content value to set for the resource.