Guest User

Untitled

a guest
Jul 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. private final void setWriteObject() {
  2.            
  3.     try {
  4.         Out.println("Inizialized object serialization...");
  5.                
  6.             FileOutputStream fos = new FileOutputStream(the_path);
  7.             ObjectOutputStream oos = new ObjectOutputStream(fos);
  8.                
  9.             oos.writeObject(the_object);
  10.             oos.flush();
  11.             oos.close();
  12.                
  13.             Out.println("[ OK ]\n");
  14.                
  15.     } catch(IOException e) {
  16.         e.printStackTrace();
  17.     }
  18. }
Add Comment
Please, Sign In to add comment