jSyncManager

org.jSyncManager.API.Protocol.Util
Class DLPAppPreference

java.lang.Object
  |
  +--org.jSyncManager.API.Protocol.Util.DLPAppPreference

public class DLPAppPreference
extends java.lang.Object

A class to hold a handheld application preference. This class stores application preference data.

Version:
$Revision: 1.9 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2003/05/14 03:51:27 $.

Field Summary
static char READ_ACTUAL_SIZE
          Used when specifying the number of bytes to return when requesting an app preference, this value will return all the bytes in the application preference.
static byte REQUEST_BACKUP_PREF
          A flag to request a backup preference.
 
Constructor Summary
DLPAppPreference()
          Create a new, empty application preference object.
DLPAppPreference(byte[] data)
          Create an application preference object from the provided byte representation.
 
Method Summary
 char getActualSize()
          Return the actual reported size of the app preference.
 byte[] getPreference()
          Get the application preference as a byte array.
 char getVersion()
          Get the version of the app preference.
 void setActualSize(char newValue)
          Set the actual size of the app preference.
 void setPreference(byte[] newValue)
          Set the preference data.
 void setVersion(char newValue)
          Set the version for this application preference.
 java.lang.String toString()
          Convert the application preference to human-readable text.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

READ_ACTUAL_SIZE

public static final char READ_ACTUAL_SIZE
Used when specifying the number of bytes to return when requesting an app preference, this value will return all the bytes in the application preference.

REQUEST_BACKUP_PREF

public static final byte REQUEST_BACKUP_PREF
A flag to request a backup preference.
Constructor Detail

DLPAppPreference

public DLPAppPreference()
Create a new, empty application preference object.

DLPAppPreference

public DLPAppPreference(byte[] data)
                 throws DLPFunctionCallException
Create an application preference object from the provided byte representation.
Parameters:
data - the byte representation of an app preference, as read from the handheld.
Throws:
DLPFunctionCallException - thrown in the event of any errors with the preference data.
Method Detail

getActualSize

public char getActualSize()
Return the actual reported size of the app preference. In order to satisfy packet byte alignment issues, the handheld may return more bytes than are actually in the preference. This value may thus be slightly smaller than the number of bytes in the preference data.
Returns:
the actual reported size of the app preference.

getPreference

public byte[] getPreference()
Get the application preference as a byte array.
Returns:
the application preference as a byte array.

getVersion

public char getVersion()
Get the version of the app preference.
Returns:
the version of the app preference.

setActualSize

public void setActualSize(char newValue)
Set the actual size of the app preference.
Parameters:
newValue - the actual size of the app preference.

setPreference

public void setPreference(byte[] newValue)
Set the preference data.
Parameters:
newValue - the new preference data.

setVersion

public void setVersion(char newValue)
Set the version for this application preference.
Parameters:
newValue - the version for this application preference.

toString

public java.lang.String toString()
Convert the application preference to human-readable text.
Overrides:
toString in class java.lang.Object
Returns:
this app preference as a String of human-readable text.

jSyncManager

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