IllegalArgumentException: File contains a path separator Android
<p>I am searching in google and can not find a true answer to my question !
my question is same as <a href="https://stackoverflow.com/questions/27053487/illegalargumentexception-file-contains-a-path-separator-android">him</a> but his want MODE_APPEND and i want MODE_PRIVATE for my file.how should i do ? </p>

<p>this is my code :</p>

<pre><code>public boolean saveCustomButtonInfo (Context context, Vector&lt;DocumentButtonInfo&gt; 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;

    }
}
</code></pre>