Hi,
I've a problem in using input stream.... Following is the code which reads
from input stream. The while statement below keeps executing till I get
response from input which consumes lots of CPU time. IS there any efficient
method to avoid this ???? Similer to wait in thread ???
BufferedReader in;
in = new BufferedReader( new InputStreamReader( socket.getInputStream() ));
try
{
while(!in.ready())
{
try
{
// do something when is ready process it
System.out.println("waiting");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
please help
Mahesh
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html