diff options
| author | Paul Buetow <paul@buetow.org> | 2008-06-01 22:45:59 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-06-01 22:45:59 +0000 |
| commit | 293c73f50f87b3d73d3947a9f79430b23ec4ddba (patch) | |
| tree | 129ece28dcda9d17bb6e0fc417d8b25bb82dac4c /sources/protocols/VSAbstractProtocol.java | |
| parent | 8086082daaed71ee9105c156e3a1e8e63caf1990 (diff) | |
better serialization
Diffstat (limited to 'sources/protocols/VSAbstractProtocol.java')
| -rw-r--r-- | sources/protocols/VSAbstractProtocol.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sources/protocols/VSAbstractProtocol.java b/sources/protocols/VSAbstractProtocol.java index 3398b2c..30e664c 100644 --- a/sources/protocols/VSAbstractProtocol.java +++ b/sources/protocols/VSAbstractProtocol.java @@ -29,6 +29,7 @@ import java.util.ArrayList; import core.*; import events.*; import events.internal.*; +import serialize.*; import utils.*; /** @@ -384,26 +385,30 @@ abstract public class VSAbstractProtocol extends VSAbstractEvent { } /* (non-Javadoc) - * @see prefs.VSPrefs#writeObject() + * @see serialize.VSSerializable#serialize(serialize.VSSerialize, + * java.io.ObjectOutputStream) */ - public synchronized void writeObject(ObjectOutputStream objectOutputStream) + public synchronized void serialize(VSSerialize serialize, + ObjectOutputStream objectOutputStream) throws IOException { - super.writeObject(objectOutputStream); + super.serialize(serialize, objectOutputStream); objectOutputStream.writeObject(new Boolean(hasOnServerStart)); } /* (non-Javadoc) - * @see prefs.VSPrefs#readObject() + * @see serialize.VSSerializable#deserialize(serialize.VSSerialize, + * java.io.ObjectInputStream) */ @SuppressWarnings("unchecked") - public synchronized void readObject(ObjectInputStream objectInputStream) + public synchronized void deserialize(VSSerialize serialize, + ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { - super.readObject(objectInputStream); + super.deserialize(serialize, objectInputStream); - if (VSDeserializationHelper.DEBUG) + if (VSSerialize.DEBUG) System.out.println("Deserializing: VSAbstractProtocol"); this.hasOnServerStart = ((Boolean) - objectInputStream.readObject()).booleanValue(); + objectInputStream.readObject()).booleanValue(); } } |
