앱을 만들면서 정보를 간단하게 저장하고 앱을 지워도 저장된 정보가 남아야하는 방법을 찾던 중 Properties에 대해 듣고
현재 사용중입니다 그런데 저장하는 정보가 좀 많아서 그런지
불러오는게 좀 느리네요
public PropertyUtil(){
mFile = new File(PROPERTY_FILE);
Log.d(TAG,"file :: "+PROPERTY_FILE);
properties = new Properties();
try{
if(!mFile.exists()) {
mFile.createNewFile();
Log.d(TAG,"file : create!");
}
fileInputStream = new FileInputStream(mFile);
Log.d(TAG,"fileInputStream");
fileOutputStream = new FileOutputStream(mFile, true);
Log.d(TAG,"fileOutputStream");
properties.load(fileInputStream);
Log.d(TAG,"file : load");
}catch (Exception e){
e.printStackTrace();
Log.e(TAG, "fail to file create or load");
}
}
이렇게 로그를 찍어보면 fileOutputStream이 찍힌 부분과 file : load가 찍힌 시간 차이가 2분 30초가 넘게 납니다ㅜㅜ
이런 시간차이는 저장되는 정보의 크기 때문일까요??
정보의 크기 때문이라면 그에 상관않고 앱을 지워도 저장된 정보가 남을 수 있는 저장방법이 있다면 알려주심 감사하겠습니다