Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1079927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:56:50+00:00 2026-05-16T21:56:50+00:00

I am trying to download a file from the net and write it to

  • 0

I am trying to download a file from the net and write it to the SD card. I have the WRITE_EXTERNAL_STORAGE permission enabled. The code fails here:

OutputStream output = new FileOutputStream(filePath);

09-15 19:40:31.630: WARN/System.err(7933): java.io.FileNotFoundException: /sdcard/artoo/Customerv08.apk
09-15 19:40:31.630: WARN/System.err(7933):     at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:231)
09-15 19:40:31.630: WARN/System.err(7933):     at java.io.FileOutputStream.<init>(FileOutputStream.java:96)
09-15 19:40:31.630: WARN/System.err(7933):     at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
09-15 19:40:31.630: WARN/System.err(7933):     at java.io.FileOutputStream.<init>(FileOutputStream.java:147)
09-15 19:40:31.640: WARN/System.err(7933):     at com.artoo.settings.InstallerActivity$ProgressDialogAsyncTask.doInBackground(InstallerActivity.java:148)
09-15 19:40:31.640: WARN/System.err(7933):     at com.artoo.settings.InstallerActivity$ProgressDialogAsyncTask.doInBackground(InstallerActivity.java:1)
09-15 19:40:31.640: WARN/System.err(7933):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
09-15 19:40:31.640: WARN/System.err(7933):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
09-15 19:40:31.640: WARN/System.err(7933):     at java.util.concurrent.FutureTask.run(FutureTask.java:122)
09-15 19:40:31.640: WARN/System.err(7933):     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:648)
09-15 19:40:31.640: WARN/System.err(7933):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:673)
09-15 19:40:31.651: WARN/System.err(7933):     at java.lang.Thread.run(Thread.java:1060)
09-15 19:40:31.670: WARN/InputManagerService(53): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43868480

I am trying to write the file and it doesn’t exists from before. Any ideas on how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:56:51+00:00Added an answer on May 16, 2026 at 9:56 pm

    You are getting that error because the file specified cannot be opened or does not exist. It’s simple as that.

    I always create a file before and use a bufferedstream to write to it, ex :

    File file = new File(path, name);
    file.createNewFile();
    BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file), BUFFER);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to download a file in vb.net but the url I'm downloading from
I'm trying to download a file from a URL. My code doesn't return an
I am trying to download a file from a website using python and mechanize.
i'm trying to download .zip file from bluehost server to my computer. Like this
On Ubuntu, I am trying to download a file (from a script) using wget.
I'm trying to download the XLS file from this page: http://www.nordpoolspot.com/Market-data1/Elspot/Area-Prices/ALL1/Hourly/ (click on Export
I'm trying to download an xml file to parse from a server, but the
I am trying to implement an Asynchronous file download from a web server using
When I am trying to download a file whose name has characters from languages
I'm trying out http requests to download a pdf file from google docs using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.