view plaincopy to clipboardprint?
1. packageaction;
2.
3. publicclassState{
4. privatelongreadedBytes=0L;/*已经上传的位数*/
5. privatelongtotalBytes=0L;/*文件所占位数*/
6. privateintcurrentItem=0;
7. privateintrate=0;/*上传百分比*/
8. publiclonggetReadedBytes(){
9. returnreadedBytes;
10. }
11.
12. publicvoidsetReadedBytes(longreadedBytes){
13. this.readedBytes=readedBytes;
14. }
15.
16. publiclonggetTotalBytes(){
17. returntotalBytes;
18. }
19.
20. publicvoidsetTotalBytes(longtotalBytes){
21. this.totalBytes=totalBytes;
22. }
23. publicintgetCurrentItem(){
24. returncurrentItem;
25. }
26.
27. publicvoidsetCurrentItem(intcurrentItem){
28. this.currentItem=currentItem;
29. }
30.
31. publicintgetRate(){
32. returnrate;
33. }
34. publicvoidsetRate(intrate){
35. this.rate=rate;
36. }
37. }