[775] in java-interest

home help back first fref pref prev next nref lref last post

Re: Non-blocking read on Socket?

daemon@ATHENA.MIT.EDU (Jonathan Payne)
Wed Jul 19 21:08:51 1995

Date: Wed, 19 Jul 1995 16:00:54 -0700
From: jpayne@starwave.com (Jonathan Payne)
To: pat@icon-stl.net
Cc: java-interest@java.Eng.Sun.COM
In-Reply-To: <Pine.BSI.3.91.950719114742.16433A-100000@server.icon-stl.net> (message from Pat Niemeyer on Wed, 19 Jul 1995 11:55:10 -0500 (CDT))

> Date: Wed, 19 Jul 1995 11:55:10 -0500 (CDT)
> From: Pat Niemeyer <pat@icon-stl.net>
> Mime-Version: 1.0
> Sender: owner-java-interest@java.sun.com
> Precedence: bulk
> X-Info: To unsubscribe, send 'unsubscribe' to java-interest-request@java.sun.com
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> Content-Length: 555
> 
> 
>  
> Is there currently any way to do a non-blocking read on the FileInputStream
> from Socket?  Should available() work for the input stream from a socket?  
> (My code doesn't seem to).

No.

> Is it possible to do the read in another thread?

Yes.

> Won't the read just block all of the threads (or is this implemenation defined?)

It is defined that blocking in read() in one thread will not block any
or all of the others.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post