public static boolean write( Bundle bundle, OutputStream stream ){ return write(bundle, stream, compressByDefault); }
public static boolean write( Bundle bundle, OutputStream stream ){ return write(bundle, stream, compressByDefault); }
private static void bundleToStream( OutputStream output, Bundle bundle ) throws IOException{ Bundle.write( bundle, output ); output.close(); }
private static void bundleToStream( OutputStream output, Bundle bundle ) throws IOException{ Bundle.write( bundle, output ); output.close(); }
public static void saveGlobal() { Bundle bundle = null; if (saveNeeded) { bundle = new Bundle(); store(bundle, global); try { OutputStream output = Game.instance.openFileOutput(BADGES_FILE, Game.MODE_PRIVATE); Bundle.write( bundle, output ); output.close(); saveNeeded = false; } catch (IOException e) { } } }
public static void saveLevel() throws IOException { Bundle bundle = new Bundle(); bundle.put( LEVEL, level ); OutputStream output = Game.instance.openFileOutput( Utils.format( depthFile( hero.heroClass ), depth ), Game.MODE_PRIVATE ); Bundle.write( bundle, output ); output.close(); }
public void save( int difficulty ) { Bundle bundle = new Bundle(); bundle.put( RECORDS, records ); bundle.put( LATEST, lastRecord ); bundle.put( TOTAL, totalNumber ); bundle.put( WON, wonNumber ); String rankingsFile = Utils.format( RANKINGS_FILE, difficulty ); try { OutputStream output = Game.instance.openFileOutput( rankingsFile, Game.MODE_PRIVATE ); Bundle.write( bundle, output ); output.close(); } catch (Exception e) { } }
Bundle.write( bundle, output ); output.close(); } catch (IOException e) {
Bundle.write( bundle, output ); output.close();