public virtual void deserializeState(Stream stream) { if (stream.readTag(true) != this.tag) throw new SerializationException("Tried to deserialize state from node with wrong tag"); doDeserializeState(stream); if(stream.readTag(false) != tag) throw new SerializationException("Wrong closing tag"); }
public static Serializable create(Stream stream) { return _create(stream, stream.readTag(true)); }
public void deserialize(Stream stream) { deserialize(stream, stream.readTag(true)); }
private void deserialize(Stream stream, UInt16 tag) { if (this.tag != tag) throw new SerializationException("Tried to deserialize from node with wrong tag"); doDeserialize(stream); if(stream.readTag(false) != tag) throw new SerializationException("Wrong closing tag"); }