/** * Read a bag from disk. * @param in DataInput to read data from. * @throws IOException (passes it on from underlying calls). */ public void readFields(DataInput in) throws IOException { long size = in.readLong(); for (long i = 0; i < size; i++) { try { Object o = DataReaderWriter.readDatum(in); add((Tuple)o); } catch (ExecException ee) { throw ee; } } }