File file2 = new File("/sdcard/" + "wuxifu002.amr");//该文件没有的话默认不会创建的
file2.createNewFile();//有则不创建
/**
* Constructs a new file using the specified path.
*
* @param path
* the path to be used for the file.
*/
public File(String path) {
this.path = fixSlashes(path);
}
//如果该文件不存在,默认自动创建
FileOutputStream fos = new FileOutputStream("/sdcard/" + "wuxifu003.amr");
public FileOutputStream(String path) throws FileNotFoundException {
this(path, false);
}
public FileOutputStream(String path, boolean append) throws FileNotFoundException {
this(new File(path), append);
}
//如果该文件不存在,默认不会自动创建
FileInputStream fis = new FileInputStream("/sdcard/" + "wuxifu003333.amr");
public FileInputStream(String path) throws FileNotFoundException {
this(new File(path));
}