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

  • Home
  • SEARCH
  • 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 7977763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:18:03+00:00 2026-06-04T09:18:03+00:00

Why does the Android system throw this Exception? 05-18 12:33:44.169 W/System.err( 8230): java.io.IOException: Is

  • 0

Why does the Android system throw this Exception?

05-18 12:33:44.169 W/System.err( 8230): java.io.IOException: Is a directory
05-18 12:33:44.169 W/System.err( 8230):     at org.apache.harmony.luni.platform.OSFileSystem.read(Native Method)
05-18 12:33:44.169 W/System.err( 8230):     at dalvik.system.BlockGuard$WrappedFileSystem.read(BlockGuard.java:165)
05-18 12:33:44.169 W/System.err( 8230):     at java.io.FileInputStream.read(FileInputStream.java:290)
05-18 12:33:44.169 W/System.err( 8230):     at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:166)
05-18 12:33:44.169 W/System.err( 8230):     at java.io.BufferedInputStream.read(BufferedInputStream.java:324)
05-18 12:33:44.169 W/System.err( 8230):     at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
05-18 12:33:44.169 W/System.err( 8230):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:573)
05-18 12:33:44.169 W/System.err( 8230):     at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:384)
05-18 12:33:44.169 W/System.err( 8230):     at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:412)
05-18 12:33:44.169 W/System.err( 8230):     at dalvik.system.NativeStart.run(Native Method)
05-18 12:33:44.169 D/skia    ( 8230): ---- read threw an exception

I am loading the images into memory like this:

return BitmapFactory.DecodeFile(fullPathToImage);

This is not causing failing problems, but it does cause unnecessary delays in the loading.

The image is stored on the Environment.ExternalStorageDirectory.AbsolutePath. The path is the full path including the image filename and extension. The image does load properly, so why does it do this?

I saw this SO: java.io.IOException: Is a directory Android, but this seems to be related to drawable resources, which I am not using.

  • 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-06-04T09:18:05+00:00Added an answer on June 4, 2026 at 9:18 am

    I’d be curious to see if you still get the error if you wrapped your DecodeFile call in a check to see whether the file system thinks it’s a directory:

    File f = new File(fullPathToImage);
    if (!f.IsDirectory)
    {
        return BitmapFactory.DecodeFile(fullPathToImage);
    }
    else
    {
        Console.WriteLine("This is a directory: " + fullPathToImage);
    }
    

    One other possibly useful thought. If you’re dealing with very large images and you don’t need them to be full resolution, you could possibly improve performance by reducing their size:

    BitmapFactory.Options opts = new BitmapFactory.Options();
    opts.InSampleSize = 4; //Cut the image size to 1/4 the original
    return BitmapFactory.DecodeFile(imgFile, opts);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to get the android device system log programatically using Java?
This question has been asked before at How does Android enforce permissions? . While
It seems the java.net.NetworkInterface implementation of android does not have a byte[] getHardwareAddress() method
in Android the system does not scan flac lossless audio files, so I write
Does android OS log system events to a log file somewhere? If so, where/how
does Android have a best practices guideline on creating & populating the db/tables programmatically
Does android expose an API or somesuch for the development of thirdparty keyboard applications?
Does Android broadcast an intent when the network state has changend, i.e. from GSM
What font file types does Android support (for use with Typeface.createFromAsset, for instance)? I
I need to perform action, when my activity is fully loaded? Does Android have

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.