protected void onActivityResult (int requestCode, int resultCode, Intent data){
switch(requestCode){
case addweight_code :
if(resultCode == Activity.RESULT_OK) {
try{
FileOutputStream fos;
fos = openFileOutput("weight" + date, //////////////////////////////////////// weightYYMMDD.txt 몸무게 1 1
Context.MODE_PRIVATE);
this.weight = data.getStringExtra("inputed").getBytes();
fos.write(this.weight);

CalBmi calbmi = new CalBmi(this.weight, this.profile);
fos = openFileOutput("bmi"+ date,
Context.MODE_PRIVATE);
this.bmi = calbmi.getBmi().getBytes();
fos.write(this.bmi);


fos.close();
}catch (Exception e){
Toast.makeText(getApplicationContext(),"실패", Toast.LENGTH_SHORT).show();
}
}
break;
}
updateActivityData();
}



씨팔 이거 왜자꾸 실패뜰까

왜 파일출력을 못하니