private static void checkPdxCompatible(Object o, boolean ensurePdxCompatibility) {
    if (ensurePdxCompatibility) {
      throw new NonPortableClassException(
          "Instances of " + o.getClass() + " are not compatible with non-java PDX.");
    }
  }
Data serializes an instance of a "user class" (that is, a class that can be handled by a
registered {@code DataSerializer}) to the given {@code DataOutput}.

@return {@code true} if {@code o} was written to {@code out}.
geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java