Posted By:
Kevin_Riff
Posted On:
Sunday, September 16, 2001 10:12 PM
It's certainly possible to put the encoding logic for a particular format in one class and the decoding logic in another. However, the readObject()/writeObject() methods described by the Serializable interface must be in the same class to function correctly. Perhaps what you want is the writeReplace()/readResolve methods, which let you substitute a different object in the stream.