Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.25 KB | None | 0 0
  1. private static void writeToFile(String filename, Object object) throws Exception {
  2.         FileOutputStream fout = new FileOutputStream(new File(filename));
  3.         ObjectOutputStream oout = new ObjectOutputStream(fout);
  4.         oout.writeObject(object);
  5.         oout.close();
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement