BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

streams in applet (another question)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder JavaAPI
View previous topic :: View next topic  
Author Message
Alex Tyutyunik
Guest





PostPosted: Mon Jul 14, 2003 1:03 pm    Post subject: streams in applet (another question) Reply with quote



Good day, some trouble here...

private InputStream in;
private Socket sock;

sock = new Socket(_QComputer.get_IPAddress(),26000);
in = sock.getInputStream();

Then in another thread i get data from socket:

while (in.available() != 0) {
quote += (char) in.read();
}

First run - OK. When i pressed F5(refresh) in IE, i saw in console:

java.io.IOException: Stream closed.

at java.net.PlainSocketImpl.available(Unknown Source)

at java.net.SocketInputStream.available(Unknown Source)

at applet2.Applet2.get_data(Applet2.java:319)

at applet2.Applet2.run(Applet2.java:79)

at java.lang.Thread.run(Unknown Source)

What i have to do?
Why this my example do not work in IE? In AV - all OK






Back to top
Rich Wilkman
Guest





PostPosted: Mon Jul 14, 2003 10:24 pm    Post subject: Re: streams in applet (another question) Reply with quote



The error indicates that the VM used in IE is older than the one you are
using in JB so it doesn't have the implentations found in the newer
versions. Either write 1.1.4 code or use the Plugin to get around this.

-Rich

Alex Tyutyunik wrote:

Quote:
Good day, some trouble here...

private InputStream in;
private Socket sock;

sock = new Socket(_QComputer.get_IPAddress(),26000);
in = sock.getInputStream();

Then in another thread i get data from socket:

while (in.available() != 0) {
quote += (char) in.read();
}

First run - OK. When i pressed F5(refresh) in IE, i saw in console:

java.io.IOException: Stream closed.

at java.net.PlainSocketImpl.available(Unknown Source)

at java.net.SocketInputStream.available(Unknown Source)

at applet2.Applet2.get_data(Applet2.java:319)

at applet2.Applet2.run(Applet2.java:79)

at java.lang.Thread.run(Unknown Source)

What i have to do?
Why this my example do not work in IE? In AV - all OK










Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder JavaAPI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.