jSyncManager

org.jSyncManager.API.Protocol.Util
Class DLPDatabaseListGroup

java.lang.Object
  |
  +--org.jSyncManager.API.Protocol.Util.DLPDatabaseListGroup
All Implemented Interfaces:
java.util.Enumeration

public class DLPDatabaseListGroup
extends java.lang.Object
implements java.util.Enumeration

A class to store a group of database information objects. This class holds information on a group of databases.

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

Field Summary
static byte MORE_DATABASES
          A flag to denote that there are more database info to be retreived from the handheld.
 
Constructor Summary
DLPDatabaseListGroup(byte[] groupData)
          Construct a new database list group object based on the byte array retreived from the handheld.
 
Method Summary
static DLPDatabaseListGroup bytes2DBList(byte[] data)
          Converts a list of database information to a Database List group object.
 boolean checkFlag(byte flag)
          Tests to see if the specified flag is present in this object.
 byte getActualCount()
          Returns the actual count of databases.
 DLPDatabaseInfo getElement(int i)
          Retreives the specified element from the database info array.
 byte getFlags()
          Retreives the flags associated with this object.
 char getLastIndex()
          Returns the last index number for the database info array.
 boolean hasMoreElements()
          Tests to see if this enumeration has more elements.
 java.lang.Object nextElement()
          Retreives the next element of this enumeration.
 java.lang.String toString()
          Converts this objects data to a human readable String.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MORE_DATABASES

public static final byte MORE_DATABASES
A flag to denote that there are more database info to be retreived from the handheld.
Constructor Detail

DLPDatabaseListGroup

public DLPDatabaseListGroup(byte[] groupData)
                     throws DLPFunctionCallException
Construct a new database list group object based on the byte array retreived from the handheld.
Parameters:
groupData - the byte array containing the database data list retreived from the handheld.
Throws:
DLPFunctionCallException - thrown if a parsing error occurs.
Method Detail

bytes2DBList

public static DLPDatabaseListGroup bytes2DBList(byte[] data)
                                         throws DLPFunctionCallException
Converts a list of database information to a Database List group object.
Parameters:
data - a byte array of database list information.
Throws:
DLPFunctionCallException - thrown if there are any array parsing errors.

checkFlag

public boolean checkFlag(byte flag)
Tests to see if the specified flag is present in this object.
Parameters:
flag - the flag to test.
Returns:
true if the flog is enabled in this object, false otherwise.

getActualCount

public byte getActualCount()
Returns the actual count of databases.
Returns:
the actual count of databases.

getElement

public DLPDatabaseInfo getElement(int i)
Retreives the specified element from the database info array.
Parameters:
i - the index of the item to query.
Returns:
the Database Info object from the requested index.

getFlags

public byte getFlags()
Retreives the flags associated with this object.
Returns:
the flags associated with this object.

getLastIndex

public char getLastIndex()
Returns the last index number for the database info array.
Returns:
the last index number for the database info array.

hasMoreElements

public boolean hasMoreElements()
Tests to see if this enumeration has more elements.
Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if there are more elements in this enumeration, false otherwise.

nextElement

public java.lang.Object nextElement()
Retreives the next element of this enumeration. Returned objects are instances of the DLPDatabaseInfo class.
Specified by:
nextElement in interface java.util.Enumeration
Returns:
the next element of this enumeration.
See Also:
DLPDatabaseInfo

toString

public java.lang.String toString()
Converts this objects data to a human readable String.
Overrides:
toString in class java.lang.Object
Returns:
this objects data as a human readable String.

jSyncManager

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