# Class: com.pnfsoftware.jeb.util.serialization.AbstractInternalDeserializer

Base class for deserializers. Client code should not extend.

## Protected Constructor: AbstractInternalDeserializer
- parameter: `customTypeIdProvider`, type: `com.pnfsoftware.jeb.util.serialization.ITypeIdProvider`
- parameter: `classloaders`, type: `java.util.List<java.lang.ClassLoader>`
- parameter: `in`, type: `com.pnfsoftware.jeb.util.io.LEDataInputStream`

Description: Create an internal deserializer.
parameter: customTypeIdProvider: optional custom type\-id provider
parameter: classloaders: class loaders used to resolve serialized types
parameter: in: serialized data input stream

## Protected Field: cancelled
Type: `boolean`
Description: True if deserialization was cancelled.

## Protected Field: classloaders
Type: `java.util.List<java.lang.ClassLoader>`
Description: Class loaders used to resolve serialized types.

## Protected Field: constructorMap
Type: `java.util.Map<java.lang.Class<?>,java.lang.Object>`
Description: Cache of constructor\-related objects by class.

## Protected Field: customTypeIdProvider
Type: `com.pnfsoftware.jeb.util.serialization.ITypeIdProvider`
Description: Optional caller\-provided type\-id provider.

## Protected Field: deferredObjects
Type: `java.util.List<com.pnfsoftware.jeb.util.serialization.IPreObject>`
Description: Objects whose construction is deferred until the object map is available.

## Protected Field: expectedObjectCount
Type: `int`
Description: Expected number of objects to deserialize, if known.

## Protected Field: in
Type: `com.pnfsoftware.jeb.util.io.LEDataInputStream`
Description: Input stream providing serialized data.

## Protected Field: mootObject
Type: `java.lang.Object`
Description: Placeholder object used for unresolved references.

## Protected Field: nativeTypeIdProvider
Type: `com.pnfsoftware.jeb.util.serialization.ITypeIdProvider`
Description: Native type\-id provider.

## Protected Field: objIdPostgraphDone
Type: `java.util.Set<java.lang.Integer>`
Description: Object ids whose post\-graph initialization completed.

## Protected Field: objectCreatedHookMap
Type: `com.pnfsoftware.jeb.util.collect.MultiMap<java.lang.Class<?>,com.pnfsoftware.jeb.util.serialization.IDeserializationEventHandler>`
Description: Object\-created hooks by target class.

## Protected Field: objenesis
Type: `org.objenesis.ObjenesisStd`
Description: Object instantiator used for deserialization.

## Protected Field: objmap
Type: `java.util.Map<java.lang.Integer,java.lang.Object>`
Description: Deserialized objects by serialized object id.

## Protected Field: progressCallbacks
Type: `java.util.List<com.pnfsoftware.jeb.util.base.IProgressCallback>`
Description: Progress callbacks to notify during deserialization.

## Protected Static Field: customMethods
Type: `java.util.Map<java.lang.Class<?>,com.pnfsoftware.jeb.util.serialization.AbstractInternalDeserializer.CustomMethods>`
Description: Cached custom serialization methods by class.

## Method: addObjectCreatedHook
- parameter: `c`, type: `java.lang.Class<?>`
- parameter: `handler`, type: `com.pnfsoftware.jeb.util.serialization.IDeserializationEventHandler`


## Method: addProgressCallback
- parameter: `callback`, type: `com.pnfsoftware.jeb.util.base.IProgressCallback`


## Method: close

Description: Close the underlying input stream.
throws: on stream close error

## Method: deserializeInternal
- return type: `java.lang.Object`


## Protected Method: getCustomMethods
- parameter: `o`, type: `java.lang.Object`
- parameter: `targetClass`, type: `java.lang.Class<?>`
- return type: `com.pnfsoftware.jeb.util.serialization.AbstractInternalDeserializer.CustomMethods`

Description: Retrieve serialization custom methods for a target object or class.
parameter: o: target object
parameter: targetClass: optional target class
return: custom method descriptors
throws: if a custom method has an invalid prototype

## Method: getObjectCount
- return type: `int`


## Method: getObjects
- return type: `java.util.Collection<java.lang.Object>`


## Method: getStream
- return type: `java.io.InputStream`


## Protected Method: loadClass
- parameter: `typeName`, type: `java.lang.String`
- return type: `java.lang.Class<?>`

Description: Resolve a serialized class name.
parameter: typeName: fully\-qualified type name
return: resolved class
throws: if the class cannot be resolved

## Protected Method: logObjectMap

Description: Log the current object id map for diagnostics.

## Protected Method: notifyDeserializationEvent
- parameter: `type`, type: `int`
- parameter: `c`, type: `java.lang.Class<?>`
- parameter: `o`, type: `java.lang.Object`

Description: Notify deserialization event handlers.
parameter: type: event type: 1= object created \(post creation\)
parameter: c: object class
parameter: o: deserialized object

## Protected Method: notifyProgressCallbacks

Description: Notify registered progress callbacks.

## Method: read
- return type: `java.lang.Object`


## Method: read
- parameter: `object`, type: `java.lang.Object`
- parameter: `c`, type: `java.lang.Class<?>`
- return type: `java.lang.Object`

Description: Read one object, optionally into an existing object or as a target class.
parameter: object: optional existing object to populate
parameter: c: optional target class
return: deserialized object
throws: on deserialization error

## Protected Method: readInternal
- parameter: `object`, type: `java.lang.Object`
- parameter: `c`, type: `java.lang.Class<?>`
- return type: `java.lang.Object`

Description: Read one object from the serialized stream.
parameter: object: optional existing object to populate
parameter: c: optional target class
return: deserialized object
throws: on deserialization error

## Protected Method: registerObject
- parameter: `isLeafObject`, type: `boolean`
- parameter: `objectId`, type: `int`
- parameter: `o`, type: `java.lang.Object`

Description: Register a deserialized object by id.
parameter: isLeafObject: true if the object should be stored in the object map
parameter: objectId: serialized object id
parameter: o: deserialized object

## Method: removeObjectCreatedHook
- parameter: `c`, type: `java.lang.Class<?>`
- parameter: `handler`, type: `com.pnfsoftware.jeb.util.serialization.IDeserializationEventHandler`


## Method: removeProgressCallback
- parameter: `callback`, type: `com.pnfsoftware.jeb.util.base.IProgressCallback`


## Protected Method: resolveDeferredObjects

Description: Resolve deferred objects using the current object map.

## Protected Method: restoreFieldValue
- parameter: `o`, type: `java.lang.Object`
- parameter: `targetClass`, type: `java.lang.Class<?>`
- parameter: `fieldId`, type: `int`
- parameter: `fieldObject`, type: `java.lang.Object`

Description: Restore one serialized field value on an object.
parameter: o: target object
parameter: targetClass: optional class declaring the field
parameter: fieldId: serialized field id
parameter: fieldObject: field value
throws: on reflection or assignment error

## Method: setExpectedObjectCount
- parameter: `count`, type: `int`


