code: public static <T extends Enum<T>> T readEnum(final DataInput in, final Class<T> enumType) throws IOException {
  
  		if (!in.readBoolean()) {
  			return null;
  		}
  
  		return T.valueOf(enumType, StringRecord.readString(in));
  	}
docs: Reads a value from the given enumeration from the specified input stream.
  
  @param <T>
  the type of the enumeration
  @param in
  the input stream to read from
  @param enumType
  the class of the enumeration
  @return the value of the given enumeration read from the input stream
  @throws IOException
  thrown if any error occurred while reading data from the stream