com.syncbuilder.storage
Class Block

java.lang.Object
  |
  +--com.syncbuilder.storage.Block
Direct Known Subclasses:
AppBlock, Pref, Record, Resource, SortBlock

public abstract class Block
extends java.lang.Object
implements java.io.Serializable

This is a superclass for all classes which need to parse formatted byte-data into object-attribute values and vice versa. The format of the byte-data is typically identical to the format that is natively used by some Palm device-application.

See Also:
Serialized Form

Field Summary
protected  byte[] raw
           
 
Constructor Summary
Block()
          Create an uninitialized Block.
Block(byte[] contents)
           
 
Method Summary
 java.lang.String describe()
           
abstract  void fill()
           
 byte[] pack()
          Turn the Block's attribute-values into a byte-array.
 java.lang.String toString()
           
 void unpack(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

raw

protected byte[] raw
Constructor Detail

Block

public Block()
Create an uninitialized Block. This no-arg constructor is also req'd for the externalization to work.

Block

public Block(byte[] contents)
Method Detail

fill

public abstract void fill()

pack

public byte[] pack()
Turn the Block's attribute-values into a byte-array. The array can be used with unpack or for transfer to an application on the Pilot.
Returns:
the array of bytes
See Also:
unpack(byte[])

unpack

public void unpack(byte[] data)

describe

public java.lang.String describe()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


This material is Copyrighted (C) 1999 by Tilo Christ. All Rights Reserved.