public static void writeString(String value, DataOutput out) throws IOException {

    InternalDataSerializer.checkOut(out);

    final boolean isTraceSerialzerVerbose = logger.isTraceEnabled(LogMarker.SERIALIZER_VERBOSE);
    if (isTraceSerialzerVerbose) {
      logger.trace(LogMarker.SERIALIZER_VERBOSE, "Writing String \"{}\"", value);
    }

    StaticSerialization.writeString(value, out);
  }
Writes an instance of <code>String</code> to a <code>DataOutput</code>. This method will handle
a <code>null</code> value and not throw a <code>NullPointerException</code>.
<p>
As of 5.7 strings longer than 0xFFFF can be serialized.

@param value the <code>String</code> to write
@param out the {@link DataInput} to write to

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

@see #readString
geode-core/src/main/java/org/apache/geode/DataSerializer.java