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


Groups > comp.lang.java.programmer > #25507 > unrolled thread

Re: Closing a stream in an applet causes a crash

Started bySam Takoy <sam.takoy@yahoo.com>
First post2011-01-30 20:34 -0500
Last post2011-02-01 10:35 +0100
Articles 13 — 6 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#25507 — Re: Closing a stream in an applet causes a crash

FromSam Takoy <sam.takoy@yahoo.com>
Date2011-01-30 20:34 -0500
SubjectRe: Closing a stream in an applet causes a crash
Message-ID<ii53k1$88e$1@news.eternal-september.org>
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.

Thanks.

Sam

[toc] | [next] | [standalone]


#25619

FromLew <noone@lewscanon.com>
Date2011-01-30 22:00 -0500
Message-ID<ii58k8$3n7$1@news.albasani.net>
In reply to#25507
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|
|_____|_____|
|===========|

[toc] | [prev] | [next] | [standalone]


#25742

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-02-01 20:09 -0500
Message-ID<4d48aeac$0$23762$14726298@news.sunsite.dk>
In reply to#25619
On 01-02-2011 13:35, Daniele Futtorovic wrote:
> On 01/02/2011 10:35, Lars Enderin allegedly wrote:
>> 2011-01-31 19:12, Daniele Futtorovic skrev:
>>> On 31/01/2011 04:00, Lew allegedly wrote:
>>>> That's all we can conclude based on the dearth of information you
>>>> see fit to dole out.
>>> <3
>>>
>>> If you write code like you write English, I'd like to read your
>>> code.
>>
>> Edsger W Dijkstra:
>>
>> Besides a mathematical inclination, an exceptionally good mastery of
>> one's native tongue is the most vital asset of a competent
>> programmer.
>
> Would extend that to tongues in general. After all, our business is in
> getting clearly understood by machines. What's that, if not linguistics?
> See L. Wall. Except perhaps that as opposed to vulgar linguistics, we
> control both sides.

But masters of both programming languages and natural languages
does not use their skills to use all features of the languages - they
use their skills to communicate in a ways so that everybody
understands it.

Arne

[toc] | [prev] | [next] | [standalone]


#25967

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-02-02 18:19 -0500
Message-ID<4d49e691$0$23765$14726298@news.sunsite.dk>
In reply to#25742
On 02-02-2011 14:43, Daniele Futtorovic wrote:
> On 02/02/2011 02:09, Arne Vajhøj allegedly wrote:
>> On 01-02-2011 13:35, Daniele Futtorovic wrote:
>>> On 01/02/2011 10:35, Lars Enderin allegedly wrote:
>>>> 2011-01-31 19:12, Daniele Futtorovic skrev:
>>>>> On 31/01/2011 04:00, Lew allegedly wrote:
>>>>>> That's all we can conclude based on the dearth of
>>>>>> information you see fit to dole out.
>>>>> <3
>>>>>
>>>>> If you write code like you write English, I'd like to read your
>>>>> code.
>>>>
>>>> Edsger W Dijkstra:
>>>>
>>>> Besides a mathematical inclination, an exceptionally good
>>>> mastery of one's native tongue is the most vital asset of a
>>>> competent programmer.
>>>
>>> Would extend that to tongues in general. After all, our business
>>> is in getting clearly understood by machines. What's that, if not
>>> linguistics? See L. Wall. Except perhaps that as opposed to vulgar
>>> linguistics, we control both sides.
>>
>> But masters of both programming languages and natural languages does
>> not use their skills to use all features of the languages - they use
>> their skills to communicate in a ways so that everybody understands
>> it.
>
> Do they indeed?
>
> Firstly, as I think is pretty much the case for all masteries of a
> particular type, you'll often see masters indulging in pointless doodles
> and plays that summon all the extent of their mastery. Kind of a
> self-gratification for having had to go through the trouble of acquiring
> the knowledge -- as such a very understandable feat which I don't think
> there is anything inherently wrong with.

The masters know that they are masters and do not care of whether
other see them as masters.

The beginners like to show of to pretend to be masters.

> Secondly, I fail to see a necessary correlation between greater command
> of a tongue and being able more effectively to make oneself understood.
> Partly because that greater command might open access to the expression
> of more complex thoughts, partly because it might cleanse one's speech
> of the inaccuracies or inadequacies that prevail in the vulgar.

Most people can explain a complex matter in a complex way - only
the master can explain it in a simple way.

Arne

[toc] | [prev] | [next] | [standalone]


#26022

