com.gargoylesoftware.base.io
public class CondensedObjectOutputStream extends ObjectOutputStream
Only objects of the following types will be condensed: Character, Double, Integer, Long, Short and String. The biggest benefit will come from duplicate Strings.
Version: $Revision: 1.3 $
| Field Summary | |
|---|---|
| List | classes_ |
| String[] | classNames_
The list of classes that we can try condensing. |
| List | objects_ |
| Constructor Summary | |
|---|---|
| CondensedObjectOutputStream(OutputStream stream)
Create the stream | |
| Method Summary | |
|---|---|
| protected Object | replaceObject(Object object)
Overrides the superclass to perform substitutions of duplicate
immutable objects.
|
Parameters: stream The output stream that we are wrapping
Throws: IOException If the superclass throws an IOException in it's constructor.
Parameters: object The object to be serialized
Returns: Either the object that was passed in or an identical object that had previously been passed in.