0
Google에서 검색 중이며 내 질문에 대한 진정한 답변을 찾을 수 없습니다. 내 질문은 him과 동일하지만 원하는 MODE_APPEND 및 MODE_PRIVATE 내 file.how 원하는합니까?IllegalArgumentException : 파일에 경로 구분 기호가 포함되었습니다. Android
public boolean saveCustomButtonInfo (Context context, Vector<DocumentButtonInfo> info) throws Exception{
String path= context.getFilesDir() + "/" + "Load";
File file = new File(path);
if(! file.exists()){
file.mkdir();
//Toast.makeText(context,file.getAbsolutePath(),Toast.LENGTH_LONG).show();
}
path=path+"/DocumentActivityCustomButtonsInfo.obj";
try{
FileOutputStream out=context.openFileOutput(path,Context.MODE_PRIVATE);
ObjectOutputStream outObject=new ObjectOutputStream(out);
outObject.writeObject(info);
outObject.flush();
out.close();
outObject.close();
return true;
}catch(Exception ex){
throw ex;
}
}
최상의 답변에 감사드립니다. Vector는 쓸모 없지만 ArrayList보다 쉽다는 것을 알고 있습니다. true 조작을 체크하기위한 boolean 값 – b4hr4m