public static Shred Load(string filepath)
{
if (!File.Exists(filepath))
{
throw new FileNotFoundException();
}
Stream stream = File.Open(filepath, FileMode.Open);
BinaryFormatter binaryFormatter = new BinaryFormatter();
Shred objectToDeserialize = (Shred) binaryFormatter.Deserialize(stream);
stream.Flush();
stream.Close();
Logger.Info("Deserializing shred id={0} from filename={1}", objectToDeserialize.Id, filepath);
return objectToDeserialize;
}