public static <T, C extends Collection<? super T>> C readCollection(DataInput in, Reader<? extends T> reader, C acc) throws IOException {
    int size = in.readInt();
    while (size-- > 0) {
      acc.add(reader.read());
    }
    return acc;
  }
public static <T, C extends Collection<? super T>> C readCollection(DataInput in, Reader<? extends T> reader, C acc)