2011-04-06 4 views

답변

6

이 작업을 시도 할 수 있습니다 :

try { 
    File sd = Environment.getExternalStorageDirectory(); 

    if (sd.canWrite()) { 
     String sourcePath= "/path/to/source/file.mp3"; 
     String destinationPath= "/path/to/destination/file.mp3"; 
     File source= new File(sd, sourcePath); 
     File destination= new File(sd, destinationPath); 
     if (source.exists()) { 
      FileChannel src = new FileInputStream(source).getChannel(); 
      FileChannel dst = new FileOutputStream(destination).getChannel(); 
      dst.transferFrom(src, 0, src.size()); 
      src.close(); 
      dst.close(); 
     } 
} catch (Exception e) {} 
+0

덕분에이 마법처럼 일을 작정! (^_^) 문제가 해결되었습니다! – Farhan

+0

@Farhan 당신은 환영합니다 :) – evilone

관련 문제