String splitClassName = is.readUTF();
try {
Class splitClass = conf.getClassByName(splitClassName);
SerializationFactory sf = new SerializationFactory(conf);
// The correct call sequence for Deserializer is, we shall open, then deserialize, but we shall not close
Deserializer d = sf.getDeserializer(splitClass);
d.open((InputStream) is);
wrappedSplits = new InputSplit[splitLen];
for (int i = 0; i < splitLen; i++)
{
wrappedSplits[i] = (InputSplit)ReflectionUtils.newInstance(splitClass, conf);
d.deserialize(wrappedSplits[i]);
}
} catch (ClassNotFoundException e) {
throw new IOException(e);
}