帮我看看怎么改?
while(flage!=-1)
{
flage=reader.read(bt);
System.out.println(new String(bt)+flage);
}
文件内容:
Hello word!
hello word!
为什么输出内容是这样?
Hello word!11
hello wor11
d!hello wor2
d!hello wor-1
------解决方案--------------------System.out.println(new String(bt,0,flage)+flage);
------解决方案--------------------while(flage==11)
{
flage=reader.read(bt);
for(int i=0;i<flage;i++)
System.out.print(bt[i]);
}