public static void writeClass(final Class<?> c, final DataOutput out) throws IOException {
    if (c == null || c.isPrimitive()) {
      writePrimitiveClass(c, out);
    } else {
      // non-primitive classes have a second CLASS byte
      // if readObject/writeObject is called:
      // the first CLASS byte indicates it's a Class, the second
      // one indicates it's a non-primitive Class
      out.writeByte(DSCODE.CLASS.toByte());
      String cname = c.getName();
      cname = processOutgoingClassName(cname);
      writeString(cname, out);
    }
  }
Returns a byte array for use by the calling thread.
The returned byte array may be longer than minimumLength.
The byte array belongs to the calling thread but callers must
be careful to not call other methods that may also use this
byte array.
geode-serialization/src/main/java/org/apache/geode/internal/serialization/StaticSerialization.java