public static void writeObject(Object o, DataOutput out) throws IOException {
    InternalDataSerializer.basicWriteObject(o, out, false);
  }
Writes an arbitrary object to a <code>DataOutput</code>. If <code>o</code> is not an instance
of a specially-handled standard Java class (such as <code>Date</code>, <code>Integer</code>, or
<code>ArrayList</code>), the {@link DataSerializer#toData toData} method of each registered
<code>DataSerializer</code> is invoked until the object is serialized. If no registered
serializer can serialize the object and <code>o</code> does not implement
<code>DataSerializable</code>, then it is serialized to <code>out</code> using standard Java
{@linkplain java.io.Serializable serialization}. This method will serialize a <code>null</code>
o and not throw a <code>NullPointerException</code>.

@param o the object to write
@param out the {@link DataOutput} to write to

@throws IOException A problem occurs while writing <code>o</code> to <code>out</code>

@see #readObject(DataInput)
@see DataSerializer
@see ObjectOutputStream#writeObject
geode-core/src/main/java/org/apache/geode/DataSerializer.java