public void createLogFileAndAddToMap ( SessionId sessionId ) throws IOException { File rcLogFile ; // create logFile; rcLogFile = File . createTempFile ( sessionId . toString ( ) , ".rclog" ) ; rcLogFile . deleteOnExit ( ) ; LogFile logFile = new LogFile ( rcLogFile . getAbsolutePath ( ) ) ; sessionToLogFileMap . put ( sessionId , logFile ) ; }
This creates log file object which represents logs in file form . This opens ObjectOutputStream which is used to write logRecords to log file and opens a ObjectInputStream which is used to read logRecords from the file .