private boolean moveNext() throws IOException, ClassNotFoundException {
        SnapshotRecord record;
        while ((record = in.readSnapshotRecord()) != null) {
          foundNext = true;

          final K key = record.getKeyObject();
          final V value = record.getValueObject();

          next = new Entry<K, V>() {
            @Override
            public K getKey() {
              return key;
            }

            @Override
            public V getValue() {
              return value;
            }

            @Override
            public V setValue(V value) {
              throw new UnsupportedOperationException();
            }
          };
          return true;
        }

        close();
        return false;
      }
Reads a snapshot file.

@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 to deserialize entry
geode-core/src/main/java/org/apache/geode/internal/cache/snapshot/GFSnapshot.java