FromDaniele Futtorovic <da.futt.news@laposte.net.invalid>
Date2011-02-02 20:43 +0100
Message-ID<iicc5s$7c5$1@news.eternal-september.org>
In reply to#25742
On 02/02/2011 02:09, Arne Vajhøj allegedly wrote:
> On 01-02-2011 13:35, Daniele Futtorovic wrote:
>> On 01/02/2011 10:35, Lars Enderin allegedly wrote:
>>> 2011-01-31 19:12, Daniele Futtorovic skrev:
>>>> On 31/01/2011 04:00, Lew allegedly wrote:
>>>>> That's all we can conclude based on the dearth of
>>>>> information you see fit to dole out.
>>>> <3
>>>>
>>>> If you write code like you write English, I'd like to read your
>>>> code.
>>>
>>> Edsger W Dijkstra:
>>>
>>> Besides a mathematical inclination, an exceptionally good
>>> mastery of one's native tongue is the most vital asset of a
>>> competent programmer.
>>
>> Would extend that to tongues in general. After all, our business
>> is in getting clearly understood by machines. What's that, if not
>> linguistics? See L. Wall. Except perhaps that as opposed to vulgar
>> linguistics, we control both sides.
>
> But masters of both programming languages and natural languages does
> not use their skills to use all features of the languages - they use
> their skills to communicate in a ways so that everybody understands
> it.

Do they indeed?

Firstly, as I think is pretty much the case for all masteries of a
particular type, you'll often see masters indulging in pointless doodles
and plays that summon all the extent of their mastery. Kind of a
self-gratification for having had to go through the trouble of acquiring
the knowledge -- as such a very understandable feat which I don't think
there is anything inherently wrong with.

Secondly, I fail to see a necessary correlation between greater command
of a tongue and being able more effectively to make oneself understood.
Partly because that greater command might open access to the expression
of more complex thoughts, partly because it might cleanse one's speech
of the inaccuracies or inadequacies that prevail in the vulgar.

Lastly and perhaps most importantly, if the master finds his mastery to
be a Satisfying Thing (patent pending) and happens to be humanistically
inclined, mightn't he wish it unto others? And to that end, tease them
and encourage them upon the path?

df.

[toc] | [prev] | [next] | [standalone]


#26050

FromDaniele Futtorovic <da.futt.news@laposte.net.invalid>
Date2011-02-02 22:20 +0100
Message-ID<iichr0$cto$1@news.eternal-september.org>
In reply to#26022
On 02/02/2011 21:50, Lew allegedly wrote:
> Daniele Futtorovic wrote:
>> Lastly and perhaps most importantly, if the master finds his mastery to
>> be a Satisfying Thing (patent pending) and happens to be humanistically
>> inclined, mightn't he wish it unto others? And to that end, tease them
>> and encourage them upon the path?
>>
>
> More likely he'll tease those who do not show talent for the field of
> which he's so fond, in an attempt to drive them either to excellence
> or to a job that doesn't require nearly as much skill.
>
> It doesn't serve a practitioner "humanistically" or otherwise to
> encourage them upon a path for which they are ill suited.  A master
> will recognize that and only encourage those who have a chance to
> progress.
>
> For the rest, it's, "Would you like fries with that?" and the world is
> a better place for that.

Yeah, but at the same time he might not be pressed to repudiate anyone,
instead living and letting live, if it weren't for external forces which
take malign and interested pleasure in putting the inept in his way so
as to erode the value of his skill.

These external forces he will never succeed in getting to sell shakes as
long as he persists in idiosyncratic complacency.

-- 
DF.

[toc] | [prev] | [next] | [standalone]


#26200

FromLew <lew@lewscanon.com>
Date2011-02-02 12:50 -0800
Message-ID<e6406a92-90cd-443f-bf14-08bdafdb4c40@w6g2000vbo.googlegroups.com>
In reply to#26022
Daniele Futtorovic wrote:
> Lastly and perhaps most importantly, if the master finds his mastery to
> be a Satisfying Thing (patent pending) and happens to be humanistically
> inclined, mightn't he wish it unto others? And to that end, tease them
> and encourage them upon the path?
>

More likely he'll tease those who do not show talent for the field of
which he's so fond, in an attempt to drive them either to excellence
or to a job that doesn't require nearly as much skill.

It doesn't serve a practitioner "humanistically" or otherwise to
encourage them upon a path for which they are ill suited.  A master
will recognize that and only encourage those who have a chance to
progress.

For the rest, it's, "Would you like fries with that?" and the world is
a better place for that.

--
Lew

[toc] | [prev] | [next] | [standalone]


