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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:12:29+00:00 2026-05-27T21:12:29+00:00

I am comfortable with actionscript. When I wantet to have network access for example

  • 0

I am comfortable with actionscript. When I wantet to have network access for example in air, I coded the request and waited for the EventListener to kick in.

At the moment I’m doing a java tutorial with the following android code (wrapped in a try/catch):

url = new URL("http://www.google.com");
URLConnection conn = url.openConnection();
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream());
String line = '';
while((line = reader.readLine()) != null) {
     // do something with the line
}

I don’t get how this works.

Why is there no eventListener needed? If the code proceeds immidiately after the URL is requested, the URL may not been retrieved when the while-Construct kicks in.

Is the app just paused in the meantime? If yes, is it possible to realise this with an eventlistner?

Thank you for 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-05-27T21:12:30+00:00Added an answer on May 27, 2026 at 9:12 pm

    Is the app just paused in the meantime?

    Yes. The regular Java IO classes are synchronous. The call to readLine() will block until either it can return a line or there’s an Exception.

    If yes, is it possible to realise this with an eventlistner?

    Yes, by using classes in the java.nio package. But only with a somewhat lower-level interface.

    In general, Java applications use multithreading instead of event qeueues to deal with such sitatuations.

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

Sidebar

Related Questions

Trying to get comfortable with jQuery and I have encountered some sample code that
I have been quite comfortable with windows-services, I have been practicing since from last
I have some experience of developing in Flex/Actionscript using Cairngorm framework. At that time
I don't feel comfortable harnessing USB device with Delphi and have a next to
So I'm comfortable with the basic concept of CQS, where you might have a
I feel pretty comfortable with the entity framework now. I have been reading some
I'm fairly comfortable with SVN, but have been looking at Mercurial for it's ability
I am not very comfortable with using accumarray function in Matlab, though I have
I have been developing in ActionScript 3 / Flex Builder 3 for a while
IS php is Comfortable with ORACLE?I have an experience of PHP + mysql ,

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.