/** * <p> * 业务层<br/> * 2012-02-09 * </p> * @author Bo * */ public class FileService { /** * context对象 */ private Context context; /** * 构造函数,是的使用此类必须传一个context进来 * @param context */ public FileService(Context context){ this.context = context; } /** * 保存内容 * @param fileName 文件名称 * @param fileContent 文件内容 * @throws Exception */ public void save(String fileName, String fileContent) throws Exception{ // MODE_PRIVATE 表示私有的,只能被当前应该使用 FileOutputStream outStream = context.openFileOutput(fileName, context.MODE_PRIVATE); outStream.write(fileContent.getBytes()); } }
文章来源于网络或者作者投稿,若有侵权请联系删除,作者:老钟,如若转载,请注明出处:https://www.laoz.net/250.html
评论列表(2条)
最近空间快到期,也想换个空间,请问博主这个wordpress的博客主机空间,包年多少,在国内速度如何、
@us vpn:包年300左右,burst的空间,访问速度还行,我用很差不多一年了,比较稳定