FileInputStream fis = new FileInputStream(fileObject);
ObjectInputStream ois = new ObjectInputStream(fis);
obj = (Serializable) ois.readObject();
ois.close();
} catch (FileNotFoundException e) {
throw new RboException(RboExceptionType.ERROR, "file object "
+ filePath + " does not exist.", e);
} catch (IOException e) {
throw new RboException(RboExceptionType.ERROR, "I/O for file "
+ filePath + " :\n", e);
} catch (ClassNotFoundException e) {
throw new RboException(RboExceptionType.ERROR,
"Class not found from file " + filePath + " :\n", e);
}
return obj;
}