long block=file_length/10000; ------------->变量block代表什么含义?
ShowJProgressBar showJProgressBar1=new ShowJProgressBar();
int f_data;
long count=1;-----------------〉变量count代表什么含义?
int bar_value=1;
do{
f_data=bis.read();
if(f_data!=-1)
{
bos.write(f_data);
count++;---------------------->count为什么要自加?
if(count%block==0)-------->为什么要进行count%block==0判断?
{
bar_value++;
showJProgressBar1.setValue(bar_value);
}
}
}while(f_data!=-1);
showJProgressBar1.setValue(100);----------->bar_value++可以自加到100,为啥这又重复设置?
ShowJProgressBar showJProgressBar1=new ShowJProgressBar();
int f_data;
long count=1;-----------------〉变量count代表什么含义?
int bar_value=1;
do{
f_data=bis.read();
if(f_data!=-1)
{
bos.write(f_data);
count++;---------------------->count为什么要自加?
if(count%block==0)-------->为什么要进行count%block==0判断?
{
bar_value++;
showJProgressBar1.setValue(bar_value);
}
}
}while(f_data!=-1);
showJProgressBar1.setValue(100);----------->bar_value++可以自加到100,为啥这又重复设置?
showJProgressBar1.setValue(100);//最后让进度条显示完成,可能有文件大小不是1000倍数