com.github.libxjava.io
Interface ISerialisable

All Known Implementing Classes:
SerialisableArrayList, SerialisableHashMap, SerialisableHashSet, SerialisableHashtable, SerialisableVector

public interface ISerialisable

Marks an implementing class as serialisable.

Ensure that the implementing class is accessible from all packages and that it defines a default constructor. Otherwise it cannot be accessed or instantiated!

Version:
libxjava-cldc - 0.3
Author:
Marcel Patzlaff

Method Summary
 void deserialise(IDeserialiser in)
          Defines the protocol to deserialise data and fill the fields of the implementing class.
 void serialise(ISerialiser out)
          This method defines the serialisation protocol of the implementing class.
 

Method Detail

serialise

void serialise(ISerialiser out)
               throws IOException
This method defines the serialisation protocol of the implementing class.

Parameters:
out - the serialiser to write the content to
Throws:
IOException - if problems occur during the serialisation process
See Also:
ISerialiser.writeObject(Object)

deserialise

void deserialise(IDeserialiser in)
                 throws IOException,
                        ClassNotFoundException
Defines the protocol to deserialise data and fill the fields of the implementing class.

Ensure that the protocols defined here and in serialise(ISerialiser) are compatible!

Parameters:
in - the deserialiser to read the content from
Throws:
IOException - if problems occur during the deserialisation process
ClassNotFoundException - if class cannot be loaded and instantiated
See Also:
IDeserialiser.readObject()


Copyright © 2011 Marcel Patzlaff. All Rights Reserved.