code: public static void writeStringCached(DataOutput out, String entityName)
        throws IOException {
      byte[] name = getByteNameWithCaching(entityName);
      // name should never be null at this point
      if (name == null) {
        throw new RuntimeException("Cannot retrieve class name");
      }
      out.write(name, 0, name.length);
    }
docs: This class should be used for writing only class/method names!!!!