코드는 매우 간단하고 실용적입니다.
android.mooc.toom은 java.file을 가져옵니다 int buffer_size는 개인 부울을 완료하기 위해 프라이버시 파일; Boolean DERVING; Public Boolean isdestory () {return void setDestory (boolean goodory)} public filedownloadthread (url url, 파일 파일, int endposition) {this.url = url; 파일; this.curposition = endposition = 0; null; randomacccepile fos = buf = buffer_size; ( "범위", " + startPosition +"-"accepproperty"; (수용자 ","Zh-CN ");"charset ","UTF-8 "; 4.0; " +".NET CLR 3.04506.30; Java는 FOS를 무작위로 읽고 쓰기 시작합니다 읽기 및 쓰기 파일의 형태 (2000);} int len = bis.read (bufer_size) {fos.write (buf, 0, len); Cirposition = Curposity + Len (Curposition> endposition>) {d = " + len); 완성 = true; bis.close (); fos.close ();} catch (예외 e) {e.printstacktrace ();}} public boolean isstate () {return state;} public v oid setState (부울 상태) {this .state = state;} public boolean isfiinished () {return 완료;} public int getDownloadsize () {return doubledsize;} public voidlo adsize (int doubleadsize) {this.downloadsize = downloadSize;}}}위는이 기사의 모든 내용입니다.