Problem in loading Objects using ObjectInputStream
Hello,
*This method load data from the secondary memory*/
public void load() throws Exception
{
//File dataFile = new File(".\\center.dat");
//if (dataFile.exists())
//{
ObjectInputStream in = null;
in = new ObjectInputStream(new
FileInputStream("center.dat"));
System.out.println("Open file for reading");
if(in == null)
System.out.println("File does not open correctly");
//Load courses
courses = (CourseList)in.readObject();
System.out.println("Successfully read courses of the system");
//Load Modules
modules = (ModuleList)in.readObject();
System.out.println("Successfully read modules of the system");
//Load Batches
batches = (BatchList)in.readObject();
System.out.println("Successfully read batches of the system");
//Load Candidates
candidates = (CandidateList)in.readObject();
System.out.println("Successfully read candidates of the system");
in.close();
System.out.println("Close objects file");
//}
}
As i print the message of the exception it printCode excepting
I get this exception when i call readObject method and i had checked Object of ObjectInputStream i.e.in is not null.
Please help me

