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

Legacy serializer version, deprecated by the current version \(5\). This type is left here for reference and testing purpose.

## Constructor: Serializer_v4
- parameter: `customTypeIdProvider`, type: `com.pnfsoftware.jeb.util.serialization.ITypeIdProvider`
- parameter: `stream`, type: `java.io.OutputStream`
- parameter: `generateStringPool`, type: `boolean`


## Field: collectionSizes
Type: `com.pnfsoftware.jeb.util.collect.ReferenceCounter<java.lang.Integer>`

## Field: dbgObjectCounts
Type: `com.pnfsoftware.jeb.util.collect.ReferenceCounter<java.lang.String>`

## Field: dbgObjectStores
Type: `java.util.Map<java.lang.String,java.util.List<java.lang.Object>>`

## Field: writtenStringBytesCount
Type: `long`

## Field: writtenStringCount
Type: `int`

## Field: writtenStringPool
Type: `java.util.Set<java.lang.String>`

## Method: close


## Method: debugEnable
- parameter: `enableObjectCounting`, type: `boolean`
- parameter: `enableObjectStoring`, type: `boolean`


## Method: debugGetObjectCounts
- return type: `com.pnfsoftware.jeb.util.collect.ReferenceCounter<java.lang.String>`


## Method: debugGetObjectStores
- return type: `java.util.Map<java.lang.String,java.util.List<java.lang.Object>>`


## Method: debugGetObjectStores
- parameter: `clazz`, type: `java.lang.Class<C>`
- return type: `java.util.List<C>`


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


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


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


## Method: getStringPool
- return type: `java.util.List<java.lang.String>`


## Method: getWrittenStringBytesCount
- return type: `long`


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


## Method: getWrittenStringPool
- return type: `java.util.Set<java.lang.String>`


## Method: serialize
- parameter: `root`, type: `java.lang.Object`


## Method: write
- parameter: `o`, type: `java.lang.Object`


## Method: writeFields
- parameter: `o`, type: `java.lang.Object`
- parameter: `targetClass`, type: `java.lang.Class<?>`


