palmed.io
Class Record

java.lang.Object
  extended by palmed.io.Record
All Implemented Interfaces:
IRecord, ISerializable

public final class Record
extends java.lang.Object
implements IRecord

This class handles serialization as a record.

Version:
$Revision: 408 $ $Date: 2006-01-02 17:47:23 +0900 (lun., 02 janv. 2006) $
Author:
Mathieu Champlon

Constructor Summary
Record(javax.microedition.rms.RecordStore store, ISerializable serializable)
          Create a buffer record.
Record(javax.microedition.rms.RecordStore store, ISerializable serializable, int recordId)
          Create a record from a given identifier.
 
Method Summary
 void delete()
          Delete the record.
 void marshall(java.io.OutputStream stream)
          Write to an output stream.
 void persist()
          Save the record.
 void restore()
          Load the record.
 void unmarshall(java.io.InputStream stream)
          Read from an input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Record

public Record(javax.microedition.rms.RecordStore store,
              ISerializable serializable)
Create a buffer record.

Parameters:
store - the record store
serializable - the object to serialize

Record

public Record(javax.microedition.rms.RecordStore store,
              ISerializable serializable,
              int recordId)
Create a record from a given identifier.

Parameters:
store - the record store
serializable - the object to serialize
recordId - the record identifier
Method Detail

persist

public void persist()
Save the record.

Specified by:
persist in interface IRecord

restore

public void restore()
Load the record.

Specified by:
restore in interface IRecord

delete

public void delete()
Delete the record.

Specified by:
delete in interface IRecord

marshall

public void marshall(java.io.OutputStream stream)
              throws java.io.IOException
Write to an output stream.

Specified by:
marshall in interface ISerializable
Parameters:
stream - the stream to write to
Throws:
java.io.IOException - an io exception occurs

unmarshall

public void unmarshall(java.io.InputStream stream)
                throws java.io.IOException
Read from an input stream.

Specified by:
unmarshall in interface ISerializable
Parameters:
stream - the stream to read from
Throws:
java.io.IOException - an io exception occurs


Copyright © 2004-2006 PalmEd. All Rights Reserved.