}
public void flush() throws StoreException {
File f = new File(_dir, "sessionids");
if (f.exists() && !f.isFile()) {
throw new StoreException("Couldn't create output file " + f);
}
try {
BufferedWriter bw = new BufferedWriter(new FileWriter(f));
Iterator<String> it = _sessionIDs.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
bw.write(key + "\r\n");
List<SessionID> list = _sessionIDs.get(key);
Iterator<SessionID> it2 = list.iterator();
while (it2.hasNext()) {
SessionID id = it2.next();
bw.write(id.toString() + "\r\n");
}
bw.write("\r\n");
}
bw.flush();
bw.close();
} catch (IOException ioe) {
throw new StoreException("IOException: " + ioe);
}
}