⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dojofilestorageprovider.java

📁 OA系统实现以下功能: a、个人办公,我的办公桌 b、公文管理 c、工作流程 d、组织管理 e. 权限管理
💻 JAVA
字号:
/**	This is a simple class that can load, save, and remove 	files from the native file system. It is needed by Safari and Opera	for the dojo.storage.browser.FileStorageProvider, since both of	these platforms have no native way to talk to the file system	for file:// URLs. Safari supports LiveConnect, but only for talking	to an applet, not for generic scripting by JavaScript, so we must	have an applet.	@author Brad Neuberg, bkn3@columbia.edu*/import java.io.*;import java.util.*;public class DojoFileStorageProvider{	public String load(String filePath) 			throws IOException, FileNotFoundException{		StringBuffer results = new StringBuffer();		BufferedReader reader = new BufferedReader(					new FileReader(filePath));			String line = null;		while((line = reader.readLine()) != null){			results.append(line);		}		reader.close();		return results.toString();	}	public void save(String filePath, String content) 			throws IOException, FileNotFoundException{		PrintWriter writer = new PrintWriter(					new BufferedWriter(						new FileWriter(filePath, false)));		writer.print(content);		writer.close();	}	public void remove(String filePath)			throws IOException, FileNotFoundException{		File f = new File(filePath);		if(f.exists() == false || f.isDirectory()){			return;		}		if(f.exists() && f.isFile()){			f.delete();		}	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -