code: public static void writeEnum(final DataOutput out, final Enum<?> enumVal) throws IOException {
  
  		if (enumVal == null) {
  			out.writeBoolean(false);
  		} else {
  			out.writeBoolean(true);
  			StringRecord.writeString(out, enumVal.name());
  		}
  	}
docs: Writes a value of an enumeration to the given output stream.
  
  @param out
  the output stream to write to
  @param enumVal
  the value of a enumeration to be written to the output stream
  @throws IOException
  thrown if any error occurred while writing data to the stream