快捷导航

输入输出流?

while(bytes = in.read(buf,0,buf.length) != -1){
for(int i = 0;i < bytes; i++)
Stystem.out.print(Integer.toHexString(buf)&0xff+" ");
}


while(bytes = in.read(buf,0,buf.length) != -1){
for(int i = 0;i < buf.length; i++)
Stystem.out.print(Integer.toHexString(buf)&0xff+" ");
}
这两个有什么区别,为什么我运行出来结果不一样!!!

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员1

第一种有可能是没有读完的情况。
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP