org.jSyncManager.API.Protocol.Util

Class DLPResource

Implemented Interfaces:
Serializable

public class DLPResource
extends java.lang.Object
implements Serializable

A class to store a handheld database resource. This class holds a single data resource.

Field Summary

static byte
DELETE_ALL
A flag to denote that all resources should be deleted during a delete operation.

Constructor Summary

DLPResource(inData[] )
Create a new Resource object based on the provided resource byte array.

Method Summary

byte[]
getData()
Retreives the data portion of the resource.
char
getIndex()
Retreives the index of the resource.
char
getResourceID()
Retreives the ID number associated with this resource.
char
getResourceSize()
Retreives the size of this resource.
int
getResourceType()
Retreives the type of this resource.
String
getResourceTypeString()
Retreives the String representing this resources type value.
void
setData(data[] )
Sets the data array for this resource.
void
setIndex(char i)
Sets the index value to be associated with this resource.
void
setResourceID(char id)
Sets the resource ID to be associated with this resource.
void
setResourceSize(char size)
Sets the size of this resource.
void
setResourceType(int i)
Sets this resources type.

Field Details

DELETE_ALL

public static final byte DELETE_ALL
A flag to denote that all resources should be deleted during a delete operation. Specifying this flag during a call to JHotSync.deleteResource will cause all resources in the specified database to be deleted.
Field Value:
-128

Constructor Details

DLPResource

public DLPResource(inData[] )
            throws DLPFunctionCallException
Create a new Resource object based on the provided resource byte array.
Parameters:
Throws:
DLPFunctionCallException - thrown if there are any parsing errors.

Method Details

getData

public byte[] getData()
Retreives the data portion of the resource.
Returns:
the data portion of the resource.

getIndex

public char getIndex()
Retreives the index of the resource.
Returns:
the index of the resource.

getResourceID

public char getResourceID()
Retreives the ID number associated with this resource.
Returns:
the ID number associated with this resource.

getResourceSize

public char getResourceSize()
Retreives the size of this resource.
Returns:
the size of this resource.

getResourceType

public int getResourceType()
Retreives the type of this resource.
Returns:
the type of this resource.

getResourceTypeString

public String getResourceTypeString()
Retreives the String representing this resources type value.
Returns:
the String representing this resources type value.

setData

public void setData(data[] )
Sets the data array for this resource.
Parameters:

setIndex

public void setIndex(char i)
Sets the index value to be associated with this resource. If you're creating your own Resource object from scratch, you can set this value to 0, as the handheld will normally assign this value.
Parameters:
i - the index value for this resource.

setResourceID

public void setResourceID(char id)
Sets the resource ID to be associated with this resource. If you're creating your own Resource object from scratch, you can set this value to 0, as the handheld will normally assign this value.
Parameters:
id - the resource ID number for this resource.

setResourceSize

public void setResourceSize(char size)
Sets the size of this resource.
Parameters:
size - the size of this resource.

setResourceType

public void setResourceType(int i)
Sets this resources type.
Parameters:
i - this resources type.