当我尝试运行以下代码时,我收到错误... 控制台没有显示任何错误。
public List<MailExample> getMailAttributes()
{
List<MailExample> mailList = null;
try
{
File file = new File("c:/mail.dat");
if(!file.exists())
{
MailExample me = new MailExample("manoj.@webservices.com", "Test Mail", "hi this is the testing mail");
mailList = new ArrayList<MailExample>();
mailList.add(me);
}
else
{
FileInputStream fis = new FileInputStream(file);
ObjectInputStream oos = new ObjectInputStream(fis);
mailList = (List<MailExample>) oos.readObject();
oos.close();
}
}
catch(Exception e)
{
e.printStackTrace();
}
return mailList;