웹주소에서

약 150메가 정도 되는 동영상 파일을 다운로드 해서 sd카드에 저장 시키려고 합니다.


    int nReadByte = 0;
    byte[] Data = new byte[512];
    
    try {
      URL Url = new URL("주소");
      URLConnection URLConn = Url.openConnection();
      InputStream is = URLConn.getInputStream();

      FileOutputStream fos = new FileOutputStream("/sdcard/test.txt");
      while((nReadByte = is.read(Data)) != -1) {
        fos.write(Data, 0, nReadByte);
       
      }
      is.close();
      fos.close();
    } catch (IOException e) {
      // Error
    }


위의 방식과 몇가지 다른 방식으로 했는데 불가능 하더군요.

어떻게 하는게 좋을가요..

아주 중요한 문제인데 ㅠㅠ