@NoInstantiate public final class ArtifactClassLoaderObjectOutputStream extends ObjectOutputStream
ObjectOutputStream
that for each serialized object, writes the identifier of the classLoader that
loaded the object's class.
Is intended to be used along with ArtifactClassLoaderObjectInputStream
.
ObjectOutputStream.PutField
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, 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_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
Constructor and Description |
---|
ArtifactClassLoaderObjectOutputStream(ClassLoaderRepository classLoaderRepository,
OutputStream out)
Creates a new output stream.
|
Modifier and Type | Method and Description |
---|---|
protected void |
annotateClass(Class<?> clazz) |
annotateProxyClass, close, defaultWriteObject, drain, enableReplaceObject, flush, putFields, replaceObject, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeClassDescriptor, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeStreamHeader, writeUnshared, writeUTF
public ArtifactClassLoaderObjectOutputStream(ClassLoaderRepository classLoaderRepository, OutputStream out) throws IOException
classLoaderRepository
- contains the registered classloaders that can be used to load serialized classes. Non null.out
- output stream to write toIOException
- if an I/O error occurs while writing stream headerprotected void annotateClass(Class<?> clazz) throws IOException
annotateClass
in class ObjectOutputStream
IOException
Copyright © 2018. All rights reserved.