• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Does Java have asynchronized I/O?

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,


I am wondering whether Java has asynchronized I/O (whether built-in core Java SDK or 3rd party release), which is similar as select or poll in UNIX. Current read/write will be blocked when underlying stream is not ready. For example, when retrieving data from remote machine, we will be blocked if the remote machine will not response immediately.


Thanks in advance,
George
 
author and iconoclast
Posts: 24203
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it does, in the java.nio package. This was added in JDK 1.4. Here's an article that gives you an idea of what you can do.
 
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For your Googling pleasure, Java refers to this as "non-blocking I/O." Both Sun and IBM's tutorials are very good -- just the right balance of terseness and depth (for me anyway).
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May be you can start from this link:
http://www.google.com/search?hl=en&q=Non-blocking+IO+in+Java
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to IO...
 
George Lin
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ernest,


Originally posted by Ernest Friedman-Hill:
Yes it does, in the java.nio package. This was added in JDK 1.4. Here's an article that gives you an idea of what you can do.



Your reply is very helpful. I am using JDK 1.3, and do you know some solutions for JDK 1.3?


regards,
George
 
George Lin
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ilja,


Originally posted by Ilja Preuss:
Moving to IO...



I think this sub-forum is more suitable for my topic. Thanks again! :-)


regards,
George
 
George Lin
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Udegbunam,


Originally posted by Udegbunam Morah:
May be you can start from this link:
http://www.google.com/search?hl=en&q=Non-blocking+IO+in+Java



Your suggestion is very helpful! I have found that if I want to use Non-blocking IO in JDK 1.3, I have to use a native wrapper (or have some dependencies on native libraries). Are there any pure Java Non-blocking IO libraries for JDK 1.3?


regards,
George
 
George Lin
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David,


Originally posted by David Harkness:
For your Googling pleasure, Java refers to this as "non-blocking I/O." Both Sun and IBM's tutorials are very good -- just the right balance of terseness and depth (for me anyway).



Your reply is very helpful! I have found that if I want to use Non-blocking IO in JDK 1.3, I have to use a native wrapper (or have some dependencies on native libraries). Are there any pure Java Non-blocking IO libraries for JDK 1.3?


regards,
George
 
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic