Code example for ObjectInputStream

Methods: close, readObject

0
	public static void LoadState(String fileName) 
	{ 
		try 
		{ 
			FileInputStream in = new FileInputStream(fileName); 
        	ObjectInputStream s = new ObjectInputStream(in); 
        	_timerInstance = (AgentSimulationTime) s.readObject(); 
        	_timerInstance.Resume(); 
        	 
        	s.close(); 
        	in.close(); 
		} 
		catch (Exception e) 
		{ 
			e.printStackTrace(); 
		} 
	} 
 
	private long _simulationTime; 
	private float _timeMultiplier;