InputStream in = this.getClass().getClassLoader().getResourceAsStream("student.xml"); this报错:Cannot use this in a static context 读student.xml文件 还有其他方法吗?
InputStream in = this.getClass().getClassLoader().getResourceAsStream("student.xml"); this报错:Cannot use this in a static context 读student.xml文件 还有其他方法吗?
String strFilePath = Environment.getExternalStorageDirectory() + "/student.xml";
File file = new File(strFilePath);
InputStream is = new FileInputStream(file);
InputStream bis = new BufferedInputStream(is);// 频繁读取文件可以用缓冲读取