public void readFields(DataInput in) throws IOException { input.readFields(in); output = Text.readString(in); }
/** * Read an Enum value from DataInput, Enums are read and written using String values. * * @param <T> Enum type * @param in DataInput to read from * @param enumType Class type of Enum * @return Enum represented by String read from DataInput * @throws IOException */ public static <T extends Enum<T>> T readEnum(DataInput in, Class<T> enumType) throws IOException { return T.valueOf(enumType, Text.readString(in)); }