public static KnownVersion getVersionForDataStreamOrNull(DataOutput out) {
    // check if this is a versioned data output
    if (out instanceof VersionedDataStream) {
      return ((VersionedDataStream) out).getVersion();
    } else {
      // assume latest version
      return null;
    }
  }
Get the {@link KnownVersion} of the peer or disk store that created this
{@link DataOutput}. Returns
null if the version is same as this member's.
geode-serialization/src/main/java/org/apache/geode/internal/serialization/StaticSerialization.java