Guest User

Untitled

a guest
May 26th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public static void save(FileIO files){
  2. BufferedWriter out = null;
  3.  
  4.  
  5. try {
  6. out = new BufferedWriter(new OutputStreamWriter(files.writeFile(".pirat")));
  7. out.write(Boolean.toString(soundEnabled));
  8. for (int i = 0; i < 5; i++) {
  9. out.write(Integer.toString(highscores[i]));
  10. }
  11.  
  12. } catch (IOException e) {
  13. }
  14. finally{
  15. try {
  16. if (out != null) {
  17. out.close();
  18. }
  19. } catch (IOException e2) {
  20. }
  21. }
Add Comment
Please, Sign In to add comment