Causes all currently buffered information to be written to the output stream.
eg:
......
FileOutputStream file = new FileOutputStream("c:\userInfo.ser");
ObjectOutputStream out = new ObjectOutputStream(file);
out.writeObject(user);
out.flush();
......