brf.j2me.dynaworks.db.palm
Class PalmRec

java.lang.Object
  |
  +--brf.j2me.dynaworks.db.Record
        |
        +--brf.j2me.dynaworks.db.palm.PalmRec
All Implemented Interfaces:
Dataset
Direct Known Subclasses:
AddressRec, DatebookRec, ExpenseRec, MailRec, MemoRec, TodoRec

public class PalmRec
extends Record

A PalmRec is a base class for all records stored in build-in databases like AddressDB, MemoDB, DatebookDB and the like.

Version:
1.0
Author:
Bernd R. Fix
See Also:
Record, PalmDB

Fields inherited from class brf.j2me.dynaworks.db.Record
content, fields, sequence
 
Constructor Summary
PalmRec()
          constructor.
 
Method Summary
protected  int bitCount(int val, int mark)
          count the bits set in the integer up to a "terminator" mask.
protected  int intValue(byte[] data, int pos)
          return the value of four successive bytes in an array as an integer value (big endian notation!)
protected  short shortValue(byte[] data, int pos)
          return the value of twi successive bytes in an array as a short value (big endian notation!)
 
Methods inherited from class brf.j2me.dynaworks.db.Record
addField, getBytes, getContent, getField, getInt, getShort, getString, readField, setBytes, setContent, setField, setInt, setShort, setString, size, update, writeField
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

PalmRec

public PalmRec()
constructor.

Method Detail

bitCount

protected int bitCount(int val,
                       int mark)
count the bits set in the integer up to a "terminator" mask.

Parameters:
val - int - count bits in integer
mark - int - terminator mask

intValue

protected int intValue(byte[] data,
                       int pos)
return the value of four successive bytes in an array as an integer value (big endian notation!)

Parameters:
data - byte[] - array of bytes to extract integer from
pos - int - offset into array with data.length >= pos + 4
Returns:
int - constructed value.

shortValue

protected short shortValue(byte[] data,
                           int pos)
return the value of twi successive bytes in an array as a short value (big endian notation!)

Parameters:
data - byte[] - array of bytes to extract integer from
pos - int - offset into array with data.length >= pos + 2
Returns:
short - constructed value.