#25779

FromLew <noone@lewscanon.com>
Date2011-02-01 13:37 -0500
Message-ID<ii9jso$7d1$1@news.albasani.net>
In reply to#25619
Lew allegedly wrote:
>> Kidding aside, I do practice precise and nuanced expression of intent
>> in code, as best I can. I am an ardent Javadoc commenter and have
>> rather obsessive patterns for brace placement, whitespace and such.
>> I'm a huge fan of generics and interfaces, and I like long walks on
>> the beach.

Daniele Futtorovic wrote:
> ++ and splitting nested expressions over many lines. Do prefer mountains and
> felinae, though. ;)

It's cats and dogs reigning.

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

[toc] | [prev] | [next] | [standalone]


#25807

FromLew <lew@lewscanon.com>
Date2011-01-31 14:22 -0800
Message-ID<64240454-37e6-4da4-b63b-18316b544273@o18g2000prh.googlegroups.com>
In reply to#25619
Lew allegedly wrote:
>> That's all we can conclude based on the dearth of information
>> you see fit to dole out.
>

Daniele Futtorovic wrote:
> <3
>
> If you write code like you write English, I'd like to read your code.
>

Thank you, sirrah, for that laudatory feedback.

My code is even better written, but somewhat less sesquipedalian.  :-)

Kidding aside, I do practice precise and nuanced expression of intent
in code, as best I can.  I am an ardent Javadoc commenter and have
rather obsessive patterns for brace placement, whitespace and such.
I'm a huge fan of generics and interfaces, and I like long walks on
the beach.

Well, I haven't been such a fan of long walks on the beach since
moving away from a maritime area, but I used to enjoy walking my dog
at low tide.

--
Lew

[toc] | [prev] | [next] | [standalone]


#26084

FromDaniele Futtorovic <da.futt.news@laposte.net.invalid>
Date2011-02-01 19:29 +0100
Message-ID<ii9je0$7cr$1@news.eternal-september.org>
In reply to#25807
On 31/01/2011 23:22, Lew allegedly wrote:
> Kidding aside, I do practice precise and nuanced expression of intent
> in code, as best I can.  I am an ardent Javadoc commenter and have
> rather obsessive patterns for brace placement, whitespace and such.
> I'm a huge fan of generics and interfaces, and I like long walks on
> the beach.

++ and splitting nested expressions over many lines. Do prefer mountains 
and felinae, though. ;)

df.

[toc] | [prev] | [next] | [standalone]


#25952

FromDaniele Futtorovic <da.futt.news@laposte.net.invalid>
Date2011-01-31 19:12 +0100
Message-ID<ii6u38$s30$1@news.eternal-september.org>
In reply to#25619
On 31/01/2011 04:00, Lew allegedly wrote:
>That's all we can conclude based on the dearth of information
> you see fit to dole out.
<3

If you write code like you write English, I'd like to read your code.

[toc] | [prev] | [next] | [standalone]


#26026

FromDaniele Futtorovic <da.futt.news@laposte.net.invalid>
Date2011-02-01 19:35 +0100
Message-ID<ii9joo$b9b$1@news.eternal-september.org>
In reply to#25952
On 01/02/2011 10:35, Lars Enderin allegedly wrote:
> 2011-01-31 19:12, Daniele Futtorovic skrev:
>> On 31/01/2011 04:00, Lew allegedly wrote:
>>> That's all we can conclude based on the dearth of information you
>>> see fit to dole out.
>> <3
>>
>> If you write code like you write English, I'd like to read your
>> code.
>
> Edsger W Dijkstra:
>
> Besides a mathematical inclination, an exceptionally good mastery of
> one's native tongue is the most vital asset of a competent
> programmer.

Would extend that to tongues in general. After all, our business is in
getting clearly understood by machines. What's that, if not linguistics?
See L. Wall. Except perhaps that as opposed to vulgar linguistics, we
control both sides.

[toc] | [prev] | [next] | [standalone]


#26104

FromLars Enderin <lars.enderin@telia.com>
Date2011-02-01 10:35 +0100
Message-ID<4D47D3DD.5010409@telia.com>
In reply to#25952
2011-01-31 19:12, Daniele Futtorovic skrev:
> On 31/01/2011 04:00, Lew allegedly wrote:
>> That's all we can conclude based on the dearth of information
>> you see fit to dole out.
> <3
> 
> If you write code like you write English, I'd like to read your code.

Edsger W Dijkstra:

Besides a mathematical inclination, an exceptionally good mastery of
one's native tongue is the most vital asset of a competent programmer.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web