我想知道如何在使用charsequence读取后将其放入stringbuffer中?
这是我的代码:
StringBuffer data=new StringBuffer();
File f= new File(Environment.getExternalSTorageDirector+"/file.pdf");
FileInputStream fileIS= new FileInputStream(f);
BufferReader buf= new BufferReader(new InputSreamReader(fileIS));
String readString = new String();
while((readString = buf.readLine())!=null)
{data.append(readString);
}
文件是10MB
这样做我有错误:OutOfMemory