Exemplo n.º 1
0
 public void readFields(DataInput in) throws IOException {
   input.readFields(in);
   output = Text.readString(in);
 }
Exemplo n.º 2
0
 /**
  * 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));
 }