Board index » jbuilder » streams in applet (another question)

streams in applet (another question)


2003-07-14 09:03:07 PM
jbuilder11
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
 
 

Re:streams in applet (another question)

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