com.bretth.osmosis.core.store
Class GenericObjectWriter

java.lang.Object
  extended by com.bretth.osmosis.core.store.BaseObjectWriter
      extended by com.bretth.osmosis.core.store.GenericObjectWriter
All Implemented Interfaces:
ObjectWriter

public class GenericObjectWriter
extends BaseObjectWriter

Provides functionality to serialise a Storeable implementation to a store. This implementation supports the storing of any Storeable object.

Author:
Brett Henderson

Constructor Summary
GenericObjectWriter(StoreWriter storeWriter, StoreClassRegister storeClassRegister)
          Creates a new instance.
 
Method Summary
protected  void writeClassIdentifier(StoreWriter sw, StoreClassRegister scr, java.lang.Class<?> clazz)
          Writes the class identifier to the underlying data stream to allow it to be identified when reading in again.
 
Methods inherited from class com.bretth.osmosis.core.store.BaseObjectWriter
writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericObjectWriter

public GenericObjectWriter(StoreWriter storeWriter,
                           StoreClassRegister storeClassRegister)
Creates a new instance.

Parameters:
storeWriter - The store writer to write all serialised data to.
storeClassRegister - The register for class to identifier mappings.
Method Detail

writeClassIdentifier

protected void writeClassIdentifier(StoreWriter sw,
                                    StoreClassRegister scr,
                                    java.lang.Class<?> clazz)
Writes the class identifier to the underlying data stream to allow it to be identified when reading in again.

Specified by:
writeClassIdentifier in class BaseObjectWriter
Parameters:
sw - The store writer to write all serialised data to.
scr - The register for class to identifier mappings.
clazz - The class to be written.