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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:48:50+00:00 2026-05-22T22:48:50+00:00

I specify these file address data/data/org.com.Cache/files/cacheImplementationOutput but I got the following error message….. java.io.IOException:

  • 0

I specify these file address data/data/org.com.Cache/files/cacheImplementationOutput but I got the following error message…..

java.io.IOException: Couldn't open /data/data/org.com.Cache/files/cacheImplementationOutput
  • 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-22T22:48:51+00:00Added an answer on May 22, 2026 at 10:48 pm

    mention the method name as fetch(url, outputXml);

    and read the xml content as….
    FileInputStream fis = openFileInput(outputXml);

    public byte[] readBytes(InputStream inputStream, String outputXml) {
    try {
    ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
    int bufferSize = 1024;
    byte[] buffer = new byte[bufferSize];
    OutputStreamWriter fout = new OutputStreamWriter(openFileOutput(
    outputXml,0));
    int len = 0;
    while ((len = inputStream.read(buffer)) != -1) {
    byteBuffer.write(buffer, 0, len);
    }
    fout.write(new String (byteBuffer.toByteArray()));
    fout.close();
    return byteBuffer.toByteArray();
    }catch (NullPointerException e) {
    e.printStackTrace();
    }
    catch (Exception e) {
    }
    return null;

    }
    
    public void fetch(URL url, String outputXml) {
        try {
    
            InputStream myInputStream = null;
            StringBuilder sb = new StringBuilder();
    
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setDoOutput(true);
            conn.setRequestMethod("POST");
            conn.setRequestProperty("Content-Type", "application/xml");
            OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
            wr.write(sb.toString());
            wr.flush();
            wr.close();
            myInputStream = conn.getInputStream();
            readBytes(myInputStream, outputXml);
            System.out.println("writing is done");
        }catch (NullPointerException e) {
            e.printStackTrace();
        } 
        catch (Exception e) {
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can set my usual email address in my ~/.hgrc file, but is there
I have these two collections: List<string> files = Directory.GetFiles(FilePath).ToList().Select(file => new FileInfo(file).Name).ToList(); string[] dirs
Drupal modules are php files with .module file extensions. To generate tags on these
Is there a way to specify a one dimensional array in a ini file.
Castle Validator uses attributes to specify validation rules. How can you hook these up
Is there a way to specify in a data connection or the LinqToSql Designer
I want to extract all the properties from my pom.xml into a properties-file. These
I'm a bit confused with all these new File I/O classes in JDK7. Let's
Building a file open dialog replacement. Much of it works now, but I would
I don't totally understand how all this works, but I'm getting this error: Fatal

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.