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