org.openstreetmap.osmosis.core.store
Class GenericObjectReader

java.lang.Object
  extended by org.openstreetmap.osmosis.core.store.BaseObjectReader
      extended by org.openstreetmap.osmosis.core.store.GenericObjectReader
All Implemented Interfaces:
ObjectReader

public class GenericObjectReader
extends BaseObjectReader

Provides functionality to deserialise a Storeable implementation from a store. This implementation supports the loading of any Storeable object.

Author:
Brett Henderson

Constructor Summary
GenericObjectReader(StoreReader storeReader, StoreClassRegister storeClassRegister)
          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 org.openstreetmap.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

GenericObjectReader

public GenericObjectReader(StoreReader storeReader,
                           StoreClassRegister storeClassRegister)
Creates a new instance.

Parameters:
storeReader - The store writer to read all serialised data from.
storeClassRegister - The register for class to identifier mappings.
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.