save Config Properties - Android java.util

Android examples for java.util:Properties

Description

save Config Properties

Demo Code


//package com.java2s;
import android.content.Context;
import java.io.FileOutputStream;

import java.util.Properties;

public class Main {
    public static void saveConfig(Context context, Properties properties) {
        try {/*from  ww  w . ja va  2  s.  co  m*/
            FileOutputStream s = context.openFileOutput(
                    "config.properties", Context.MODE_PRIVATE);
            properties.store(s, "");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Related Tutorials