Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void load(FileIO files)
- {
- BufferedReader in = null;
- Log.e("bla", "load");
- try {
- in = new BufferedReader(new InputStreamReader(files.readFile(".pirat")));
- soundEnabled=Boolean.parseBoolean(in.readLine());
- for (int i = 0; i < 5; i++) {
- Log.e("bla", "load" + i);
- highscores[i] = Integer.parseInt(in.readLine());
- Log.e("bla", "load" + highscores[i]);
- }
- } catch (IOException e) {
- // defaults ftw ^^
- }
- catch (NumberFormatException e) {
- // ja doch defaults regulieren
- }
- finally{
- try {
- if (in != null) {
- in.close();
- }
- } catch (IOException e2) {
- //Handle mit es ;>
- }
- }
- }
Add Comment
Please, Sign In to add comment