}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
int size = in.readInt();
MutableByteBag deserializedBag = new ByteHashBag();
for (int i = 0; i < size; i++)
{
deserializedBag.addOccurrences(in.readByte(), in.readInt());
}
this.bag = deserializedBag;
}