org.erights.e.elib.serial
Class SerializationStream
java.lang.Object
|
+--java.io.OutputStream
|
+--java.io.ObjectOutputStream
|
+--org.erights.e.elib.serial.SerializationStream
- All Implemented Interfaces:
- DataOutput, ObjectOutput, ObjectStreamConstants
- public final class SerializationStream
- extends ObjectOutputStream
Untamed:
Fields inherited from interface java.io.ObjectStreamConstants |
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING |
Methods inherited from class java.io.ObjectOutputStream |
annotateClass, annotateProxyClass, close, defaultWriteObject, drain, enableReplaceObject, flush, putFields, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeClassDescriptor, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeStreamHeader, writeUnshared, writeUTF |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myReplacer
private final Replacer myReplacer
SerializationStream
SerializationStream(OutputStream out,
Replacer replacer)
throws IOException
- Makes SerializationStream specialized by 'replacer'.
Makes an ObjectOutputStream on out with the following differences:
- When you do serializer.writeObject(foo), rather than foo being
written, replacer(foo) is written, and likewise for every object
reachable from the replacement objects.
replacer(..) is used as the overriding of .replaceObject(..). See the
Java Serialization spec for the detailed implications of this.
replaceObject
protected Object replaceObject(Object ref)
- returns the
Ref.resolution(Object)
of replacer(ref)
- Overrides:
replaceObject
in class ObjectOutputStream
- Parameters:
ref
- the object to be replaced
- Returns:
- the alternate object that replaced the specified one
comments?