InputStream in = this.getClass().getClassLoader().getResourceAsStream("student.xml"); this报错:Cannot use this in a static context 读student.xml文件 还有其他方法吗?
解决方案 »
- ScrollView布局中onTouchEvent不响应
- 急!!VideoView播放视频有时会报:此文件不支持渐进式播放
- 在android项目中引用mms包,无法识别,谁遇到过怎么处理的啊?
- android远程连接mySQL数据库失败,求救??
- 读《android游戏开发入门》遇到问题求教
- android的R.id cannot be resolved问题~~~!!!!!!!
- 读取listview中下拉滑动后某一行的内容的问题
- 关于android开发当中的版本和分辨率
- 如何加载和保存短信草稿
- 关于AndroidTV上使用scrollview的问题
- AndroidManifest.xml中配置了 跳转依然出错
- 显示锁屏界面时屏幕不能获取触摸事件?
String strFilePath = Environment.getExternalStorageDirectory() + "/student.xml";
File file = new File(strFilePath);
InputStream is = new FileInputStream(file);
InputStream bis = new BufferedInputStream(is);// 频繁读取文件可以用缓冲读取