List of utility methods to do File Temp Create
File | getTempFile(String tmpName) get Temp File File file = new File(getApp().getApplicationContext() .getExternalCacheDir(), tmpName); myTempFiles.add(file); return file; |
File | getTempImageFile(Context context) get Temp Image File final File path = getAppCacheDir(context); if (!path.exists()) { path.mkdirs(); File f = new File(path, "temp_image.jpg"); if (f.exists() == false) { try { f.createNewFile(); ... |
Uri | getTempVideoFile() get Temp Video File if (Environment.getExternalStorageState() == null) { return null; File mediaStorage = new File( Environment .getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), "_VIDEO"); if (!mediaStorage.exists() && !mediaStorage.mkdirs()) { ... |
File | newTmpFile(String content) Creates a new temporary file using the default encoding of ISO-8859-1 (Latin1). return newTmpFile(content, "ISO-8859-1"); |
File | newTmpFile(String content, String encoding) Makes a new temporary file and writes content into it. Writer out = null; Reader in = null; File f = null; try { f = File.createTempFile("jspwiki", null); in = new StringReader(content); out = new OutputStreamWriter(new FileOutputStream(f), encoding); copyContents(in, out); ... |