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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:48:56+00:00 2026-06-11T11:48:56+00:00

I am trying to do something simple like save a file to a cache

  • 0

I am trying to do something simple like save a file to a cache directory in Android and I am having a lot of problems. I am using Simple serializer to write out my file into xml.

Here is my code:

public void testWrite(ListDefinitions ld)
{
    Serializer serializer = new Persister();

    String fileName = "sampleExport.xml";
    try {
        File file = new File(mContext.getCacheDir(), fileName);
        file.createNewFile();
        serializer.write(ld, file);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

And I keep getting the following error:

09-18 00:35:06.229: W/System.err(4442): java.io.FileNotFoundException: /data/data/com.main/cache/sampleExport.xml: open failed: EISDIR (Is a directory)

Thank you for the help.

  • 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-11T11:48:57+00:00Added an answer on June 11, 2026 at 11:48 am

    Probably you created directory before with wrong call. Try to clean app data in settings.

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

Sidebar

Related Questions

I feel like I'm trying to do something simple but I am not getting
Trying to make a simple program to catalogue books. Something like this, for example:
Trying to make a simple program to catalogue books. Something like this, for example:
I'm trying to do something simple like this: members = models.ManyToManyField(User, blank=True, null=True, unique=True)
I am trying to build something very similar to like this using django activity
i feel like im trying to do something super simple, but just being stupid
So i am trying to create something like a syncronized paint program by using
I'm trying to do something simple like get calc.exe to start minimized, but it's
I'm trying something very simple. Upon page load the data in content div is
actually I thought I was trying something really simple. ControllerClassNameHandlerMapping sounded great to produce

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.