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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:23:59+00:00 2026-06-07T00:23:59+00:00

I get this error while accessing a php script: W/System.err: Error reading from ./org/apache/harmony/awt/www/content/text/html.class

  • 0

I get this error while accessing a php script:

W/System.err: Error reading from ./org/apache/harmony/awt/www/content/text/html.class

The offending code snippet is as follows:

URL url = "http://server.com/path/to/script"
is = (InputStream) url.getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "iso-8859-1"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
    sb.append(line + "\n");
}
is.close();

The error is thrown on the second line. A Google search on the error turned up 0 results. This warning doesn’t affect the flow of my application and its more an annoyance rather than a problem. it also only occurs on a API 11 device (works fine on API 8 & 9 devices)

  • 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-07T00:24:01+00:00Added an answer on June 7, 2026 at 12:24 am

    If you’re querying a PHP script, I’m pretty sure declaring a URL and then trying to get an InputStream off it isn’t the right way to do it…

    Try something like:

    HttpClient httpclient = new DefaultHttpClient();
    HttpGet httpGet = new HttpGet("http://someurl.com");
    
    try {
    // Execute HTTP Get Request
    HttpResponse response = httpclient.execute(httpGet);
    
    HttpEntity entity = response.getEntity();
    
    if (entity != null) {
    
        InputStream instream = entity.getContent();
        String result = convertStreamToString(instream);
    
                // Do whatever with the data here
    
    
                // Close the stream when you're done
        instream.close();
    
        }
    }
    catch(Exception e) { }
    

    And for easily converting the stream to a string, just call this method:

    private static String convertStreamToString(InputStream is) {
    
        BufferedReader reader = new BufferedReader(new InputStreamReader(is));
        StringBuilder sb = new StringBuilder();
    
        String line = null;
        try {
            while ((line = reader.readLine()) != null) {
                sb.append(line + "\n");
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                is.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return sb.toString();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error, while I'm testing the code below: You have an error
Every once and a while I get this error in IE when making an
While consuming SOAP service, I am getting this error. I just dun get it
I get this error when I use simplejson from django.utils in google app engine
I get the following error while accessing the Sitecore Training Website. Server Error in
I get this error when i try to upload an image: OSError at /upload/
I get this error on my Ice Cream Sandwich (Android 4.0) device and emulator.
I get this error when I run the code below. I have normally used
I get this error in my app { error: { message: Missing client_id parameter.,
i get this error Cannot open database DataLayer.Context.MedicallexiconContext requested by the login. The login

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.