Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #25619

Re: Closing a stream in an applet causes a crash

From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: Closing a stream in an applet causes a crash
Date 2011-01-30 22:00 -0500
Organization albasani.net
Message-ID <ii58k8$3n7$1@news.albasani.net> (permalink)
References <ii4ua5$elc$1@news.eternal-september.org> <4d460960$0$10580$c30e37c6@exi-reader.telstra.net> <ii53k1$88e$1@news.eternal-september.org>

Show all headers | View raw


On 01/30/2011 08:34 PM, Sam Takoy wrote:
> On 1/30/2011 7:58 PM, Esmond Pitt wrote:
>> On 31/01/2011 11:04 AM, Sam Takoy wrote:
>>> And everything works perfectly in terms of opening the stream and
>>> reading from it, until I attempt is.close() - then I get the
>>>
>>> java.io.IOException: stream is closed
>>>
>>> exception.
>>
>> That exception means you have already closed the stream or the
>> connection yourself. Somewhere in the part starting /////.
>
>
> Thanks for the responses, but like I said, I run the same code as an
> application and as an applet and it fails only in the applet.

Well, la-dee-dah.  Since you have not deigned to share your code with us I 
guess we'll have to be in the dark about what you're doing differently in the 
application context from the applet context.  Since applets and applications 
start differently, one thing we can be sure of is that it's not the same code.

Also, IOExceptions arise from external circumstances, i.e., the failure of an 
I/O operation.  Application and applet environments are notably different.  No 
doubt you are failing to handle that difference correctly.

Another thing we can be sure of is that your carefully hidden code contains no 
exception handler for the 'close()' operation.  Tsk, tsk.

http://sscce.org/ if you want answers beyond, "Well, you did something wrong." 
  That's all we can conclude based on the dearth of information you see fit to 
dole out.

-- 
Lew
Ceci n'est pas une fenêtre.
.___________.
|###] | [###|
|##/  | *\##|
|#/ * |   \#|
|#----|----#|
||    |  * ||
|o *  |    o|
|_____|_____|
|===========|

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Closing a stream in an applet causes a crash Sam Takoy <sam.takoy@yahoo.com> - 2011-01-30 20:34 -0500
  Re: Closing a stream in an applet causes a crash Lew <noone@lewscanon.com> - 2011-01-30 22:00 -0500
    Re: Closing a stream in an applet causes a crash Arne Vajhøj <arne@vajhoej.dk> - 2011-02-01 20:09 -0500
      Re: Closing a stream in an applet causes a crash Arne Vajhøj <arne@vajhoej.dk> - 2011-02-02 18:19 -0500
      Re: Closing a stream in an applet causes a crash Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-02 20:43 +0100
        Re: Closing a stream in an applet causes a crash Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-02 22:20 +0100
        Re: Closing a stream in an applet causes a crash Lew <lew@lewscanon.com> - 2011-02-02 12:50 -0800
    Re: Closing a stream in an applet causes a crash Lew <noone@lewscanon.com> - 2011-02-01 13:37 -0500
    Re: Closing a stream in an applet causes a crash Lew <lew@lewscanon.com> - 2011-01-31 14:22 -0800
      Re: Closing a stream in an applet causes a crash Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-01 19:29 +0100
    Re: Closing a stream in an applet causes a crash Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-01-31 19:12 +0100
      Re: Closing a stream in an applet causes a crash Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-01 19:35 +0100
      Re: Closing a stream in an applet causes a crash Lars Enderin <lars.enderin@telia.com> - 2011-02-01 10:35 +0100

csiph-web