com.github.libxjava.util
Class SerialisableVector

java.lang.Object
  extended by java.util.Vector
      extended by com.github.libxjava.util.SerialisableVector
All Implemented Interfaces:
ISerialisable

public class SerialisableVector
extends Vector
implements ISerialisable

A serialisable collection type.

It extends the class Vector with serialisation facilities.

Version:
libxjava-cldc - 0.3
Author:
Marcel Patzlaff

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Constructor Summary
SerialisableVector()
           
SerialisableVector(int initialCapacity)
           
SerialisableVector(int initialCapacity, int capacityIncrement)
           
 
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.
 
Methods inherited from class java.util.Vector
addElement, capacity, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, removeAllElements, removeElement, removeElementAt, setElementAt, setSize, size, toString, trimToSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerialisableVector

public SerialisableVector()

SerialisableVector

public SerialisableVector(int initialCapacity)

SerialisableVector

public SerialisableVector(int initialCapacity,
                          int capacityIncrement)
Method Detail

deserialise

public void deserialise(IDeserialiser in)
                 throws IOException,
                        ClassNotFoundException
Description copied from interface: ISerialisable
Defines the protocol to deserialise data and fill the fields of the implementing class.

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

Specified by:
deserialise in interface ISerialisable
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()

serialise

public void serialise(ISerialiser out)
               throws IOException
Description copied from interface: ISerialisable
This method defines the serialisation protocol of the implementing class.

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


Copyright © 2011 Marcel Patzlaff. All Rights Reserved.