code: public static void writeEnum(DataOutput out, Enum<?> enumVal) throws IOException {
          Text.writeString(out, enumVal.name());
      }
docs: writes String value of enum to DataOutput.
  @param out Dataoutput stream
  @param enumVal enum value
  @throws IOException