Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #25979
| From | Kevin McMurtrie <mcmurtrie@pixelmemory.us> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Closing a stream in an applet causes a crash |
| References | <ii4ua5$elc$1@news.eternal-september.org> |
| Date | 2011-01-31 21:52 -0800 |
| Message-ID | <4d479fb2$0$22116$742ec2ed@news.sonic.net> (permalink) |
| Organization | Sonic.Net |
In article <ii4ua5$elc$1@news.eternal-september.org>, Sam Takoy <sam.takoy@yahoo.com> wrote: > Hi, > > I have a signed applet that includes the following code: > > URL url = new URL(urlString); > URLConnection urlc = url.openConnection(); > > InputStream is = urlc.getInputStream(); > > > ///// > > is.close(); > > > 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. Interestingly, this does not happen when I use the same code > from an application rather than a signed applet. What could be going on > here? > > Thanks in advance! > > Sam You need to post more to get help. The InputStream is going to have several layers of protocol handlers between you and the socket. It's probable that your use has caused one layer to close the connection but another layer is trying to read a trailer. -- I will not see posts or email from Google because I must filter them as spam
Back to comp.lang.java.programmer | Previous | Next | Find similar
Re: Closing a stream in an applet causes a crash Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2011-01-31 21:52 -0800
csiph-web