com.bretth.osmosis.core.store
Class SingleClassObjectReader

java.lang.Object
  extended by com.bretth.osmosis.core.store.BaseObjectReader
      extended by com.bretth.osmosis.core.store.SingleClassObjectReader
All Implemented Interfaces:
ObjectReader

public class SingleClassObjectReader
extends BaseObjectReader

Provides object reading functionality where only a single class type will be loaded.

Author:
Brett Henderson

Constructor Summary
protected SingleClassObjectReader(StoreReader storeReader, StoreClassRegister storeClassRegister, java.lang.Class<?> storeableType)
          Creates a new instance.
 
Method Summary
protected  java.lang.Class<?> readClassFromIdentifier(StoreReader sr, StoreClassRegister scr)
          Identifies the class using data from the underlying stream.
 
Methods inherited from class com.bretth.osmosis.core.store.BaseObjectReader
readObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleClassObjectReader

protected SingleClassObjectReader(StoreReader storeReader,
                                  StoreClassRegister storeClassRegister,
                                  java.lang.Class<?> storeableType)
Creates a new instance.

Parameters:
storeReader - The store writer to read all serialised data from.
storeClassRegister - The register for class to identifier mappings.
storeableType - The type of class to be stored.
Method Detail

readClassFromIdentifier

protected java.lang.Class<?> readClassFromIdentifier(StoreReader sr,
                                                     StoreClassRegister scr)
Identifies the class using data from the underlying stream.

Specified by:
readClassFromIdentifier in class BaseObjectReader
Parameters:
sr - The store reader to read all serialised data from.
scr - The register for class to identifier mappings.
Returns:
The next class type in the data stream.