Top Description Fields Constructors Methods
javassist.util.proxy

public Class ProxyObjectInputStream

extends ObjectInputStream
Class Inheritance
Imports
java.io.IOException, .InputStream, .ObjectInputStream, .ObjectStreamClass

An input stream class which knows how to deserialize proxies created via ProxyFactory and serializedo via a ProxyObjectOutputStream. It must be used when deserialising proxies created from a proxy factory configured with ProxyFactory#useWriteReplace set to false.
Author
Andrew Dinn

Field Summary

Modifier and TypeField and Description
private ClassLoader
loader

the loader to use to resolve classes for proxy superclass and interface names read from the stream.

Constructor Summary

AccessConstructor and Description
public
ProxyObjectInputStream(InputStream in)

create an input stream which can be used to deserialize an object graph which includes proxies created using class ProxyFactory.

Method Summary

Modifier and TypeMethod and Description
protected ObjectStreamClass
readClassDescriptor()

Overrides java.io.ObjectInputStream.readClassDescriptor.

Read a class descriptor from the serialization stream.

public void
setClassLoader(ClassLoader loader)

Reset the loader to be

Inherited from java.io.ObjectInputStream:
availableclosedefaultReadObjectenableResolveObjectgetObjectInputFilterreadreadreadBooleanreadBytereadCharreadDoublereadFieldsreadFloatreadFullyreadFullyreadIntreadLinereadLongreadObjectreadObjectOverridereadShortreadStreamHeaderreadUnsharedreadUnsignedBytereadUnsignedShortreadUTFregisterValidationresolveClassresolveObjectresolveProxyClasssetObjectInputFilterskipBytes

Field Detail

loaderback to summary
private ClassLoader loader

the loader to use to resolve classes for proxy superclass and interface names read from the stream. defaults to the context class loader of the thread which creates the input stream or the system class loader if the context class loader is null.

Constructor Detail

ProxyObjectInputStreamback to summary
public ProxyObjectInputStream(InputStream in) throws IOException

create an input stream which can be used to deserialize an object graph which includes proxies created using class ProxyFactory. the classloader used to resolve proxy superclass and interface names read from the input stream will default to the current thread's context class loader or the system classloader if the context class loader is null.

Exceptions
IOException:
whenever ObjectInputStream would also do so
StreamCorruptedException:
whenever ObjectInputStream would also do so
SecurityException:
whenever ObjectInputStream would also do so
NullPointerException:
if in is null

Method Detail

readClassDescriptorback to summary
protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException

Overrides java.io.ObjectInputStream.readClassDescriptor.

Doc from java.io.ObjectInputStream.readClassDescriptor.

Read a class descriptor from the serialization stream. This method is called when the ObjectInputStream expects a class descriptor as the next item in the serialization stream. Subclasses of ObjectInputStream may override this method to read in class descriptors that have been written in non-standard formats (by subclasses of ObjectOutputStream which have overridden the writeClassDescriptor method). By default, this method reads class descriptors according to the format defined in the Object Serialization specification.

Returns:ObjectStreamClass

the class descriptor read

Annotations
@Override
Exceptions
IOException:
If an I/O error has occurred.
ClassNotFoundException:
If the Class of a serialized object used in the class descriptor representation cannot be found
setClassLoaderback to summary
public void setClassLoader(ClassLoader loader)

Reset the loader to be