public void readFields(DataInput in) throws IOException {
   int numUnionElts = in.readInt();
   this.unionTypes = new ArrayList<InferredType>();
   for (int i = 0; i < numUnionElts; i++) {
     unionTypes.add(InferredType.readType(in));
   }
   this.schema = computeAvroSchema();
 }
 public void readFields(DataInput in) throws IOException {
   bodyType = InferredType.readType(in);
   this.schema = computeAvroSchema();
 }