public static <K, V> SnapshotIterator<K, V> read(File snapshot)
      throws IOException, ClassNotFoundException {
    TypeRegistry typeRegistry = null;
    try {
      Cache cache = CacheFactory.getAnyInstance();
      if (cache != null) {
        typeRegistry = ((InternalCache) cache).getPdxRegistry();
      }
    } catch (CancelException ignore) {
      // proceed with no type registry
    }
    return GFSnapshot.read(snapshot, typeRegistry);
  }
Reads a snapshot file and passes the entries to the application.
<p>
Prior to invoking <code>read</code> all necessary serializers (either {@link DataSerializer} or
{@link PdxSerializer}) and any {@link Instantiator} should have been registered.

@param <K> the key type
@param <V> the value type

@param snapshot the snapshot file
@return the snapshot iterator

@throws IOException error reading the snapshot file
@throws ClassNotFoundException unable deserialize entry
geode-core/src/main/java/org/apache/geode/cache/snapshot/SnapshotReader.java