jSyncManager

org.jSyncManager.API.Protocol.Util
Class DLPResource

java.lang.Object
  |
  +--org.jSyncManager.API.Protocol.Util.DLPResource
All Implemented Interfaces:
java.io.Serializable

public class DLPResource
extends java.lang.Object
implements java.io.Serializable

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

Version:
$Revision: 1.7 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2003/06/04 07:18:03 $.
See Also:
Serialized Form

Field Summary
static byte DELETE_ALL
          A flag to denote that all resources should be deleted during a delete operation.
 
Constructor Summary
(package private) DLPResource()
          Construct a new Resource object with null/zeroed values.
  DLPResource(byte[] 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.
 java.lang.String getResourceTypeString()
          Retreives the String representing this resources type value.
 void setData(byte[] 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.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.
See Also:
JHotSync.deleteResource(byte, byte, int, char)
Constructor Detail

DLPResource

DLPResource()
Construct a new Resource object with null/zeroed values.

DLPResource

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

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 java.lang.String getResourceTypeString()
Retreives the String representing this resources type value.
Returns:
the String representing this resources type value.

setData

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

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:
this - resources type.

jSyncManager

Copyright (c) 1999 - 2003 Brad BARCLAY and others. All Rights Reserved.