os.writeInt(wrappedSplits.length);
os.writeUTF(wrappedSplits[0].getClass().getName());
SerializationFactory sf = new SerializationFactory(conf);
Serializer s =
sf.getSerializer(wrappedSplits[0].getClass());
s.open((OutputStream) os);
for (int i = 0; i < wrappedSplits.length; i++)
{
// The correct call sequence for Serializer is, we shall open, then serialize, but we shall not close
s.serialize(wrappedSplits[i]);
}