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 ( ) ) ; } }
Writes a value of an enumeration to the given output stream .