Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. try {
  2. ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream("data.bin"));
  3. out.writeObject(container);
  4. out.close();
  5. System.out.println("Objecto gravado em binário com sucesso.");
  6. } catch (IOException ex) {
  7. System.out.println("Ocorreu um erro ao gravar o ficheiro binário.");
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement