public static KnownVersion getVersionForDataStream(DataOutput out) {
    // check if this is a versioned data output
    if (out instanceof VersionedDataStream) {
      final KnownVersion v = ((VersionedDataStream) out).getVersion();
      return v != null ? v : KnownVersion.CURRENT;
    } else {
      // assume latest version
      return KnownVersion.CURRENT;
    }
  }
Get the {@link KnownVersion} of the peer or disk store that created this
{@link DataOutput}.
geode-serialization/src/main/java/org/apache/geode/internal/serialization/StaticSerialization.java