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 8190451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:39:14+00:00 2026-06-07T03:39:14+00:00

it display 07-07 16:34:48.270: W/System.err(6050): copy java.io.IOException i already given the permission <uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE

  • 0

it display 07-07 16:34:48.270: W/System.err(6050): copy java.io.IOException
i already given the permission

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" /> 

File Copy code :

  File file = new File("/mnt/sdcard/infobooks/");

            if (file.exists() == false) {
                file.mkdirs();
            }

            InputStream myInput = this.getAssets().open("Book4.pdf");
            String outFileName = Environment.getExternalStorageDirectory()+"/infobooks/Book4.pdf";
            File file2=new File(outFileName);
            file2.createNewFile();

            FileOutputStream myOutput = new FileOutputStream(outFileName);

            // transfer bytes from the inputfile to the outputfile
            byte[] buffer = new byte[1024];
            int length;
            while ((length = myInput.read(buffer)) > 0) {
                myOutput.write(buffer, 0, length);
            }

            // Close the streams
            myOutput.flush();
            myOutput.close();
            myInput.close();
  • 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-07T03:39:15+00:00Added an answer on June 7, 2026 at 3:39 am

    From the sounds of it, your error isn’t related to writing to the external storage but rather reading from the assets. Does the file ‘Book4.pdf’ exist in the assets directory? How big is it? What version of Android are you running? There was a time when Android had a limit on file size in assets when compression was being used. Prior to Android 2.3, the AssetManager couldn’t read large compressed files (where large meant over 1MB in uncompressed state). The way around this was to not compress the file (by giving it an extension for which aapt skips compression, such as jpg or png), going to command-line builds, or splitting the files into smaller chunks then reconstituting them on the device.

    Without a full stacktrace, however, we can’t really know what the cause of the error is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I display my date in CGridView as: 22.6.2012 22:53 with: array('name' => 'date', 'value'
I have a TableView controller class that uses a fetched results controller to display
Display Tag provides pagination feature from the given object. Hibernates provides option to fetch
model: [Display(Name = Status)] public bool IsApproved { get; set; } in view: @Html.Grid(Model.Users).Sort(Model.GridSortOptions).Columns(column
Display whitespace characters in Eclipse is a simple trick , but unfortunately this applies
Error display as Incorrect syntax near '@Cmp_DocPath', if i use comment Line code I
Jnews Display list Content: http://i204.photobucket.com/albums/bb267/kellyshl/Untitled.png i wan to know how to make it like
I display the contents of a table in the database using a ListBox. Each
does Display:none or jquery Hide function speed up my website, i mean i'm developing
I display set of images(small). I need to show the larger image(300*300) at some

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.