public class

Serializer

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.serialization.Serializer

Class Overview

This class allows the serialization of object(s) to a stream of bytes.

The serialize(Object) method is interruptible.

Summary

Fields
public ReferenceCounter<Integer> collectionSizes
public ReferenceCounter<String> dbgObjectCounts
public Map<String, List<Object>> dbgObjectStores
public long writtenStringBytesCount
public int writtenStringCount
public Set<String> writtenStringPool
Public Constructors
Serializer(ITypeIdProvider customTypeIdProvider, OutputStream stream, boolean generateStringPool)
Public Methods
void close()
void debugEnable(boolean enableObjectCounting, boolean enableObjectStoring)
ReferenceCounter<String> debugGetObjectCounts()
Map<String, List<Object>> debugGetObjectStores()
<C> List<C> debugGetObjectStores(Class<C> clazz)
int getMaxDepthReached()
int getObjectCount()
List<String> getStringPool()
long getWrittenStringBytesCount()
int getWrittenStringCount()
Set<String> getWrittenStringPool()
void serialize(Object root)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public ReferenceCounter<Integer> collectionSizes

public ReferenceCounter<String> dbgObjectCounts

public Map<String, List<Object>> dbgObjectStores

public long writtenStringBytesCount

public int writtenStringCount

public Set<String> writtenStringPool

Public Constructors

public Serializer (ITypeIdProvider customTypeIdProvider, OutputStream stream, boolean generateStringPool)

Public Methods

public void close ()

Throws
IOException

public void debugEnable (boolean enableObjectCounting, boolean enableObjectStoring)

public ReferenceCounter<String> debugGetObjectCounts ()

public Map<String, List<Object>> debugGetObjectStores ()

public List<C> debugGetObjectStores (Class<C> clazz)

public int getMaxDepthReached ()

public int getObjectCount ()

public List<String> getStringPool ()

public long getWrittenStringBytesCount ()

public int getWrittenStringCount ()

public Set<String> getWrittenStringPool ()

public void serialize (Object root)

Throws
IOException