public class FileProcess
{
public void readData(String fileName){
try{
FileInputStream fileIn = openFileInput(fileName);
int length = fileIn.available();
byte[] buffer = new byte[length];
fileIn.read(buffer);
fileIn.close();
}catch(Exception e){
e.printStackTrace();
}
}
}
由于这个类没有继承Activity类,openFileInput()会一直报错,有什么解决方法?
胖鸟
相关分类