Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2005

Tip: Looking for answers? Try searching our database.

Does Java have asynchronized I/O?

Thread view: 
George George - 13 Apr 2005 05:19 GMT
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
Tony Morris - 13 Apr 2005 06:51 GMT
> Hello everyone,
>
[quoted text clipped - 6 lines]
> Thanks in advance,
> George

Yes, it is "New I/O" (aka nio).
This package claims to be asynchronous I/O, but it is in fact not the same
as UNIX async I/O - it does, however, fulfill your request for something
'similar'.
http://java.sun.com/j2se/1.5.0/docs/guide/nio/index.html

Signature

Tony Morris

JTiger Unit Test Framework for J2SE 1.5
http://www.jtiger.org/
Java Q&A (FAQ, Trivia)
http://qa.jtiger.org/
http://xdweb.net/~dibblego/

George George - 13 Apr 2005 07:08 GMT
Thanks Tony,

I am using JDK 1.3 (not 1.5), and I am wondering whether there are some
asynchronized I/O SDK for Java 1.3.

regards,
George
Tony Morris - 13 Apr 2005 08:15 GMT
> Thanks Tony,
>
[quoted text clipped - 3 lines]
> regards,
> George

Before 1.4, there is nothing in the core API.
I vaguely remember some third party that was implementing real async I/O,
but buggered if I can remember details.
Google should help.

Signature

Tony Morris

JTiger Unit Test Framework for J2SE 1.5
http://www.jtiger.org/
Java Q&A (FAQ, Trivia)
http://qa.jtiger.org/
http://xdweb.net/~dibblego/

George George - 15 Apr 2005 15:40 GMT
Thanks Tony,

Can you remember some more key information about the third party library? I
need some key words to make searches.

I have also Googled some third party Java non-blocking I/O libraries, but
all the for JDK 1.3 version libraries are dependent on native libraries. I
want to find some pure Java non-blocking I/O libraries which are written in
pure Java (means platform independent).

regards,
George
Tony Morris - 15 Apr 2005 17:02 GMT
> Thanks Tony,
>
[quoted text clipped - 8 lines]
> regards,
> George

I have doubts that you'll find non-blocking I/O libraries that are not
dependant on native behaviour.
Sounds to me like you'll have to redefine requirements.
Good luck.

Signature

Tony Morris

JTiger Unit Test Framework for J2SE 1.5
http://www.jtiger.org/
Java Q&A (FAQ, Trivia)
http://qa.jtiger.org/
http://xdweb.net/~dibblego/

George George - 18 Apr 2005 09:46 GMT
Thanks Tony,

Maybe I have not made myself understood. I mean I want to find an
asynchronized I/O library which is purely implemented by Java (for example,
using Java's internal multiple threading approaches), and not dependent on
native OS capabilities. Do you know where exists a solution for JDK 1.3?

regards,
George
Thomas Schodt - 18 Apr 2005 17:12 GMT
Tony Morris wrote:
> I have doubts that you'll find non-blocking I/O libraries that are not
> dependant on native behaviour.
> Sounds to me like you'll have to redefine requirements.
> Good luck.

> Maybe I have not made myself understood. I mean I want to find an
> asynchronized I/O library which is purely implemented by Java (for example,
> using Java's internal multiple threading approaches), and not dependent on
> native OS capabilities. Do you know where exists a solution for JDK 1.3?

I don't think your requirements were unclear, rather, I think Tony was
"impressed" by your optimism.

A solution has already been provided: Upgrade to Java 1.4
George George - 19 Apr 2005 03:04 GMT
Thanks Thomas,

Your reply is very helpful! I will consider your comments carefully.

regards,
George


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.