net.sourceforge.jpalm.palmdb
Class ApplicationInfo

java.lang.Object
  extended by net.sourceforge.jpalm.DataBlock
      extended by net.sourceforge.jpalm.palmdb.ApplicationInfo
Direct Known Subclasses:
DatabaseInfo

public class ApplicationInfo
extends DataBlock

The application info block in a Palm database.


Field Summary
protected  byte[] applicationData
           
protected  java.util.List<java.lang.String> categoryLabels
           
protected  java.util.List<net.sourceforge.juint.UInt8> categoryUniqueIds
           
static int DATA_LENGTH
          The length of this DataBlock in bytes, not including the length of applicationData.
protected  net.sourceforge.juint.UInt8 lastUniqueId
           
protected  net.sourceforge.juint.UInt8 padding
           
protected  net.sourceforge.juint.UInt16 renamedCategories
           
 
Constructor Summary
ApplicationInfo()
          Creates a application info block.
ApplicationInfo(byte[] data)
          Creates a new application info block from the byte array.
 
Method Summary
 void deserialize(byte[] data)
          Populate class properties from a byte array.
 boolean equals(java.lang.Object object)
           
 byte[] getApplicationData()
          Gets the application specific data.
 java.util.List<java.lang.String> getCategoryLabels()
          Gets the category labels.
 java.util.List<net.sourceforge.juint.UInt8> getCategoryUniqueIds()
          Gets the unique identifier for each category.
 net.sourceforge.juint.UInt8 getLastUniqueId()
          Gets the last used unique identifier for a category.
 net.sourceforge.juint.UInt8 getPadding()
          Gets the padding.
 net.sourceforge.juint.UInt16 getRenamedCategories()
          Gets the renamed categories.
 byte[] serialize()
          Create a byte array of the class properties.
 void setApplicationData(byte[] applicationData)
          Sets the application specific data.
 void setCategoryLabels(java.util.List<java.lang.String> labels)
          Sets the category labels.
 void setCategoryUniqueIds(java.util.List<net.sourceforge.juint.UInt8> ids)
          Sets the unique identifier for each category.
 void setLastUniqueId(net.sourceforge.juint.UInt8 lastUniqueId)
          Sets the last used unique identifier for a category.
 void setPadding(net.sourceforge.juint.UInt8 padding)
          Sets the padding.
 void setRenamedCategories(net.sourceforge.juint.UInt16 renamedCategories)
          Sets the renamed categories.
 
Methods inherited from class net.sourceforge.jpalm.DataBlock
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_LENGTH

public static final int DATA_LENGTH
The length of this DataBlock in bytes, not including the length of applicationData.
276

See Also:
Constant Field Values

renamedCategories

protected net.sourceforge.juint.UInt16 renamedCategories

categoryLabels

protected java.util.List<java.lang.String> categoryLabels

categoryUniqueIds

protected java.util.List<net.sourceforge.juint.UInt8> categoryUniqueIds

lastUniqueId

protected net.sourceforge.juint.UInt8 lastUniqueId

padding

protected net.sourceforge.juint.UInt8 padding

applicationData

protected byte[] applicationData
Constructor Detail

ApplicationInfo

public ApplicationInfo(byte[] data)
Creates a new application info block from the byte array.

Parameters:
data - the byte array
See Also:
deserialize(byte[])

ApplicationInfo

public ApplicationInfo()
Creates a application info block.

Method Detail

getCategoryLabels

public java.util.List<java.lang.String> getCategoryLabels()
Gets the category labels.

Returns:
the category labels

setCategoryLabels

public void setCategoryLabels(java.util.List<java.lang.String> labels)
Sets the category labels. Labels cannot be longer than Category.CATEGORY_LENGTH and there cannot be more than Category.NUMBER_OF_CATEGORIES categories.

Parameters:
labels - the category labels

getCategoryUniqueIds

public java.util.List<net.sourceforge.juint.UInt8> getCategoryUniqueIds()
Gets the unique identifier for each category.

Returns:
the unique identifiers

setCategoryUniqueIds

public void setCategoryUniqueIds(java.util.List<net.sourceforge.juint.UInt8> ids)
Sets the unique identifier for each category. There cannot be more than Category.NUMBER_OF_CATEGORIES identifiers.

Parameters:
ids - the unique identifiers
See Also:
setLastUniqueId(UInt8)

getLastUniqueId

public net.sourceforge.juint.UInt8 getLastUniqueId()
Gets the last used unique identifier for a category.

Returns:
the last used unique identifier

setLastUniqueId

public void setLastUniqueId(net.sourceforge.juint.UInt8 lastUniqueId)
Sets the last used unique identifier for a category.

Parameters:
lastUniqueId - the last used unique identifier
See Also:
setCategoryUniqueIds(List)

getPadding

public net.sourceforge.juint.UInt8 getPadding()
Gets the padding.

Returns:
the padding

setPadding

public void setPadding(net.sourceforge.juint.UInt8 padding)
Sets the padding.

Parameters:
padding - the padding

getRenamedCategories

public net.sourceforge.juint.UInt16 getRenamedCategories()
Gets the renamed categories.

Returns:
the renamed categories

setRenamedCategories

public void setRenamedCategories(net.sourceforge.juint.UInt16 renamedCategories)
Sets the renamed categories.

Parameters:
renamedCategories - the renamed categories

getApplicationData

public byte[] getApplicationData()
Gets the application specific data.

Returns:
the application data

setApplicationData

public void setApplicationData(byte[] applicationData)
Sets the application specific data.

Parameters:
applicationData - the application data

deserialize

public void deserialize(byte[] data)
Description copied from class: DataBlock
Populate class properties from a byte array.

Specified by:
deserialize in class DataBlock
Parameters:
data - the byte array

serialize

public byte[] serialize()
Description copied from class: DataBlock
Create a byte array of the class properties.

Specified by:
serialize in class DataBlock
Returns:
the byte array

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class DataBlock