code: public static void marshallString(String string, ObjectOutput out) throws IOException {
        if (string == null) {
           out.writeBoolean(true);
           return;
        }
        out.writeBoolean(false);
        out.writeUTF(string);
     }
docs: Marshall the {@link String}.
  <p>
  Same behavior as {@link ObjectOutput#writeUTF(String)} but it checks for {@code null}. If the {@code string} is
  never {@code null}, it is better to use {@link ObjectOutput#writeUTF(String)}.
  
  @param string {@link String} to marshall.
  @param out    {@link ObjectOutput} to write.
  @throws IOException If any of the usual Input/Output related exceptions occur.