Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages
Started by Alex Tyutyunik
Mon, 14 Jul 2003 13:03
streams in applet (another question)
Author: Alex Tyutyunik
Date: Mon, 14 Jul 2003 13:03
Date: Mon, 14 Jul 2003 13:03
30 lines
1763 bytes
1763 bytes
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)
Author: Rich Wilkman
Date: Mon, 14 Jul 2003 22:24
Date: Mon, 14 Jul 2003 22:24
46 lines
2064 bytes
2064 bytes
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:
>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
>
>
>
>
>
>
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads